Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/async-hooks/test-graph.tcp.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const server = net
.createServer(common.mustCall(onconnection))
.on('listening', common.mustCall(onlistening));

server.listen(common.PORT);
server.listen(0);

net.connect({ port: server.address().port, host: '::1' },
common.mustCall(onconnected));
Expand Down
4 changes: 2 additions & 2 deletions test/async-hooks/test-graph.tls-write.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ const server = tls
})
.on('listening', common.mustCall(onlistening))
.on('secureConnection', common.mustCall(onsecureConnection))
.listen(common.PORT);
.listen(0);

function onlistening() {
//
// Creating client and connecting it to server
//
tls
.connect(common.PORT, { rejectUnauthorized: false })
.connect(server.address().port, { rejectUnauthorized: false })
.on('secureConnect', common.mustCall(onsecureConnect));
}

Expand Down
2 changes: 1 addition & 1 deletion test/async-hooks/test-tcpwrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const server = net

// Calling server.listen creates a TCPWRAP synchronously
{
server.listen(common.PORT);
server.listen(0);
const tcpsservers = hooks.activitiesOfTypes('TCPSERVERWRAP');
const tcpconnects = hooks.activitiesOfTypes('TCPCONNECTWRAP');
assert.strictEqual(tcpsservers.length, 1);
Expand Down
4 changes: 2 additions & 2 deletions test/async-hooks/test-writewrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const server = tls
})
.on('listening', common.mustCall(onlistening))
.on('secureConnection', common.mustCall(onsecureConnection))
.listen(common.PORT);
.listen(0);

assert.strictEqual(hooks.activitiesOfTypes('WRITEWRAP').length, 0);

Expand All @@ -33,7 +33,7 @@ function onlistening() {
// Creating client and connecting it to server
//
tls
.connect(common.PORT, { rejectUnauthorized: false })
.connect(server.address().port, { rejectUnauthorized: false })
.on('secureConnect', common.mustCall(onsecureConnect));

assert.strictEqual(hooks.activitiesOfTypes('WRITEWRAP').length, 0);
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-net-connect-immediate-finish.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ const {

const client = net.connect({
host: addresses.INVALID_HOST,
port: common.PORT,
port: 80, // port number doesn't matter because host name is invalid
lookup: common.mustCall(errorLookupMock())
});
}, common.mustNotCall());

client.once('error', common.mustCall((err) => {
assert(err);
Expand Down
File renamed without changes.
File renamed without changes.