-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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: handle IPv6 localhost issues within tests #7766
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
In my Ubuntu machines, I had to manually change the
/etc/hosts
to make these tests pass. Perhaps iflocalhost
fails, we should give it another try withipv6-localhost
instead of skipping.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.
The initial version of this test did that (it tried
common.localIPv6Hosts
in order) but it was actually making the test fail on some of the buildbots...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.
@thefourtheye That's true with or without the change here, right? Like, without the change here, the test fails (but it is marked as passing if run with
test.py
ormake test
because of the setting inparallel.status
). With the change here, the test is skipped. In both cases, you need to change/etc/hosts
to get the test to pass (running from the command line without the test runner). Or am I mistaken? If I'm not mistaken, then I think this is an improvement. (Skipping is better than wrongly failing.)@bnoordhuis I think we might be able to go back to trying to resolve addresses in
common.localIPv6Hosts
once this fix is in there, but I'm not 100% sure. Either way, I'd rather see this (hopefully clear improvement) land, and only then experiment with adding that functionality back in to see if it works any better once this safeguard is there.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.
Do we have any failure instances to look at? Could the flakiness because of the timeout? I have a feeling that this could be properly fixed.
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.
@thefourtheye It's not really flaky. It's fail-every-time. The only reason CI has been green anyway is because of the setting in
parallel.status
that basically says "if this test fails, mark it as passing anyway". It's that setting that I'm trying to get rid of in this change.Example: https://ci.nodejs.org/job/node-test-commit-linux/4243/nodes=centos5-32/console
Note that it's green despite the existence of this:
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.
Addendum: I think skipping the test when
localhost
does not map to the expected address is a more sensible thing to do than to allow the test to pass no matter what error occurs in the test. Hence, this change.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.
Not this version. I am wondering why the old version with
common.localIPv6Hosts
failed.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.
@thefourtheye Ah! That. OK, sorry, I misunderstood. Here's the answer, I think:
I tried something like that in 00f9b60
Sample CI run: https://ci.nodejs.org/job/node-stress-single-test/812/nodes=centos5-32/console:
So even cycling through all those hostnames, we still need to account for hosts where none of them are configured.
So I think we can try it again after this lands, since that's basically what this does except that it only tries
localhost
and not all those other names.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.
Okay, this should not fail as is. LGTM.