Skip to content

Commit a94a75f

Browse files
jennazeeMylesBorins
authored andcommitted
test: update output to include exit code & signal
PR-URL: #15945 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com
1 parent 8eb84d6 commit a94a75f

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

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

+12-4
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,23 @@ 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,
14+
'worker2 did not exit normally. ' +
15+
`exited with code ${code}`);
16+
assert.strictEqual(signal, null,
17+
'worker2 did not exit normally. ' +
18+
`exited with signal ${signal}`);
1519
worker1.disconnect();
1620
});
1721
}));
1822

1923
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');
24+
assert.strictEqual(code, 0,
25+
'worker1 did not exit normally. ' +
26+
`exited with code ${code}`);
27+
assert.strictEqual(signal, null,
28+
'worker1 did not exit normally. ' +
29+
`exited with signal ${signal}`);
2230
}));
2331
} else {
2432
const net = require('net');

0 commit comments

Comments
 (0)