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

System.Net.NameResolution.Functional.Tests have few tests that constantly fail on local machines? #30411

Closed
Gnbrkm41 opened this issue Jul 29, 2019 · 4 comments
Milestone

Comments

@Gnbrkm41
Copy link
Contributor

Similar: #1488, though the platform and the failure cause is different.

Environment

  • Windows 10 Home 1903, Build 18362.239, Korean, x64
  • Intel Core i5-4570 CPU
    Can't repro on my laptop (Windows 10 Pro Insider Preview, Fast ring, Build 18945, x64).

Failing tests

System.Net.NameResolution.Functional.Tests
┗ System.Net.NameResolution.Tests
  ┗ GetHostAddressesTest
    ┗ DnsBeginGetHostAddresses_BadName_Throws
  ┗ GetHostByNameTest
    ┗ DnsObsoleteBeginGetHostByName_BadName_Throws
    ┗ DnsObsoleteGetHostByName_BadName_Throws
  ┗ GetHostEntryTest
    ┗ DnsBeginGetHostEntry_BadName_Throws
    ┗ DnsGetHostEntry_BadName_Throws
    ┗ DnsGetHostEntry_UnknownPunicodeHost_HostNotFound
    ┗ DnsGetHostEntry_UnknownUnicodeHost_HostNotFound
  ┗ ResolveTest
    ┗ DnsObsoleteBeginResolve_BadName_Throws
    ┗ DnsObsoleteResolve_BadName_Throws

All of the tests above fail with Assert.Throws not throwing:

Message: 
    Assert.Throws() Failure
    Expected: typeof(System.Net.Sockets.SocketException)
    Actual:   (No exception was thrown)

Cloned straight from the master branch (latest commit is 6737565). No matter how many times I run the tests, they always seem to fail; haven't looked into the test codes yet. They do not seem to fail when ran on CI pipelines. Wonder what the reason is?

@stephentoub
Copy link
Member

Who's your internet provider?

If you open a browser and browse to a non-existent domain, do you get a default page from your provider?

@Gnbrkm41
Copy link
Contributor Author

It's a Korean provider called SK Broadband.

I don't get such a page; I could try changing my DNS resolver though.

@stephentoub
Copy link
Member

Generally the reason you wouldn't see an exception in these cases is because your internet provider's DNS server is returning the address of some default site they own that will put up a message like "The site you requested could not be found" or something similar. From the client's perspective, the DNS request was successful.

@Gnbrkm41
Copy link
Contributor Author

Oh, looks like changing the DNS provider have solved it 😶

Closing the issue. Thanks, @stephentoub!

@msftgits msftgits transferred this issue from dotnet/corefx Feb 1, 2020
@msftgits msftgits added this to the 3.0 milestone Feb 1, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants