-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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: fix flaky test-http-set-timeout-server #6248
Conversation
On a semi-related note, is there a real reason why we don't just allow the OS to assign a free port number for tests instead of using Would it be better to modify tests to use a random free port to avoid potential issues like this? /cc @nodejs/testing |
@mscdex I think it is the correct solution. I'll update this test accordingly. The rest of the test suite will take more time. Thanks for the suggestion! |
Added a new commit so random free ports are used. @mscdex is this what you had in mind? Thanks |
5f4ca3b
to
033232a
Compare
@santigimeno Yes. |
e205926
to
6b6c67a
Compare
Rebased into a single commit. |
Perhaps even expand how |
LGTM |
I think refactoring or improving |
Make the servers listen on a free port number picked by the OS to avoid rare `EADDRINUSE` errors on `SmartOS`. Fixes: nodejs#6197 PR-URL: nodejs#6248 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
6b6c67a
to
d639bf6
Compare
Rebased. New CI: https://ci.nodejs.org/job/node-test-pull-request/2312/ |
All is green except for one of the recurrent test failures in the pi2 |
Thanks for the reviews |
Landed in 57f0595 |
Make the servers listen on a free port number picked by the OS to avoid rare `EADDRINUSE` errors on `SmartOS`. Fixes: nodejs#6197 PR-URL: nodejs#6248 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Make the servers listen on a free port number picked by the OS to avoid rare `EADDRINUSE` errors on `SmartOS`. Fixes: nodejs#6197 PR-URL: nodejs#6248 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Checklist
Affected core subsystem(s)
test
Description of change
Use different port numbers for every connection to avoid rare
EADDRINUSE
errors onSmartOS
.Fixes: #6197