diff --git a/test/parallel/test-cluster-worker-disconnect.js b/test/parallel/test-cluster-worker-disconnect.js index 1c5a7fc3ae51f9..71c151410cdb2c 100644 --- a/test/parallel/test-cluster-worker-disconnect.js +++ b/test/parallel/test-cluster-worker-disconnect.js @@ -58,7 +58,7 @@ if (cluster.isWorker) { // Disconnect worker when it is ready worker.once('listening', common.mustCall(() => { const w = worker.disconnect(); - assert.strictEqual(worker, w, 'did not return a reference'); + assert.strictEqual(worker, w, `${worker.id} did not return a reference`); })); // Check cluster events @@ -97,10 +97,8 @@ if (cluster.isWorker) { assert.ok(c.emitExit, 'Exit event did not emit'); // flags - assert.strictEqual(w.state, 'disconnected', - 'The state property was not set'); - assert.strictEqual(w.voluntaryMode, true, - 'Voluntary exit mode was not set'); + assert.strictEqual(w.state, 'disconnected'); + assert.strictEqual(w.voluntaryMode, true); // is process alive assert.ok(w.died, 'The worker did not die');