From 96925e1b9329863622d3bdc36b8a6c27b2f5050d Mon Sep 17 00:00:00 2001 From: Artur Vieira Date: Wed, 10 May 2017 23:17:24 +0000 Subject: [PATCH] test: replace common.PORT in dgram test Replace common.PORT with available port assigned by the operating system in test-dgram-send-callback-buffer-empty-address. PR-URL: https://github.com/nodejs/node/pull/12929 Refs: https://github.com/nodejs/node/issues/12376 Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca --- test/parallel/test-dgram-send-callback-buffer-empty-address.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-dgram-send-callback-buffer-empty-address.js b/test/parallel/test-dgram-send-callback-buffer-empty-address.js index 67e64d6bfefd8c..5b3b1c41a1917c 100644 --- a/test/parallel/test-dgram-send-callback-buffer-empty-address.js +++ b/test/parallel/test-dgram-send-callback-buffer-empty-address.js @@ -14,4 +14,4 @@ const onMessage = common.mustCall(function(err, bytes) { client.close(); }); -client.send(buf, common.PORT, onMessage); +client.bind(0, () => client.send(buf, client.address().port, onMessage));