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 <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <mhdawson@ibm.com>
  • Loading branch information
arturgvieira authored and jasnell committed May 23, 2017
1 parent 96925e1 commit 8ef4fe0
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 8ef4fe0

Please sign in to comment.