Skip to content

Commit 9ed5882

Browse files
Benjamin Kitargos
Benjamin Ki
authored andcommitted
test: use common.PORT instead of an extraneous variable
This test is not parallelized and so we can use the test commons PORT variable. Refs: #27565 (comment) PR-URL: #27565 Fixes: #27341 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent f01183c commit 9ed5882

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

test/internet/test-dgram-connect.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,15 @@ const { addresses } = require('../common/internet');
55
const assert = require('assert');
66
const dgram = require('dgram');
77

8-
const PORT = 12345;
9-
108
const client = dgram.createSocket('udp4');
11-
client.connect(PORT, addresses.INVALID_HOST, common.mustCall((err) => {
9+
client.connect(common.PORT, addresses.INVALID_HOST, common.mustCall((err) => {
1210
assert.ok(err.code === 'ENOTFOUND' || err.code === 'EAI_AGAIN');
1311

1412
client.once('error', common.mustCall((err) => {
1513
assert.ok(err.code === 'ENOTFOUND' || err.code === 'EAI_AGAIN');
1614
client.once('connect', common.mustCall(() => client.close()));
17-
client.connect(PORT);
15+
client.connect(common.PORT);
1816
}));
1917

20-
client.connect(PORT, addresses.INVALID_HOST);
18+
client.connect(common.PORT, addresses.INVALID_HOST);
2119
}));

0 commit comments

Comments
 (0)