Skip to content

Commit

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

PR-URL: #31839
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Shelley Vohr <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
  • Loading branch information
Trott authored and codebytere committed Feb 27, 2020
1 parent f2389eb commit 1933efa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/pummel/test-net-write-callbacks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down Expand Up @@ -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++) {
Expand Down

0 comments on commit 1933efa

Please sign in to comment.