test: fix test-cluster-worker-disconnect

- Just let the process exit gracefully after the worker is disconnected.

Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/nodejs/io.js/pull/1919
Fixes: https://github.com/nodejs/io.js/issues/1757
pull/1991/merge
Santiago Gimeno 2015-06-08 21:18:48 +02:00 committed by Brendan Ashworth
parent 3beb880716
commit 52a822d944
1 changed files with 0 additions and 4 deletions

View File

@ -69,10 +69,6 @@ if (cluster.isWorker) {
checks.worker.emitExit = true; checks.worker.emitExit = true;
checks.worker.died = !alive(worker.process.pid); checks.worker.died = !alive(worker.process.pid);
checks.worker.emitDisconnectInsideWorker = code === 42; checks.worker.emitDisconnectInsideWorker = code === 42;
process.nextTick(function() {
process.exit(0);
});
}); });
process.once('exit', function() { process.once('exit', function() {