Lines Matching defs:cluster
26 const cluster = require('node:cluster');
39 strictEqual(require('cluster').isPrimary, true);
52 if (cluster.isWorker) {
54 } else if (cluster.isPrimary) {
57 cluster: {
95 forEach(checks.cluster.events, (bool, name, index) => {
98 cluster.on(name, common.mustCall(function(/* worker */) {
101 checks.cluster.events[name] = true;
104 checks.cluster.equal[name] = worker === arguments[0];
113 cluster.on('listening', common.mustCall(() => {
118 cluster.on('exit', common.mustCall());
121 const worker = cluster.fork();
123 assert(worker instanceof cluster.Worker,
164 // Check cluster events
165 forEach(checks.cluster.events, (check, name) => {
167 `The cluster event "${name}" on the cluster object did not fire`);
170 // Check cluster event arguments
171 forEach(checks.cluster.equal, (check, name) => {
173 `The cluster event "${name}" did not emit with correct argument`);