summaryrefslogtreecommitdiff
path: root/test/parallel/test-net-binary.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/parallel/test-net-binary.js')
-rw-r--r--test/parallel/test-net-binary.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/parallel/test-net-binary.js b/test/parallel/test-net-binary.js
index 484ae60c11..9a966c6428 100644
--- a/test/parallel/test-net-binary.js
+++ b/test/parallel/test-net-binary.js
@@ -1,5 +1,5 @@
/* eslint-disable strict */
-var common = require('../common');
+require('../common');
var assert = require('assert');
var net = require('net');
@@ -22,14 +22,14 @@ var echoServer = net.Server(function(connection) {
connection.end();
});
});
-echoServer.listen(common.PORT);
+echoServer.listen(0);
var recv = '';
echoServer.on('listening', function() {
var j = 0;
var c = net.createConnection({
- port: common.PORT
+ port: this.address().port
});
c.setEncoding('binary');