Skip to content

Commit

Permalink
test: bind to 0 in dgram-send-callback-buffer-length
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
arturgvieira authored and jasnell committed May 23, 2017
1 parent d202407 commit d714861
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/parallel/test-dgram-send-callback-buffer-length.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,7 @@ const messageSent = common.mustCall(function messageSent(err, bytes) {
client.close();
});

client.send(buf, offset, len, common.PORT, '127.0.0.1', messageSent);
client.bind(0, () => client.send(buf, offset, len,
client.address().port,
'127.0.0.1',
messageSent));

0 comments on commit d714861

Please sign in to comment.