File tree Expand file tree Collapse file tree 1 file changed +20
-4
lines changed
Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -10,15 +10,31 @@ 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(
14+ code,
15+ 0,
16+ `worker${worker2.id} did not exit normally. Exit with code: ${code}`
17+ );
18+ assert.strictEqual(
19+ signal,
20+ null,
21+ `worker${worker2.id} did not exit normally. Exit with signal: ${signal}`
22+ );
1523 worker1.disconnect();
1624 });
1725 }));
1826
1927 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');
28+ assert.strictEqual(
29+ code,
30+ 0,
31+ `worker${worker1.id} did not exit normally. Exit with code: ${code}`
32+ );
33+ assert.strictEqual(
34+ signal,
35+ null,
36+ `worker${worker1.id} did not exit normally. Exit with code: ${signal}`
37+ );
2238 }));
2339} else {
2440 const net = require('net');
You can’t perform that action at this time.
0 commit comments