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
Artur Vieira 8 years ago
committed by Luigi Pinca
parent
commit
e00116d2c4
  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