From 1c4549a31e7ebac3b8981e05c8e11d2e9f5a2d02 Mon Sep 17 00:00:00 2001 From: Santiago Gimeno Date: Tue, 17 May 2016 12:45:27 +0200 Subject: [PATCH] test: fix flaky test-stdout-close-catch Make sure that `catch-stdout-error` has written data before the destination process exits. Fixes: https://github.com/nodejs/node/issues/6791 PR-URL: https://github.com/nodejs/node/pull/6808 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Roman Klauke --- test/parallel/test-stdout-close-catch.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-stdout-close-catch.js b/test/parallel/test-stdout-close-catch.js index 470fa9843c..15315fe82c 100644 --- a/test/parallel/test-stdout-close-catch.js +++ b/test/parallel/test-stdout-close-catch.js @@ -9,7 +9,7 @@ var testScript = path.join(common.fixturesDir, 'catch-stdout-error.js'); var cmd = JSON.stringify(process.execPath) + ' ' + JSON.stringify(testScript) + ' | ' + JSON.stringify(process.execPath) + ' ' + - '-pe "process.exit(1);"'; + '-pe "process.stdin.on(\'data\' , () => process.exit(1))"'; var child = child_process.exec(cmd); var output = '';