From bb22360bec4e05bb62196a09069f55f2024e5067 Mon Sep 17 00:00:00 2001 From: gegham1 Date: Sat, 24 Oct 2026 21:59:42 +0400 Subject: [PATCH] test: fix cluster dgram 1 test on macos Send to localhostIPv4 instead of 0.0.0.0. Add strict null equality assert on socket send callback error for failing fast in such cases. Fixes: https://github.com/nodejs/node/issues/60050 Signed-off-by: gegham1 --- test/parallel/parallel.status | 4 ---- test/parallel/test-cluster-dgram-1.js | 6 ++++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/test/parallel/parallel.status b/test/parallel/parallel.status index 15fc53543b03..1d183d622496 100644 --- a/test/parallel/parallel.status +++ b/test/parallel/parallel.status @@ -26,10 +26,6 @@ test-fs-cp-async-symlink-points-to-dest: SKIP [$system==linux] -[$system==macos] -# https://github.com/nodejs/node/issues/60050 -test-cluster-dgram-1: SKIP - [$arch==arm || $arch==arm64] # https://github.com/nodejs/node/pull/31178 test-crypto-dh-stateless: SKIP diff --git a/test/parallel/test-cluster-dgram-1.js b/test/parallel/test-cluster-dgram-1.js index 71dcb2accb29..8c18cb1de6c6 100644 --- a/test/parallel/test-cluster-dgram-1.js +++ b/test/parallel/test-cluster-dgram-1.js @@ -56,10 +56,12 @@ function primary() { doSend(); function doSend() { - socket.send(buf, 0, buf.length, address.port, address.address, afterSend); + socket.send(buf, 0, buf.length, address.port, common.localhostIPv4, afterSend); } - function afterSend() { + function afterSend(error) { + assert.strictEqual(error, null); + sent++; if (sent < NUM_WORKERS * PACKETS_PER_WORKER) { doSend();