diff options
author | Ujjwal Sharma <usharma1998@gmail.com> | 2018-03-14 03:13:29 +0530 |
---|---|---|
committer | Beth Griggs <Bethany.Griggs@uk.ibm.com> | 2018-12-03 18:09:58 +0000 |
commit | 8fa5bd37611b2952e6b641932700cd0850bd4b40 (patch) | |
tree | 390ccffc10d379bb41a14ecbf3929f9d31127bc3 /test/parallel/test-timers-setimmediate-infinite-loop.js | |
parent | f5683a9a6dcecd367b95947a22b50acef19f323d (diff) | |
download | node-new-8fa5bd37611b2952e6b641932700cd0850bd4b40.tar.gz |
test: rename regression tests file names
Rename the tests appropriately alongside mentioning the subsystem.
Also, make a few basic changes to make sure the tests conform to the
standard test structure.
- Rename test-regress-GH-io-1068 to test-tty-stdin-end
- Rename test-regress-GH-io-1811 to test-zlib-kmaxlength-rangeerror
- Rename test-regress-GH-node-9326 to test-kill-segfault-freebsd
- Rename test-timers-regress-GH-9765 to test-timers-setimmediate-infinite-loop
- Rename test-tls-pfx-gh-5100-regr to test-tls-pfx-authorizationerror
- Rename test-tls-regr-gh-5108 to test-tls-tlswrap-segfault
PR-URL: https://github.com/nodejs/node/pull/19332
Fixes: https://github.com/nodejs/node/issues/19105
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
Diffstat (limited to 'test/parallel/test-timers-setimmediate-infinite-loop.js')
-rw-r--r-- | test/parallel/test-timers-setimmediate-infinite-loop.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/parallel/test-timers-setimmediate-infinite-loop.js b/test/parallel/test-timers-setimmediate-infinite-loop.js new file mode 100644 index 0000000000..49adc390fa --- /dev/null +++ b/test/parallel/test-timers-setimmediate-infinite-loop.js @@ -0,0 +1,19 @@ +'use strict'; +const common = require('../common'); + +// This test ensures that if an Immediate callback clears subsequent +// immediates we don't get stuck in an infinite loop. +// +// If the process does get stuck, it will be timed out by the test +// runner. +// +// Ref: https://github.com/nodejs/node/issues/9756 + +setImmediate(common.mustCall(function() { + clearImmediate(i2); + clearImmediate(i3); +})); + +const i2 = setImmediate(common.mustNotCall()); + +const i3 = setImmediate(common.mustNotCall()); |