mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
test: fix flaky interval test
PR-URL: https://github.com/nodejs/node/pull/18161 Fixes: https://github.com/nodejs/node/issues/18160 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
1 parent
dbdcf12187
commit
b88da496ef
1 file changed
+2
-2
@@ -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);
|
||||
Reference in new issue
Block a user