Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1526)

Unified Diff: runtime/vm/timeline_test.cc

Issue 1687043003: Sleep for more than 1 millisecond in timeline tests (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/timeline_test.cc
diff --git a/runtime/vm/timeline_test.cc b/runtime/vm/timeline_test.cc
index 05c4abb4715e676390b7972d7bb895fd1f2558b8..01d0c6a453af5e009c9c6eef5d9b04a710104c10 100644
--- a/runtime/vm/timeline_test.cc
+++ b/runtime/vm/timeline_test.cc
@@ -345,12 +345,12 @@ TEST_CASE(TimelineAnalysis_ThreadBlockCount) {
TimelineTestHelper::FakeThreadEvent(block_1_2, 1, "B2");
TimelineTestHelper::FakeThreadEvent(block_1_2, 1, "B3");
// Sleep to ensure timestamps differ.
- OS::Sleep(1);
+ OS::Sleep(32);
TimelineTestHelper::FakeThreadEvent(block_1_0, 1, "A1");
- OS::Sleep(1);
+ OS::Sleep(32);
TimelineTestHelper::FakeThreadEvent(block_1_1, 1, "C1");
TimelineTestHelper::FakeThreadEvent(block_1_1, 1, "C2");
- OS::Sleep(1);
+ OS::Sleep(32);
// Add events to each block for thread 2.
TimelineTestHelper::FakeThreadEvent(block_2_0, 2, "A");
@@ -455,7 +455,7 @@ TEST_CASE(TimelineRingRecorderJSONOrder) {
// Emit the earlier event into block_1.
TimelineTestHelper::FakeThreadEvent(block_1, 2, "Alpha", &stream);
- OS::Sleep(1);
+ OS::Sleep(32);
// Emit the later event into block_0.
TimelineTestHelper::FakeThreadEvent(block_0, 2, "Beta", &stream);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698