Skip to content

Commit

Permalink
test: remove common.PORT from test-net-pause
Browse files Browse the repository at this point in the history
Switch test-net-pause from common.PORT to a port assigned by the
operating system.

PR-URL: #31749
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
Trott authored and codebytere committed Feb 27, 2020
1 parent 3fbd5ab commit 87e9014
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/pummel/test-net-pause.js
Expand Up @@ -20,7 +20,7 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.

'use strict';
const common = require('../common');
require('../common');
const assert = require('assert');
const net = require('net');

Expand All @@ -43,7 +43,7 @@ const server = net.createServer((connection) => {
});

server.on('listening', () => {
const client = net.createConnection(common.PORT);
const client = net.createConnection(server.address().port);
client.setEncoding('ascii');
client.on('data', (d) => {
console.log(d);
Expand Down Expand Up @@ -83,7 +83,7 @@ server.on('listening', () => {
client.end();
});
});
server.listen(common.PORT);
server.listen(0);

process.on('exit', () => {
assert.strictEqual(recv.length, N);
Expand Down

0 comments on commit 87e9014

Please sign in to comment.