Skip to content

Commit 37f42a5

Browse files
committed
test: update test failure output to include exit code and signal
1 parent 4247913 commit 37f42a5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/parallel/test-cluster-server-restart-none.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ if (cluster.isMaster) {
1010
worker1.on('listening', common.mustCall(() => {
1111
const worker2 = cluster.fork();
1212
worker2.on('exit', (code, signal) => {
13-
assert.strictEqual(code, 0, 'worker2 did not exit normally');
14-
assert.strictEqual(signal, null, 'worker2 did not exit normally');
13+
assert.strictEqual(code, 0, `worker2 did not exit normally. exited with code ${code}`);
14+
assert.strictEqual(signal, null, `worker2 did not exit normally. exited with signal ${signal}`);
1515
worker1.disconnect();
1616
});
1717
}));
1818

1919
worker1.on('exit', common.mustCall((code, signal) => {
20-
assert.strictEqual(code, 0, 'worker1 did not exit normally');
21-
assert.strictEqual(signal, null, 'worker1 did not exit normally');
20+
assert.strictEqual(code, 0, `worker1 did not exit normally. exited with code ${code}`);
21+
assert.strictEqual(signal, null, `worker1 did not exit normally. exited with signal ${signal}`);
2222
}));
2323
} else {
2424
const net = require('net');

0 commit comments

Comments
 (0)