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
Artur Vieira authored and lpinca committed May 22, 2017
1 parent 4c84734 commit e00116d
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 e00116d

Please sign in to comment.