Skip to content

Commit b92e0f6

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 e099865 commit b92e0f6

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
@@ -33,10 +33,6 @@ test-performance-function: PASS, FLAKY
3333
# https://github.com/nodejs/node/issues/54346
3434
test-esm-loader-hooks-inspect-wait: PASS, FLAKY
3535

36-
[$system==macos]
37-
# https://github.com/nodejs/node/issues/60050
38-
test-cluster-dgram-1: SKIP
39-
4036
[$arch==arm || $arch==arm64]
4137
# https://github.com/nodejs/node/pull/31178
4238
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)