-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: use port 0 instead of common.PORT #9572
Conversation
Thanks. CI is running on https://ci.nodejs.org/job/node-test-pull-request/4827/ . |
}).listen(common.PORT, common.mustCall(() => { | ||
const url = `http://localhost:${common.PORT}`; | ||
}).listen(0, common.mustCall(() => { | ||
const url = `http://localhost:${server.address().port}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you use server.address().address
too?
@cjihrig Thank you for your feedback. I committed some changes, could you see again? |
const url = `http://localhost:${common.PORT}`; | ||
}).listen(0, common.mustCall(() => { | ||
const addr = server.address().address; | ||
const host = net.isIPv6(addr) ? `[${addr}]` : addr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: can you rename this to hostname
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I changed the name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI failure seems relevant.... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI is green. LGTM.
@saitoxu Could you squash these commits into one? The commit title is like |
Use port 0 instead of common.PORT, and use server address instead of localhost to follow writing test guideline. This is a part of Code And Learn at NodeFest 2016 Challenge in Tokyo. PR-URL: nodejs#9572
b13d6f9
to
00597b3
Compare
Use port 0 instead of common.PORT, and use server address instead of localhost to follow writing test guideline. This is a part of Code And Learn at NodeFest 2016 Challenge in Tokyo. PR-URL: #9572 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Shigeki Ohtsu <[email protected]> Reviewed-By: James M Snell <[email protected]>
CI failures are unrelated. Landed in c9509ac. |
Use port 0 instead of common.PORT, and use server address instead of localhost to follow writing test guideline. This is a part of Code And Learn at NodeFest 2016 Challenge in Tokyo. PR-URL: #9572 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Shigeki Ohtsu <[email protected]> Reviewed-By: James M Snell <[email protected]>
Use port 0 instead of common.PORT, and use server address instead of localhost to follow writing test guideline. This is a part of Code And Learn at NodeFest 2016 Challenge in Tokyo. PR-URL: nodejs#9572 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Shigeki Ohtsu <[email protected]> Reviewed-By: James M Snell <[email protected]>
Use port 0 instead of common.PORT, and use server address instead of localhost to follow writing test guideline. This is a part of Code And Learn at NodeFest 2016 Challenge in Tokyo. PR-URL: #9572 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Shigeki Ohtsu <[email protected]> Reviewed-By: James M Snell <[email protected]>
Use port 0 instead of common.PORT, and use server address instead of localhost to follow writing test guideline. This is a part of Code And Learn at NodeFest 2016 Challenge in Tokyo. PR-URL: #9572 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Shigeki Ohtsu <[email protected]> Reviewed-By: James M Snell <[email protected]>
Use port 0 instead of common.PORT, and use server address instead of localhost to follow writing test guideline. This is a part of Code And Learn at NodeFest 2016 Challenge in Tokyo. PR-URL: #9572 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Shigeki Ohtsu <[email protected]> Reviewed-By: James M Snell <[email protected]>
Checklist
make -j8 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
Description of change
Use port 0 instead of common.PORT to follow writing test guideline.
This is a part of Code And Learn at NodeFest 2016 Challenge in Tokyo.