summaryrefslogtreecommitdiff
path: root/test/parallel/test-handle-wrap-isrefed.js
diff options
context:
space:
mode:
authorBrian White <mscdex@mscdex.net>2016-05-29 03:06:56 -0400
committerEvan Lucas <evanlucas@me.com>2016-06-15 18:12:31 -0500
commiteded11705b30b8e07df3f17af2661ebf0fc8ec6b (patch)
treef435a43645c4095a92add479a6b31e7621836e26 /test/parallel/test-handle-wrap-isrefed.js
parent27ed7fc56c24cac8bc2622a39e8902a888d984e5 (diff)
downloadnode-new-eded11705b30b8e07df3f17af2661ebf0fc8ec6b.tar.gz
test: use random ports where possible
This helps to prevent issues where a failed test can keep a bound socket open long enough to cause other tests to fail with EADDRINUSE because the same port number is used. PR-URL: https://github.com/nodejs/node/pull/7045 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org>
Diffstat (limited to 'test/parallel/test-handle-wrap-isrefed.js')
-rw-r--r--test/parallel/test-handle-wrap-isrefed.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/parallel/test-handle-wrap-isrefed.js b/test/parallel/test-handle-wrap-isrefed.js
index a308ab6944..b5dbeb23bf 100644
--- a/test/parallel/test-handle-wrap-isrefed.js
+++ b/test/parallel/test-handle-wrap-isrefed.js
@@ -72,7 +72,7 @@ function makeAssert(message) {
{
const assert = makeAssert('hasRef() not working on tcp_wrap');
const net = require('net');
- const server = net.createServer(() => {}).listen(common.PORT);
+ const server = net.createServer(() => {}).listen(0);
assert(Object.getPrototypeOf(server._handle).hasOwnProperty('hasRef'), true);
assert(server._handle.hasRef(), true);
assert(server._unref, false);