From cf59fd0d3484a06ac70b2cef4131b02f54df44a8 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Tue, 2 Mar 2021 15:20:30 +0100 Subject: [PATCH] test: fix flaky test-child-process-exec-abortcontroller-promisified Fixes: https://github.com/nodejs/node/issues/37568 --- ...est-child-process-exec-abortcontroller-promisified.js | 9 +++------ 1 file 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 b818a00a2921d6..ac77d39938d8b6 100644 --- a/test/parallel/test-child-process-exec-abortcontroller-promisified.js +++ b/test/parallel/test-child-process-exec-abortcontroller-promisified.js @@ -10,12 +10,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();