-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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: remove common.PORT
from gc tests
#7013
Conversation
LGTM |
|
||
function getall() { | ||
if (count >= todo) | ||
return; | ||
|
||
(function() { | ||
var req = net.connect(PORT, '127.0.0.1'); | ||
var req = net.connect(server.address().port, '127.0.0.1'); |
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.
While you're here, can you remove the bind address? If the server binds to ::1, connecting to 127.0.0.1 doesn't have to work.
EDIT: Ideally, tests connect to { host: server.address().address, port: server.address().port }
.
LGTM with comments addressed. |
LGTM |
Allow the operating system to provide an arbitrary available port rather than using `common.PORT`, as `common.PORT` makes it likely that a test will fail with `EADDRINUSE` as a side effect of an earlier test.
LGTM. The comment about |
Optimistic CI re-run: https://ci.nodejs.org/job/node-test-pull-request/2866/ |
Allow the operating system to provide an arbitrary available port rather than using `common.PORT`, as `common.PORT` makes it likely that a test will fail with `EADDRINUSE` as a side effect of an earlier test. PR-URL: nodejs#7013 Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Landed in 3b8e342 |
Allow the operating system to provide an arbitrary available port rather than using `common.PORT`, as `common.PORT` makes it likely that a test will fail with `EADDRINUSE` as a side effect of an earlier test. PR-URL: #7013 Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Allow the operating system to provide an arbitrary available port rather than using `common.PORT`, as `common.PORT` makes it likely that a test will fail with `EADDRINUSE` as a side effect of an earlier test. PR-URL: #7013 Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Allow the operating system to provide an arbitrary available port rather than using `common.PORT`, as `common.PORT` makes it likely that a test will fail with `EADDRINUSE` as a side effect of an earlier test. PR-URL: #7013 Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Allow the operating system to provide an arbitrary available port rather than using `common.PORT`, as `common.PORT` makes it likely that a test will fail with `EADDRINUSE` as a side effect of an earlier test. PR-URL: #7013 Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Allow the operating system to provide an arbitrary available port rather than using `common.PORT`, as `common.PORT` makes it likely that a test will fail with `EADDRINUSE` as a side effect of an earlier test. PR-URL: #7013 Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Allow the operating system to provide an arbitrary available port rather than using `common.PORT`, as `common.PORT` makes it likely that a test will fail with `EADDRINUSE` as a side effect of an earlier test. PR-URL: #7013 Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Allow the operating system to provide an arbitrary available port rather than using `common.PORT`, as `common.PORT` makes it likely that a test will fail with `EADDRINUSE` as a side effect of an earlier test. PR-URL: #7013 Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Checklist
Affected core subsystem(s)
test
Description of change
Allow the operating system to provide an arbitrary available port rather
than using
common.PORT
, ascommon.PORT
makes it likely that a testwill fail with
EADDRINUSE
as a side effect of an earlier test.R=@mscdex