Skip to content

Commit

Permalink
test: fix test-process-exec-argv flakiness
Browse files Browse the repository at this point in the history
Wait for the `close` event before parsing the child stdout output.

Fixes: #6480
PR-URL: #6575
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
  • Loading branch information
santigimeno authored and evanlucas committed May 17, 2016
1 parent 3f9d724 commit 89b25fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/parallel/test-process-exec-argv.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if (process.argv[2] === 'child') {
out += chunk;
});

child.on('exit', function() {
child.on('close', function() {
assert.deepStrictEqual(JSON.parse(out), execArgv);
});
}

0 comments on commit 89b25fa

Please sign in to comment.