Skip to content

Commit

Permalink
test: fix flaky interval test
Browse files Browse the repository at this point in the history
PR-URL: #18161
Fixes: #18160
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
apapirovski authored and joyeecheung committed Jan 17, 2018
1 parent dbdcf12 commit b88da49
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ let first;
const t = setInterval(() => {
cntr++;
if (cntr === 1) {
first = Timer.now();
common.busyLoop(100);
first = Timer.now();
} else if (cntr === 2) {
assert(Timer.now() - first < 120);
assert(Timer.now() - first < 100);
clearInterval(t);
}
}, 100);

0 comments on commit b88da49

Please sign in to comment.