Skip to content

Commit c386f75

Browse files
Trottcodebytere
authored andcommitted
test: remove common.PORT from test-net-write-callbacks.js
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]>
1 parent 65729f9 commit c386f75

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/pummel/test-net-write-callbacks.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

2222
'use strict';
23-
const common = require('../common');
23+
require('../common');
2424
const net = require('net');
2525
const assert = require('assert');
2626

@@ -55,8 +55,8 @@ function makeCallback(c) {
5555
};
5656
}
5757

58-
server.listen(common.PORT, function() {
59-
const client = net.createConnection(common.PORT);
58+
server.listen(0, function() {
59+
const client = net.createConnection(server.address().port);
6060

6161
client.on('connect', function() {
6262
for (let i = 0; i < N; i++) {

0 commit comments

Comments
 (0)