Skip to content

Commit 1c4549a

Browse files
santigimenoMyles Borins
authored and
Myles Borins
committed
test: fix flaky test-stdout-close-catch
Make sure that `catch-stdout-error` has written data before the destination process exits. Fixes: #6791 PR-URL: #6808 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Roman Klauke <[email protected]>
1 parent 3b94e31 commit 1c4549a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/parallel/test-stdout-close-catch.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ var testScript = path.join(common.fixturesDir, 'catch-stdout-error.js');
99
var cmd = JSON.stringify(process.execPath) + ' ' +
1010
JSON.stringify(testScript) + ' | ' +
1111
JSON.stringify(process.execPath) + ' ' +
12-
'-pe "process.exit(1);"';
12+
'-pe "process.stdin.on(\'data\' , () => process.exit(1))"';
1313

1414
var child = child_process.exec(cmd);
1515
var output = '';

0 commit comments

Comments
 (0)