Skip to content

Commit 1933efa

Browse files
Trottcodebytere
authored andcommittedFeb 27, 2020
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 <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Shelley Vohr <codebytere@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
1 parent f2389eb commit 1933efa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

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

+3-3
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)
Please sign in to comment.