diff --git a/test/pummel/test-net-write-callbacks.js b/test/pummel/test-net-write-callbacks.js index 0bcc9e2dec121a..cb011ab0022251 100644 --- a/test/pummel/test-net-write-callbacks.js +++ b/test/pummel/test-net-write-callbacks.js @@ -20,7 +20,7 @@ // USE OR OTHER DEALINGS IN THE SOFTWARE. 'use strict'; -const common = require('../common'); +require('../common'); const net = require('net'); const assert = require('assert'); @@ -55,8 +55,8 @@ function makeCallback(c) { }; } -server.listen(common.PORT, function() { - const client = net.createConnection(common.PORT); +server.listen(0, function() { + const client = net.createConnection(server.address().port); client.on('connect', function() { for (let i = 0; i < N; i++) {