Browse Source

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: https://github.com/nodejs/node/pull/12942
Refs: https://github.com/nodejs/node/issues/12376
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <mhdawson@ibm.com>
v6.x
Artur Vieira 8 years ago
committed by Myles Borins
parent
commit
7909c6d46f
No known key found for this signature in database GPG Key ID: 933B01F40B5CA946
  1. 5
      test/parallel/test-dgram-send-callback-buffer.js

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

@ -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));

Loading…
Cancel
Save