From a2022142b1442a8cede06320ce3907138b313859 Mon Sep 17 00:00:00 2001 From: Hadis-Fard Date: Fri, 6 Oct 2017 12:06:04 -0700 Subject: [PATCH 1/3] imporoved assert message on cluster-worker-disconnect --- test/parallel/test-cluster-worker-disconnect.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-cluster-worker-disconnect.js b/test/parallel/test-cluster-worker-disconnect.js index 1c5a7fc3ae51f9..9d9a98d02f21d0 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 @@ -98,9 +98,9 @@ if (cluster.isWorker) { // flags assert.strictEqual(w.state, 'disconnected', - 'The state property was not set'); + 'The state property was not set, current state is ${w.state}'); assert.strictEqual(w.voluntaryMode, true, - 'Voluntary exit mode was not set'); + 'Voluntary exit mode was not set, current voluntary mode is ${w.voluntaryMode}'); // is process alive assert.ok(w.died, 'The worker did not die'); From dbf78b62c42edc12a29e8a00a9ff776f3e2d0c3e Mon Sep 17 00:00:00 2001 From: Hadis-Fard Date: Mon, 23 Oct 2017 09:52:52 -0700 Subject: [PATCH 2/3] removed messages from strict equal --- test/parallel/test-cluster-worker-disconnect.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/parallel/test-cluster-worker-disconnect.js b/test/parallel/test-cluster-worker-disconnect.js index 9d9a98d02f21d0..d8b4e618f2ac7b 100644 --- a/test/parallel/test-cluster-worker-disconnect.js +++ b/test/parallel/test-cluster-worker-disconnect.js @@ -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, current state is ${w.state}'); - assert.strictEqual(w.voluntaryMode, true, - 'Voluntary exit mode was not set, current voluntary mode is ${w.voluntaryMode}'); + assert.strictEqual(w.state, 'disconnected'); + assert.strictEqual(w.voluntaryMode, true); // is process alive assert.ok(w.died, 'The worker did not die'); From 5ea39adbc7fa2f5599246108a9b1b26e8adabcd8 Mon Sep 17 00:00:00 2001 From: Hadis-Fard Date: Mon, 23 Oct 2017 10:56:40 -0700 Subject: [PATCH 3/3] changed single qoute to backtick --- test/parallel/test-cluster-worker-disconnect.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-cluster-worker-disconnect.js b/test/parallel/test-cluster-worker-disconnect.js index d8b4e618f2ac7b..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, '${worker.id} did not return a reference'); + assert.strictEqual(worker, w, `${worker.id} did not return a reference`); })); // Check cluster events