Skip to content
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

Closed
wants to merge 2 commits into from
Closed

Conversation

Trott
Copy link
Member

@Trott Trott commented May 27, 2016

Checklist
  • tests and code linting passes
  • the commit message follows commit guidelines
Affected core subsystem(s)

test

Description of change

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.

R=@mscdex

@Trott Trott added the test Issues and PRs related to the tests. label May 27, 2016
@mscdex
Copy link
Contributor

mscdex commented May 27, 2016

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');
Copy link
Member

@bnoordhuis bnoordhuis May 27, 2016

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 }.

@cjihrig
Copy link
Contributor

cjihrig commented May 27, 2016

LGTM with comments addressed.

@jasnell
Copy link
Member

jasnell commented May 27, 2016

LGTM

Trott added 2 commits May 29, 2016 19:49
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.
@Trott
Copy link
Member Author

Trott commented May 30, 2016

@bnoordhuis
Copy link
Member

LGTM. The comment about server.address().address is more widely applicable but it doesn't really matter.

@Trott
Copy link
Member Author

Trott commented May 30, 2016

Optimistic CI re-run: https://ci.nodejs.org/job/node-test-pull-request/2866/

Trott added a commit to Trott/io.js that referenced this pull request May 31, 2016
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>
@Trott
Copy link
Member Author

Trott commented May 31, 2016

Landed in 3b8e342

@Trott Trott closed this May 31, 2016
Fishrock123 pushed a commit that referenced this pull request Jun 1, 2016
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>
rvagg pushed a commit that referenced this pull request Jun 2, 2016
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>
MylesBorins pushed a commit that referenced this pull request Jul 11, 2016
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>
MylesBorins pushed a commit that referenced this pull request Jul 12, 2016
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>
MylesBorins pushed a commit that referenced this pull request Jul 12, 2016
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>
@MylesBorins MylesBorins mentioned this pull request Jul 12, 2016
MylesBorins pushed a commit that referenced this pull request Jul 14, 2016
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>
MylesBorins pushed a commit that referenced this pull request Jul 14, 2016
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>
@Trott Trott deleted the countdown branch January 13, 2022 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants