Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e7966bc

Browse filesBrowse files
MurkyMeowtargos
authored andcommitted
test: unhardcode server port
This is needed to avoid possible conflicts when running multiple tests in parallel PR-URL: #27908 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
1 parent b83571d commit e7966bc
Copy full SHA for e7966bc

File tree

Expand file treeCollapse file tree

1 file changed

+9
-9
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+9
-9
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-http-server-delete-parser.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-http-server-delete-parser.js
+9-9Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ const server = http.createServer(common.mustCall((req, res) => {
1212
res.end();
1313
}));
1414

15-
server.listen(1337, '127.0.0.1');
16-
server.unref();
17-
18-
const req = http.request({
19-
port: 1337,
20-
host: '127.0.0.1',
21-
method: 'GET',
22-
});
15+
server.listen(0, '127.0.0.1', common.mustCall(() => {
16+
const req = http.request({
17+
port: server.address().port,
18+
host: '127.0.0.1',
19+
method: 'GET',
20+
});
21+
req.end();
22+
}));
2323

24-
req.end();
24+
server.unref();

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.