From 511ee24310532a90b297bb05bf07f3307ac7d5c5 Mon Sep 17 00:00:00 2001 From: Artur Vieira Date: Wed, 10 May 2017 03:45:13 +0000 Subject: [PATCH] test: remove common.PORT from dgram test Remove common.PORT from test-dgram-send-callback-buffer-length-empty-address to eliminate possibility that a dynamic port used in another test will collide with common.PORT. PR-URL: https://github.com/nodejs/node/pull/12944 Refs: https://github.com/nodejs/node/issues/12376 Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: Michael Dawson --- .../test-dgram-send-callback-buffer-length-empty-address.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/parallel/test-dgram-send-callback-buffer-length-empty-address.js b/test/parallel/test-dgram-send-callback-buffer-length-empty-address.js index 1a555f37a9079b..544f66702494da 100644 --- a/test/parallel/test-dgram-send-callback-buffer-length-empty-address.js +++ b/test/parallel/test-dgram-send-callback-buffer-length-empty-address.js @@ -17,4 +17,6 @@ const onMessage = common.mustCall(function messageSent(err, bytes) { client.close(); }); -client.send(buf, offset, len, common.PORT, onMessage); +client.bind(0, () => client.send(buf, offset, len, + client.address().port, + onMessage));