From dd3c22779690d2f1449d7989c8173d59c650746a Mon Sep 17 00:00:00 2001 From: Artur Vieira Date: Wed, 10 May 2017 02:26:50 +0000 Subject: [PATCH] test: bind to 0 in dgram-send-callback-buffer-length 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: https://github.com/nodejs/node/pull/12943 Refs: https://github.com/nodejs/node/issues/12376 Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: Michael Dawson --- test/parallel/test-dgram-send-callback-buffer-length.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/parallel/test-dgram-send-callback-buffer-length.js b/test/parallel/test-dgram-send-callback-buffer-length.js index f409d26663..bf1b351df3 100644 --- a/test/parallel/test-dgram-send-callback-buffer-length.js +++ b/test/parallel/test-dgram-send-callback-buffer-length.js @@ -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));