Skip to content

Commit 1d35965

Browse files
vieiraarturgMylesBorins
authored andcommitted
test: bind to 0 in dgram-send-callback-buffer-length
Remove common.PORT from test-dgram-send-callback-buffer-length to eliminate possibility that a dynamic port used in another test will collide with common.PORT. PR-URL: #12943 Refs: #12376 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
1 parent 7909c6d commit 1d35965

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/parallel/test-dgram-send-callback-buffer-length.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,7 @@ const messageSent = common.mustCall(function messageSent(err, bytes) {
1717
client.close();
1818
});
1919

20-
client.send(buf, offset, len, common.PORT, '127.0.0.1', messageSent);
20+
client.bind(0, () => client.send(buf, offset, len,
21+
client.address().port,
22+
'127.0.0.1',
23+
messageSent));

0 commit comments

Comments
 (0)