summaryrefslogtreecommitdiff
path: root/test/parallel/test-http-client-abort2.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/parallel/test-http-client-abort2.js')
-rw-r--r--test/parallel/test-http-client-abort2.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/parallel/test-http-client-abort2.js b/test/parallel/test-http-client-abort2.js
index 477d12b258..9caa9d0a78 100644
--- a/test/parallel/test-http-client-abort2.js
+++ b/test/parallel/test-http-client-abort2.js
@@ -1,13 +1,13 @@
'use strict';
-var common = require('../common');
+require('../common');
var http = require('http');
var server = http.createServer(function(req, res) {
res.end('Hello');
});
-server.listen(common.PORT, function() {
- var req = http.get({port: common.PORT}, function(res) {
+server.listen(0, function() {
+ var req = http.get({port: this.address().port}, function(res) {
res.on('data', function(data) {
req.abort();
server.close();