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: do not use valid public hosts for timeout testing #2057

Closed
wants to merge 1 commit into from

Conversation

Trott
Copy link
Member

@Trott Trott commented Jun 25, 2015

A couple of assumptions I've made:

  • Purpose of the test/internet directory: Is it just tests that rely on an internet connection but really shouldn't ideally? Or is that an incorrect assumption? (Is it documented anywhere?) Now that this one doesn't rely on a working internet connection, should it be moved to test/parallel instead?
  • DNS lookup vs. no DNS lookup seems irrelevant in the context of testing socket timeout so I removed the DNS lookup one. (I couldn't figure out a reasonable way to do it that didn't involve internet connectivity. It needs to do a DNS lookup, after all.) Am I missing something or does that seem about right?

Additional information that may be useful:

  • 240.0.0.0 might, theoretically, be used at some future time. But that is unlikely. And even so, it's still a better choice for the foreseeable future than a valid Time-Warner IP, which is what it seems the previous one was.
  • There is a "discard" prefix address in IPv6 that would be useful here, but I couldn't get it to work. I'm reluctant to file a bug report because the problem is likely just my IPv6 ignorance.

@Trott Trott added net Issues and PRs related to the net subsystem. test Issues and PRs related to the tests. labels Jun 25, 2015
@Trott
Copy link
Member Author

Trott commented Jun 25, 2015

@brendanashworth
Copy link
Contributor

Is it just tests that rely on an internet connection but really shouldn't ideally?

I think they are tests that can rely on one. If it doesn't rely on one anymore, I figure it could be moved to parallel.

gotConnect1 = true;
socket1.destroy();
gotConnect = true;
socket.destroy();
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could replace the callback with just assert.fail.

@bnoordhuis
Copy link
Member

LGTM

Trott added a commit that referenced this pull request Jul 28, 2015
PR-URL: #2057
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@Trott
Copy link
Member Author

Trott commented Jul 28, 2015

landed in c786d63

@Trott Trott closed this Jul 28, 2015
@Fishrock123
Copy link
Contributor

Shouldn't this test be moved to /parallel/ then?

@brendanashworth
Copy link
Contributor

@Fishrock123 see #2257 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
net Issues and PRs related to the net subsystem. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants