]> Cypherpunks repositories - gostls13.git/commitdiff
net/http: skip test needing good DNS in short mode, except on builders
authorBrad Fitzpatrick <bradfitz@golang.org>
Thu, 8 Sep 2016 23:58:17 +0000 (23:58 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Mon, 12 Sep 2016 18:30:01 +0000 (18:30 +0000)
Fixes #16732

Change-Id: If0a7f9425cf75b9e31b3091c43cb23d6e039f568
Reviewed-on: https://go-review.googlesource.com/28782
TryBot-Result: Gobot Gobot <gobot@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
src/net/http/transport_test.go

index fe915e840203af797b94f978041084c5febc9376..48d4de4fab7d11411948215e15db17117473f500 100644 (file)
@@ -3369,6 +3369,15 @@ func testTransportEventTrace(t *testing.T, h2 bool, noHooks bool) {
 }
 
 func TestTransportEventTraceRealDNS(t *testing.T) {
+       if testing.Short() && testenv.Builder() == "" {
+               // Skip this test in short mode (the default for
+               // all.bash), in case the user is using a shady/ISP
+               // DNS server hijacking queries.
+               // See issues 16732, 16716.
+               // Our builders use 8.8.8.8, though, which correctly
+               // returns NXDOMAIN, so still run this test there.
+               t.Skip("skipping in short mode")
+       }
        defer afterTest(t)
        tr := &Transport{}
        defer tr.CloseIdleConnections()