Skip to content

Commit

Permalink
test: use dynamic port in test-dgram-send-callback-buffer
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
arturgvieira authored and MylesBorins committed Jul 17, 2017
1 parent 37e1929 commit 7909c6d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/parallel/test-dgram-send-callback-buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@ const onMessage = common.mustCall(function(err, bytes) {
client.close();
});

client.send(buf, common.PORT, common.localhostIPv4, onMessage);
client.bind(0, () => client.send(buf,
client.address().port,
common.localhostIPv4,
onMessage));

0 comments on commit 7909c6d

Please sign in to comment.