test: fix domain-top-level-error-handler-throw
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: https://github.com/nodejs/node/pull/4364 Reviewed-By: Julien Gilli <jgilli@fastmail.fm>
This commit is contained in:
parent
7fac47c94a
commit
cf503052bf
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user