mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00
test: deflake test/pummel/test-timers.js
PR-URL: https://github.com/nodejs/node/pull/55098 Fixes: https://github.com/nodejs/node/issues/55092 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit is contained in:
parent
668e523392
commit
66a2cb210a
1 changed files with 2 additions and 2 deletions
|
@ -36,7 +36,7 @@ const WINDOW = 200; // Why does this need to be so big?
|
||||||
assert.ok(diff > 0);
|
assert.ok(diff > 0);
|
||||||
console.error(`diff: ${diff}`);
|
console.error(`diff: ${diff}`);
|
||||||
|
|
||||||
assert.ok(1000 <= diff && diff < 1000 + WINDOW);
|
assert.ok(Math.abs(diff - 1000) < WINDOW);
|
||||||
}), 1000);
|
}), 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ const WINDOW = 200; // Why does this need to be so big?
|
||||||
|
|
||||||
const t = interval_count * 1000;
|
const t = interval_count * 1000;
|
||||||
|
|
||||||
assert.ok(t <= diff && diff < t + (WINDOW * interval_count));
|
assert.ok(Math.abs(diff - t) < WINDOW * interval_count);
|
||||||
|
|
||||||
assert.ok(interval_count <= 3, `interval_count: ${interval_count}`);
|
assert.ok(interval_count <= 3, `interval_count: ${interval_count}`);
|
||||||
if (interval_count === 3)
|
if (interval_count === 3)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue