Skip to content

Commit 4fde7dc

Browse files
aduh95jasnell
authored andcommitted
test: fix flaky test-child-process-exec-abortcontroller-promisified
Fixes: #37568 PR-URL: #37572 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent c199989 commit 4fde7dc

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

test/parallel/test-child-process-exec-abortcontroller-promisified.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,9 @@ const invalidArgTypeError = {
1010
name: 'TypeError'
1111
};
1212

13-
let waitCommand = '';
14-
if (common.isWindows) {
15-
waitCommand = 'TIMEOUT 120';
16-
} else {
17-
waitCommand = 'sleep 2m';
18-
}
13+
const waitCommand = common.isLinux ?
14+
'sleep 2m' :
15+
`${process.execPath} -e "setInterval(()=>{}, 99)"`;
1916

2017
{
2118
const ac = new AbortController();

0 commit comments

Comments
 (0)