FAIL: TestTransportEventTraceRealDNS

156 views
Skip to first unread message

sperber...@googlemail.com

unread,
May 23, 2016, 3:25:56 PM5/23/16
to golang-nuts
Am i the only one seeing this since a few weeks in tip?

--- FAIL: TestTransportEventTraceRealDNS (0.32s)
    transport_test.go:3371: expected error during DNS lookup
FAIL
FAIL    net/http    9.562s

30fc940c70ee5ee27f0a455248735b8b57f34fb7

yours

Ian Lance Taylor

unread,
May 23, 2016, 11:20:21 PM5/23/16
to Stephan Sperber, golang-nuts
On Mon, May 23, 2016 at 12:25 PM, sperberstephan via golang-nuts
<golan...@googlegroups.com> wrote:
> Am i the only one seeing this since a few weeks in tip?
>
> --- FAIL: TestTransportEventTraceRealDNS (0.32s)
> transport_test.go:3371: expected error during DNS lookup
> FAIL
> FAIL net/http 9.562s

I'm going to go with "yes." The test is looking up
dns-should-not-resolve.golang in DNS. Do your DNS resolvers resolve
that name?

Ian

sperber...@googlemail.com

unread,
May 24, 2016, 12:30:33 AM5/24/16
to golang-nuts, sperber...@googlemail.com
ok thx for the hint.
my telco is resolving this because all unknown sites are transparently redirected to an "informative" error-site...

$ ping dns-should-not-resolve.golang
PING dns
-should-not-resolve.golang (62.xxx.xxx.xxx) 56(84) bytes of data.

thx

John Souvestre

unread,
May 31, 2016, 10:33:50 PM5/31/16
to golan...@googlegroups.com

Ø  ok thx for the hint.


my telco is resolving this because all unknown sites are transparently redirected to an "informative" error-site...

$ ping dns-should-not-resolve.golang
PING dns
-should-not-resolve.golang (62.xxx.xxx.xxx) 56(84) bytes of data.


Cox Cable does something similar.  They replace the correct DNS response (a failure) with an IP to an advertising site.

 

John

    John Souvestre - New Orleans LA

 

 

sperber...@googlemail.com

unread,
Jun 11, 2016, 3:18:08 AM6/11/16
to golang-nuts, sperber...@googlemail.com
is there a special need for the hostname to have a dot in it?
if i change the name to
dns-should-not-resolve-golang
it works even with my special provider resolving all unknowns transparently...

--- a/src/net/http/transport_test.go
+++ b/src/net/http/transport_test.go
@@ -3359,7 +3359,7 @@ func TestTransportEventTraceRealDNS(t *testing.T) {
                buf.WriteByte('\n')
        }
 
-       req, _ := NewRequest("GET", "http://dns-should-not-resolve.golang:80", nil)
+       req, _ := NewRequest("GET", "http://dns-should-not-resolve-golang:80", nil)
        trace := &httptrace.ClientTrace{
                DNSStart:     func(e httptrace.DNSStartInfo) { logf("DNSStart: %+v", e) },
                DNSDone:      func(e httptrace.DNSDoneInfo) { logf("DNSDone: %+v", e) },
@@ -3380,7 +3380,7 @@ func TestTransportEventTraceRealDNS(t *testing.T) {
                        t.Errorf("expected substring %q in output.", sub)
                }
        }
-       wantSub("DNSStart: {Host:dns-should-not-resolve.golang}")
+       wantSub("DNSStart: {Host:dns-should-not-resolve-golang}")
        wantSub("DNSDone: {Addrs:[] Err:")
        if strings.Contains(got, "ConnectStart") || strings.Contains(got, "ConnectDone") {
                t.Errorf("should not see Connect events")

techn...@gmail.com

unread,
Sep 10, 2016, 4:30:46 AM9/10/16
to golang-nuts

Cox Cable does something similar.  They replace the correct DNS response (a failure) with an IP to an advertising site.

LOL 
Reply all
Reply to author
Forward
0 new messages