Skip to content

Commit

Permalink
[tests] Added 1 p.c. tolerance for long waiting time (#1762)
Browse files Browse the repository at this point in the history
  • Loading branch information
ethouris authored Jan 29, 2021
1 parent 85e3013 commit 17db0cb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/test_sync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,8 @@ TEST(SyncEvent, WaitFor)
// - SyncEvent::wait_for( 50us) took 6us
// - SyncEvent::wait_for(100us) took 4us
if (on_timeout) {
EXPECT_GE(waittime_us, timeout_us);
const int tolerance = timeout_us/1000;
EXPECT_GE(waittime_us, timeout_us - tolerance);
}
#endif
if (on_timeout) {
Expand Down

0 comments on commit 17db0cb

Please sign in to comment.