]> Cypherpunks repositories - gostls13.git/commitdiff
net/http: fix a long test after CL 185117
authorDaniel Martí <mvdan@mvdan.cc>
Wed, 28 Aug 2019 13:50:31 +0000 (15:50 +0200)
committerDaniel Martí <mvdan@mvdan.cc>
Wed, 28 Aug 2019 14:02:41 +0000 (14:02 +0000)
The net/url error in question now quotes the URL, so update the expected
output string.

While at it, also update a comment in httputil, though that doesn't
affect any test.

Fixes #33910.

Change-Id: I0981f528b24337c2952ef60c0db3b7ff72d72110
Reviewed-on: https://go-review.googlesource.com/c/go/+/192078
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/net/http/httputil/reverseproxy_test.go
src/net/http/transport_test.go

index 7f9dc0800f8d91e62be983ae45ee5bfbf5c134e7..f58e08867f6dfd9a920e10a070df69f0d6c27588 100644 (file)
@@ -436,7 +436,7 @@ func TestReverseProxyCancelation(t *testing.T) {
        }
        if err == nil {
                // This should be an error like:
-               // Get http://127.0.0.1:58079: read tcp 127.0.0.1:58079:
+               // Get "http://127.0.0.1:58079": read tcp 127.0.0.1:58079:
                //    use of closed network connection
                t.Error("Server.Client().Do() returned nil error; want non-nil error")
        }
index 23afff5d843160008b89670a4e5d5a632cfbe40e..2ea26f7f6667a1feecdc6179d1c56534c98e8cf2 100644 (file)
@@ -2289,7 +2289,7 @@ func TestTransportCancelRequestInDial(t *testing.T) {
        got := logbuf.String()
        want := `dial: blocking
 canceling
-Get = Get http://something.no-network.tld/: net/http: request canceled while waiting for connection
+Get = Get "http://something.no-network.tld/": net/http: request canceled while waiting for connection
 `
        if got != want {
                t.Errorf("Got events:\n%s\nWant:\n%s", got, want)