Skip to content
Prev Previous commit
Next Next commit
Moved the assertion to the when the cluster is exiting
  • Loading branch information
Bar Admoni
Bar Admoni committed Feb 4, 2022
commit 13902f2ff5411d520e15f6d05685275f239039a9
2 changes: 2 additions & 0 deletions test/parallel/test-cluster-worker-kill-signal.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ if (cluster.isWorker) {
results.signalCode = signalCode;
results.emitExit += 1;
results.died = !common.isAlive(worker.process.pid);
}));

cluster.on('exit', common.mustCall(() => {
// Checking if the results are as expected
for (const [key, expected] of Object.entries(expectedResults)) {
const actual = results[key];
Expand Down