From 015a0c3d7a1509f49559b1188929a520684868f4 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..bd5bffc84557c4 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' : + 'node -e "setInterval(()=>{}, 99)"'; { const ac = new AbortController();