File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -67,23 +67,23 @@ TEST(ConditionVariableTest, Timeout) {
6767 ASSERT_FALSE (ret);
6868 });
6969
70- ASSERT_GE (duration.count (), 0.01 );
70+ ASSERT_GE (duration.count (), 0.01 * 0.999 );
7171
7272 duration = measureDuration ([&] {
7373 ConditionVariable::ScopedLock lock (cond);
7474 bool ret = cond.wait (0 .1s);
7575 ASSERT_FALSE (ret);
7676 });
7777
78- ASSERT_GE (duration.count (), 0.1 );
78+ ASSERT_GE (duration.count (), 0.1 * 0.999 );
7979
8080 duration = measureDuration ([&] {
8181 ConditionVariable::ScopedLock lock (cond);
8282 bool ret = cond.wait (1s);
8383 ASSERT_FALSE (ret);
8484 });
8585
86- ASSERT_GE (duration.count (), 1.0 );
86+ ASSERT_GE (duration.count (), 1.0 * 0.999 );
8787
8888 auto deadline = std::chrono::system_clock::now () + 0 .5s;
8989
@@ -93,7 +93,7 @@ TEST(ConditionVariableTest, Timeout) {
9393 ASSERT_FALSE (ret);
9494 });
9595
96- ASSERT_GE (duration.count (), 0.5 );
96+ ASSERT_GE (duration.count (), 0.5 * 0.999 );
9797}
9898
9999// Check that signal() wakes exactly one waiter
You can’t perform that action at this time.
0 commit comments