Skip to content

Commit 8ef4fe0

Browse files
vieiraarturgjasnell
authored andcommitted
test: use dynamic port in test-dgram-send-callback-buffer
Replace common.PORT with available port assigned by the operating system in test-dgram-send-callback-buffer. PR-URL: #12942 Refs: #12376 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
1 parent 96925e1 commit 8ef4fe0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,7 @@ const onMessage = common.mustCall(function(err, bytes) {
1414
client.close();
1515
});
1616

17-
client.send(buf, common.PORT, common.localhostIPv4, onMessage);
17+
client.bind(0, () => client.send(buf,
18+
client.address().port,
19+
common.localhostIPv4,
20+
onMessage));

0 commit comments

Comments
 (0)