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>
This commit is contained in:
parent
4c847347c3
commit
e00116d2c4
@ -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…
x
Reference in New Issue
Block a user