Skip to content
Permalink
Browse files

test: remove common.PORT from test-net-pause

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 committed Feb 12, 2020
1 parent a092886 commit af19f4116c5c3ce0fc7b18b62ffb05e8138bf74b
Showing with 3 additions and 3 deletions.
  1. +3 −3 test/pummel/test-net-pause.js
@@ -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');

@@ -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);
@@ -83,7 +83,7 @@ server.on('listening', () => {
client.end();
});
});
server.listen(common.PORT);
server.listen(0);

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

0 comments on commit af19f41

Please sign in to comment.
You can’t perform that action at this time.