Skip to content

Commit 89460f1

Browse files
committed
test: fix flaky test-stdout-close-catch
Make sure that `catch-stdout-error` has written data before the destination process exits. Fixes: nodejs#6791 PR-URL: nodejs#6808 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Roman Klauke <[email protected]>
1 parent 27549f6 commit 89460f1

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)