diff options
author | Antoine du Hamel <duhamelantoine1995@gmail.com> | 2021-03-02 15:20:30 +0100 |
---|---|---|
committer | Michaƫl Zasso <targos@protonmail.com> | 2021-09-07 11:14:45 +0200 |
commit | 64fb928ec761cca8f78493f3236cb39062763947 (patch) | |
tree | ac58116f6b1e3fd66f90848a9efceb1d32917e78 | |
parent | d39200c7f461d3dc97f50a01d396112bdfa5bd07 (diff) | |
download | node-new-64fb928ec761cca8f78493f3236cb39062763947.tar.gz |
test: fix flaky test-child-process-exec-abortcontroller-promisified
Fixes: https://github.com/nodejs/node/issues/37568
PR-URL: https://github.com/nodejs/node/pull/37572
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
-rw-r--r-- | test/parallel/test-child-process-exec-abortcontroller-promisified.js | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/test/parallel/test-child-process-exec-abortcontroller-promisified.js b/test/parallel/test-child-process-exec-abortcontroller-promisified.js index 2db8809064..bf3c1c92b5 100644 --- a/test/parallel/test-child-process-exec-abortcontroller-promisified.js +++ b/test/parallel/test-child-process-exec-abortcontroller-promisified.js @@ -11,12 +11,9 @@ const invalidArgTypeError = { name: 'TypeError' }; -let waitCommand = ''; -if (common.isWindows) { - waitCommand = 'TIMEOUT 120'; -} else { - waitCommand = 'sleep 2m'; -} +const waitCommand = common.isLinux ? + 'sleep 2m' : + `${process.execPath} -e "setInterval(()=>{}, 99)"`; { const ac = new AbortController(); |