Skip to content

test: don't connect to :: (use localhost instead) - #10854

Closed
gibfahn wants to merge 1 commit into
nodejs:masterfrom
gibfahn:listen-localhost
Closed

test: don't connect to :: (use localhost instead)#10854
gibfahn wants to merge 1 commit into
nodejs:masterfrom
gibfahn:listen-localhost

Conversation

@gibfahn

Copy link
Copy Markdown
Member

If a test does http.listen(0) or net.listen(0),
http.listen(0).address().address returns '::'. Some machines will
resolve this to localhost, but not all. Every machine should have
localhost defined in /etc/hosts (or equivalent), so it should always
resolve.

Fixes: #7291

Fixed

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

test

cc/ @cjihrig in reply to #9572 (comment), you can't use server.address().address.

cc/ @nodejs/testing

If a test does http.listen(0) or net.listen(0),
http.listen(0).address().address returns '::'. Some machines will
resolve this to localhost, but not all. Every machine should have
localhost defined in /etc/hosts (or equivalent), so it should always
resolve.
Fixes: nodejs#7291
@gibfahngibfahn added the test Issues and PRs related to the tests. label Jan 17, 2017
@nodejs-github-botnodejs-github-bot added test Issues and PRs related to the tests. lts-watch-v6.x labels Jan 17, 2017
@gibfahn

Copy link
Copy Markdown
MemberAuthor

This should (assuming it's a good idea) supersede #7781 and #7869

@gibfahn

gibfahn commented Jan 17, 2017

Copy link
Copy Markdown
MemberAuthor

CI: https://ci.nodejs.org/job/node-test-commit/7299/

EDIT: CI is green

@mscdexmscdex added http Issues or PRs related to the http subsystem. net Issues and PRs related to the net subsystem. labels Jan 17, 2017
jasnell pushed a commit that referenced this pull request Jan 23, 2017
If a test does http.listen(0) or net.listen(0),
http.listen(0).address().address returns '::'. Some machines will
resolve this to localhost, but not all. Every machine should have
localhost defined in /etc/hosts (or equivalent), so it should always
resolve.
Fixes: #7291
PR-URL: #10854
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michal Zasso <targos@protonmail.com>
@jasnell

Copy link
Copy Markdown
Member

Landed in 067be65

@jasnelljasnell closed this Jan 23, 2017
@gibfahn
gibfahn deleted the listen-localhost branch January 23, 2017 11:16
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 25, 2017
If a test does http.listen(0) or net.listen(0),
http.listen(0).address().address returns '::'. Some machines will
resolve this to localhost, but not all. Every machine should have
localhost defined in /etc/hosts (or equivalent), so it should always
resolve.
Fixes: nodejs#7291
PR-URL: nodejs#10854
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michal Zasso <targos@protonmail.com>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 27, 2017
If a test does http.listen(0) or net.listen(0),
http.listen(0).address().address returns '::'. Some machines will
resolve this to localhost, but not all. Every machine should have
localhost defined in /etc/hosts (or equivalent), so it should always
resolve.
Fixes: nodejs#7291
PR-URL: nodejs#10854
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michal Zasso <targos@protonmail.com>
@italoacasasitaloacasas mentioned this pull request Jan 29, 2017
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 30, 2017
If a test does http.listen(0) or net.listen(0),
http.listen(0).address().address returns '::'. Some machines will
resolve this to localhost, but not all. Every machine should have
localhost defined in /etc/hosts (or equivalent), so it should always
resolve.
Fixes: nodejs#7291
PR-URL: nodejs#10854
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michal Zasso <targos@protonmail.com>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 30, 2017
If a test does http.listen(0) or net.listen(0),
http.listen(0).address().address returns '::'. Some machines will
resolve this to localhost, but not all. Every machine should have
localhost defined in /etc/hosts (or equivalent), so it should always
resolve.
Fixes: nodejs#7291
PR-URL: nodejs#10854
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michal Zasso <targos@protonmail.com>
MylesBorins pushed a commit that referenced this pull request Mar 8, 2017
If a test does http.listen(0) or net.listen(0),
http.listen(0).address().address returns '::'. Some machines will
resolve this to localhost, but not all. Every machine should have
localhost defined in /etc/hosts (or equivalent), so it should always
resolve.
Fixes: #7291
PR-URL: #10854
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michal Zasso <targos@protonmail.com>
@MylesBorins

Copy link
Copy Markdown
Contributor

Does not land cleanly on v4.x

MylesBorins pushed a commit that referenced this pull request Mar 9, 2017
If a test does http.listen(0) or net.listen(0),
http.listen(0).address().address returns '::'. Some machines will
resolve this to localhost, but not all. Every machine should have
localhost defined in /etc/hosts (or equivalent), so it should always
resolve.
Fixes: #7291
PR-URL: #10854
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michal Zasso <targos@protonmail.com>
@MylesBorinsMylesBorins mentioned this pull request Mar 9, 2017
@gibfahngibfahn mentioned this pull request May 9, 2017
4 tasks
@refackrefack mentioned this pull request May 19, 2017
3 tasks
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

httpIssues or PRs related to the http subsystem.netIssues and PRs related to the net subsystem.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

win: gc/test-net-timeout.js failure in v6.2.1

7 participants

@gibfahn@jasnell@MylesBorins@lpinca@targos@mscdex@nodejs-github-bot