Skip to content

Commit 8a4f3b7

Browse files
vieiraarturgjasnell
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 9fc47de commit 8a4f3b7

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,7 @@ const messageSent = common.mustCall(function messageSent(err, bytes) {
3838
client.close();
3939
});
4040

41-
client.send(buf, offset, len, common.PORT, '127.0.0.1', messageSent);
41+
client.bind(0, () => client.send(buf, offset, len,
42+
client.address().port,
43+
'127.0.0.1',
44+
messageSent));

0 commit comments

Comments
 (0)