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
Ref: #6575
PR-URL: #7128
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
  • Loading branch information
santigimeno authored and Myles Borins committed Jun 24, 2016
1 parent 67863f1 commit ab50e82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 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() {
assert.deepEqual(JSON.parse(out), execArgv);
child.on('close', function() {
assert.deepStrictEqual(JSON.parse(out), execArgv);
});
}

0 comments on commit ab50e82

Please sign in to comment.