summaryrefslogtreecommitdiff
path: root/test/parallel/test-async-wrap-check-providers.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/parallel/test-async-wrap-check-providers.js')
-rw-r--r--test/parallel/test-async-wrap-check-providers.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/test/parallel/test-async-wrap-check-providers.js b/test/parallel/test-async-wrap-check-providers.js
index 5125890f99..7591e5799e 100644
--- a/test/parallel/test-async-wrap-check-providers.js
+++ b/test/parallel/test-async-wrap-check-providers.js
@@ -81,12 +81,12 @@ net.createServer(function(c) {
net.createServer(function(c) {
c.end();
this.close(checkTLS);
-}).listen(common.PORT, function() {
- net.connect(common.PORT, noop);
+}).listen(0, function() {
+ net.connect(this.address().port, noop);
});
-dgram.createSocket('udp4').bind(common.PORT, function() {
- this.send(Buffer.allocUnsafe(2), 0, 2, common.PORT, '::', () => {
+dgram.createSocket('udp4').bind(0, function() {
+ this.send(Buffer.allocUnsafe(2), 0, 2, this.address().port, '::', () => {
this.close();
});
});
@@ -100,8 +100,9 @@ function checkTLS() {
cert: fs.readFileSync(common.fixturesDir + '/keys/ec-cert.pem')
};
const server = tls.createServer(options, noop)
- .listen(common.PORT, function() {
- tls.connect(common.PORT, { rejectUnauthorized: false }, function() {
+ .listen(0, function() {
+ const connectOpts = { rejectUnauthorized: false };
+ tls.connect(this.address().port, connectOpts, function() {
this.destroy();
server.close();
});