From 37f42a54a3521e8ad5e2b8beef642de1f10622b7 Mon Sep 17 00:00:00 2001 From: Jenna Zeigen Date: Fri, 6 Oct 2017 10:31:18 -0700 Subject: [PATCH 1/2] test: update test failure output to include exit code and signal --- test/parallel/test-cluster-server-restart-none.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/parallel/test-cluster-server-restart-none.js b/test/parallel/test-cluster-server-restart-none.js index c89ce8b67a3405..51d1de293bd426 100644 --- a/test/parallel/test-cluster-server-restart-none.js +++ b/test/parallel/test-cluster-server-restart-none.js @@ -10,15 +10,15 @@ if (cluster.isMaster) { worker1.on('listening', common.mustCall(() => { const worker2 = cluster.fork(); worker2.on('exit', (code, signal) => { - assert.strictEqual(code, 0, 'worker2 did not exit normally'); - assert.strictEqual(signal, null, 'worker2 did not exit normally'); + assert.strictEqual(code, 0, `worker2 did not exit normally. exited with code ${code}`); + assert.strictEqual(signal, null, `worker2 did not exit normally. exited with signal ${signal}`); worker1.disconnect(); }); })); worker1.on('exit', common.mustCall((code, signal) => { - assert.strictEqual(code, 0, 'worker1 did not exit normally'); - assert.strictEqual(signal, null, 'worker1 did not exit normally'); + assert.strictEqual(code, 0, `worker1 did not exit normally. exited with code ${code}`); + assert.strictEqual(signal, null, `worker1 did not exit normally. exited with signal ${signal}`); })); } else { const net = require('net'); From 4fd69e227aede8b9b74a052fdcede273ef960140 Mon Sep 17 00:00:00 2001 From: Jenna Zeigen Date: Sun, 15 Oct 2017 12:02:23 -0400 Subject: [PATCH 2/2] updated line length --- test/parallel/test-cluster-server-restart-none.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/test/parallel/test-cluster-server-restart-none.js b/test/parallel/test-cluster-server-restart-none.js index 51d1de293bd426..17ef2af9d852ef 100644 --- a/test/parallel/test-cluster-server-restart-none.js +++ b/test/parallel/test-cluster-server-restart-none.js @@ -10,15 +10,19 @@ if (cluster.isMaster) { worker1.on('listening', common.mustCall(() => { const worker2 = cluster.fork(); worker2.on('exit', (code, signal) => { - assert.strictEqual(code, 0, `worker2 did not exit normally. exited with code ${code}`); - assert.strictEqual(signal, null, `worker2 did not exit normally. exited with signal ${signal}`); + assert.strictEqual(code, 0, `worker2 did not exit normally. exited with\ + code ${code}`); + assert.strictEqual(signal, null, `worker2 did not exit normally. exited\ + with signal ${signal}`); worker1.disconnect(); }); })); worker1.on('exit', common.mustCall((code, signal) => { - assert.strictEqual(code, 0, `worker1 did not exit normally. exited with code ${code}`); - assert.strictEqual(signal, null, `worker1 did not exit normally. exited with signal ${signal}`); + assert.strictEqual(code, 0, `worker1 did not exit normally. exited with\ + code ${code}`); + assert.strictEqual(signal, null, `worker1 did not exit normally. exited\ + with signal ${signal}`); })); } else { const net = require('net');