Skip to content

Commit

Permalink
test: fix domain-top-level-error-handler-throw
Browse files Browse the repository at this point in the history
Check the stderr output in the `close` event as it's not guaranteed to
be fully available when the `exit` event is fired.

PR: #4364
PR-URL: #4364
Reviewed-By: Julien Gilli <jgilli@fastmail.fm>
  • Loading branch information
santigimeno authored and Fishrock123 committed Jan 6, 2016
1 parent 6d14b65 commit 00b37de
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/parallel/test-domain-top-level-error-handler-throw.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,12 @@ if (process.argv[2] === 'child') {
stderrOutput += data.toString();
});

child.on('exit', function onChildExited(exitCode, signal) {
child.on('close', function onChildClosed() {
assert(stderrOutput.indexOf(domainErrHandlerExMessage) !== -1);
assert(stderrOutput.indexOf(internalExMessage) === -1);
});

child.on('exit', function onChildExited(exitCode, signal) {
var expectedExitCode = 7;
var expectedSignal = null;

Expand Down

0 comments on commit 00b37de

Please sign in to comment.