Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: test/Prefs.cpp

Issue 29372702: Issue #4826 - Use latch to replace thread-sleeping in tests
Patch Set: stray comments Created Jan. 20, 2017, 1:29 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/LatchTest.cpp ('k') | test/UpdateCheck.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/Prefs.cpp
===================================================================
--- a/test/Prefs.cpp
+++ b/test/Prefs.cpp
@@ -151,7 +151,7 @@
filterEngine->SetPref("patternsbackupinterval", jsEngine->NewValue(48));
filterEngine->SetPref("subscriptions_autoupdate", jsEngine->NewValue(false));
- std::this_thread::sleep_for(std::chrono::milliseconds(100));
+ std::this_thread::sleep_for(std::chrono::milliseconds(100)); // RACE
ASSERT_FALSE(fileSystem->prefsContents.empty());
@@ -222,7 +222,7 @@
ASSERT_TRUE(filterEngine->GetPref("suppress_first_run_page")->AsBool());
filterEngine->SetPref("suppress_first_run_page", jsEngine->NewValue(false));
- std::this_thread::sleep_for(std::chrono::milliseconds(100));
+ std::this_thread::sleep_for(std::chrono::milliseconds(100)); // RACE
ASSERT_FALSE(fileSystem->prefsContents.empty());
« no previous file with comments | « test/LatchTest.cpp ('k') | test/UpdateCheck.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld