Skip to content

Commit a025723

Browse files
committed
test: fix flaky test-process-fatal-execption-tick
Use common.busyLoop() which happens to make the test robust. PR-URL: #18461 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
1 parent 0993fbe commit a025723

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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)