mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00
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: https://github.com/nodejs/node/pull/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>
This commit is contained in:
parent
2d3717ad84
commit
1c4e984ed9
1 changed files with 3 additions and 3 deletions
|
@ -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');
|
||||
|
||||
|
@ -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++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue