Skip to content
Closed
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
test: do not use fixed port in async-hooks/test-httparser-reuse
Otherwise this was failing on machines which already had a service
running on port 3000.
  • Loading branch information
addaleax committed Jun 20, 2019
commit 7aaed2471790dcc87b13a32b9b722abfe2c5f075
7 changes: 3 additions & 4 deletions test/async-hooks/test-httparser-reuse.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,9 @@ const server = http.createServer((req, res) => {
res.end();
});

const PORT = 3000;
const url = `http://127.0.0.1:${PORT}`;

server.listen(PORT, common.mustCall(() => {
server.listen(0, common.mustCall(() => {
const PORT = server.address().port;
const url = `http://127.0.0.1:${PORT}`;
http.get(url, common.mustCall(() => {
server.close(common.mustCall(() => {
server.listen(PORT, common.mustCall(() => {
Expand Down