Skip to content

Commit f531386

Browse files
committed
test: fix flaky test-process-fatal-execption-tick.js
Use common.busyLoop() which happens to make the test robust.
1 parent e56189e commit f531386

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

test/parallel/test-process-fatal-exception-tick.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ setImmediate(() => {
1818
stage++;
1919
process.nextTick(() => assert.strictEqual(stage, 2));
2020
});
21-
const now = Date.now();
2221
setTimeout(() => setImmediate(() => stage++), 1);
23-
while (now + 10 >= Date.now());
22+
common.busyLoop(10);
2423
throw new Error('caughtException');

0 commit comments

Comments
 (0)