diff options
author | Rich Trott <rtrott@gmail.com> | 2018-01-30 10:47:25 -0800 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2018-01-30 20:27:57 -0800 |
commit | a025723e0191e3526bf1e83b066c2f1c78730134 (patch) | |
tree | d2cad362353c8d52c224a9f594ea99f2af2e0f42 /test | |
parent | 0993fbe5b213d0fe746c3162bcda85f6c66bb552 (diff) | |
download | android-node-v8-a025723e0191e3526bf1e83b066c2f1c78730134.tar.gz android-node-v8-a025723e0191e3526bf1e83b066c2f1c78730134.tar.bz2 android-node-v8-a025723e0191e3526bf1e83b066c2f1c78730134.zip |
test: fix flaky test-process-fatal-execption-tick
Use common.busyLoop() which happens to make the test robust.
PR-URL: https://github.com/nodejs/node/pull/18461
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/parallel/test-process-fatal-exception-tick.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/test/parallel/test-process-fatal-exception-tick.js b/test/parallel/test-process-fatal-exception-tick.js index 19678d2922..605f961f63 100644 --- a/test/parallel/test-process-fatal-exception-tick.js +++ b/test/parallel/test-process-fatal-exception-tick.js @@ -18,7 +18,6 @@ setImmediate(() => { stage++; process.nextTick(() => assert.strictEqual(stage, 2)); }); -const now = Date.now(); setTimeout(() => setImmediate(() => stage++), 1); -while (now + 10 >= Date.now()); +common.busyLoop(10); throw new Error('caughtException'); |