From 2bc7841d0fcdd066fe477873229125b6f003b693 Mon Sep 17 00:00:00 2001 From: Brian White Date: Sun, 29 May 2016 03:06:56 -0400 Subject: 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 Reviewed-By: Matteo Collina Reviewed-By: Rod Vagg --- test/parallel/test-http-destroyed-socket-write2.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/parallel/test-http-destroyed-socket-write2.js') diff --git a/test/parallel/test-http-destroyed-socket-write2.js b/test/parallel/test-http-destroyed-socket-write2.js index 7588393840..7d2f235a27 100644 --- a/test/parallel/test-http-destroyed-socket-write2.js +++ b/test/parallel/test-http-destroyed-socket-write2.js @@ -12,9 +12,9 @@ var server = http.createServer(function(req, res) { }); }); -server.listen(common.PORT, function() { +server.listen(0, function() { var req = http.request({ - port: common.PORT, + port: this.address().port, path: '/', method: 'POST' }); -- cgit v1.2.3