From b53b1ac1999c2fa60670fa675ae9b96d2b575e1d Mon Sep 17 00:00:00 2001 From: Artur Vieira Date: Wed, 10 May 2017 02:02:20 +0000 Subject: [PATCH] test: replace port in dgram cb test Replaced common.PORT in the following test. test-dgram-send-callback-buffer.js Ref: nodejs#12376 --- test/parallel/test-dgram-send-callback-buffer.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/parallel/test-dgram-send-callback-buffer.js b/test/parallel/test-dgram-send-callback-buffer.js index e0b2a581bf74aa..c174e585d61282 100644 --- a/test/parallel/test-dgram-send-callback-buffer.js +++ b/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));