Browse Source

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 <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
v4.x
Santiago Gimeno 9 years ago
committed by Myles Borins
parent
commit
1c4549a31e
  1. 2
      test/parallel/test-stdout-close-catch.js

2
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 = '';

Loading…
Cancel
Save