mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
4bdf494d63
test-timers-same-timeout-wrong-list-deleted was flaky under load because there is no guarantee that a timer will fire within a given period of time. It had an exit handler that checked that the process was finishing in less than twice as much as a timer was set for. Under load, the timer could take over 200ms to fire even if it was set for 100ms, so this was causing the test to be flaky on CI from time to time. However, that timing check is unnecessary to identify the regression that the test was written for. When run with a version of Node.js that does not contain the fix that accompanied the test in its initial commit, an assertion indicating that there were still timers in the active timer list fired. So, this commit removes the exit handler timing check and relies on the existing robust active timers list length check. This allows us to move the test back to parallel because it does not seem to fail under load anymore. The test was refactored slightly, removing duplicated code to a function, using `assert.strictEqual()` instead of `assert.equal()`, changing a 10ms timer to 1ms, and improving the messages provided by assertions. Fixes: https://github.com/nodejs/node/issues/8459 PR-URL: https://github.com/nodejs/node/pull/10362 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> |
||
---|---|---|
.. | ||
sequential.status | ||
test-buffer-creation-regression.js | ||
test-child-process-emfile.js | ||
test-child-process-execsync.js | ||
test-child-process-fork-getconnections.js | ||
test-child-process-pass-fd.js | ||
test-crypto-timing-safe-equal.js | ||
test-debug-host-port.js | ||
test-debugger-debug-brk.js | ||
test-deprecation-flags.js | ||
test-dgram-pingpong.js | ||
test-fs-watch.js | ||
test-http-client-timeout-with-data.js | ||
test-http-regr-gh-2928.js | ||
test-http-server-consumed-timeout.js | ||
test-init.js | ||
test-module-loading.js | ||
test-net-GH-5504.js | ||
test-net-server-address.js | ||
test-next-tick-error-spin.js | ||
test-pipe.js | ||
test-process-warnings.js | ||
test-regress-GH-784.js | ||
test-regress-GH-877.js | ||
test-regress-GH-897.js | ||
test-regress-GH-1697.js | ||
test-regress-GH-1726.js | ||
test-regress-GH-4015.js | ||
test-regress-GH-4027.js | ||
test-repl-timeout-throw.js | ||
test-require-cache-without-stat.js | ||
test-stream2-fs.js | ||
test-stream2-stderr-sync.js | ||
test-timers-blocking-callback.js | ||
test-util-debug.js | ||
test-vm-timeout-rethrow.js | ||
testcfg.py |