Skip to content

Commit 04ffe27

Browse files
gegham1aduh95
authored andcommitted
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: #60050 Signed-off-by: gegham1 <geghamayvazyan9@gmail.com> PR-URL: #66986 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Tim Perry <pimterry@gmail.com>
1 parent f5f18c7 commit 04ffe27

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

‎test/parallel/parallel.status‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ test-fs-cp-async-symlink-points-to-dest: SKIP
2626

2727
[$system==linux]
2828

29-
[$system==macos]
30-
# https://github.com/nodejs/node/issues/60050
31-
test-cluster-dgram-1: SKIP
32-
3329
[$arch==arm || $arch==arm64]
3430
# https://github.com/nodejs/node/pull/31178
3531
test-crypto-dh-stateless: SKIP

‎test/parallel/test-cluster-dgram-1.js‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,12 @@ function primary() {
5656
doSend();
5757

5858
function doSend() {
59-
socket.send(buf, 0, buf.length, address.port, address.address, afterSend);
59+
socket.send(buf, 0, buf.length, address.port, common.localhostIPv4, afterSend);
6060
}
6161

62-
function afterSend() {
62+
function afterSend(error) {
63+
assert.strictEqual(error, null);
64+
6365
sent++;
6466
if (sent < NUM_WORKERS * PACKETS_PER_WORKER) {
6567
doSend();

0 commit comments

Comments
 (0)