Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixup: throw assertion error if there is a worker error
  • Loading branch information
Trott committed Dec 24, 2015
commit 39df518c2c1e964841758e7fbe8f42ccfb0c4053
5 changes: 5 additions & 0 deletions test/parallel/test-cluster-disconnect-race.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Ref: https://github.com/nodejs/node/issues/4205

const common = require('../common');
const assert = require('assert');
const net = require('net');
const cluster = require('cluster');
cluster.schedulingPolicy = cluster.SCHED_NONE;
Expand All @@ -18,6 +19,10 @@ if (cluster.isMaster) {
worker2.on('online', common.mustCall(worker2.disconnect));
}));

cluster.on('exit', function(worker, code) {
assert.strictEqual(code, 0, 'worker exited with error');
});

return;
}

Expand Down