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

Unified Diff: mojo/system/test_utils.cc

Issue 281893002: Mojo: Base our epsilon timeouts off of TestTimeouts::tiny_timeout(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | « mojo/system/test_utils.h ('k') | mojo/system/waiter_list_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/test_utils.cc
diff --git a/mojo/system/test_utils.cc b/mojo/system/test_utils.cc
index 1ff080be4cd815d030e44e3b2278585ff24c07d6..e19fe3505660320ea2307c7c7179a563047fae22 100644
--- a/mojo/system/test_utils.cc
+++ b/mojo/system/test_utils.cc
@@ -7,6 +7,7 @@
#include "base/bind.h"
#include "base/callback.h"
#include "base/synchronization/waitable_event.h"
+#include "base/test/test_timeouts.h"
namespace mojo {
namespace system {
@@ -31,6 +32,14 @@ void PostTaskAndWait(scoped_refptr<base::TaskRunner> task_runner,
event.Wait();
}
+base::TimeDelta EpsilonTimeout() {
+ // Originally, our epsilon timeout was 10 ms, which was mostly fine but flaky
+ // on some Windows bots. So I bumped it up to 30 ms, which made things
+ // reliable. Currently, |tiny_timeout()| is 100 ms, which means that this will
+ // be 25 ms, which will hopefully be okay.
+ return TestTimeouts::tiny_timeout() / 4;
+}
+
// TestIOThread ----------------------------------------------------------------
TestIOThread::TestIOThread(Mode mode)
« no previous file with comments | « mojo/system/test_utils.h ('k') | mojo/system/waiter_list_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698