net: host string comparison in TestLookupGmailNS is case-sensitive, causes flaky test #34446
Labels
FrozenDueToAge
help wanted
NeedsFix
The path to resolution is known, but the work has not been done.
Testing
An issue that has been verified to require only test changes, not just a test failure.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I ran
$ go test -run TestLookup
in thenet
package.What did you expect to see?
I expected the test to pass consistently.
What did you see instead?
The test passes sometimes, but also fails like so:
or even
This is the behavior I get when I use the default name server from my ISP. With Google (8.8.8.8) or CloudFlare (1.1.1.1) DNS, the test seems to pass without flaking. I am not expert on DNS, but it is my understanding that host names are case-insensitive. Perhaps this test should consider this fact.
If it seems sensible to use case-insensitive string comparison here, I can send a CL.
Interestingly, I couldn't get any other lookup test to fail when using the ISP's name server (which seems to consistently alter the case of the TLD for NS records it returns). I don't know if that is because that name server has a particular quirk, or because NS records are special in some way, or for some other reason that I cannot fathom.
The text was updated successfully, but these errors were encountered: