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: nodejs#6480
Ref: nodejs#6575
PR-URL: nodejs#7128
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 committed Jun 3, 2016
1 parent 0d054e2 commit 8d1d780
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 8d1d780

Please sign in to comment.