1
0
mirror of https://github.com/golang/go synced 2024-11-19 20:44:40 -07:00

net/http: quiet some log spam in TestNoBodyOnChunked304Response

Updates #22540

Change-Id: I63e8c4874f8a774e9c47affc856aadf8c35ca23b
Reviewed-on: https://go-review.googlesource.com/75593
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tom Bergan <tombergan@google.com>
This commit is contained in:
Brad Fitzpatrick 2017-11-02 21:11:32 +00:00
parent 1ce7442ec8
commit a9a580690b

View File

@ -4349,6 +4349,12 @@ func TestNoBodyOnChunked304Response(t *testing.T) {
}))
defer cst.close()
// Our test server above is sending back bogus data after the
// response (the "0\r\n\r\n" part), which causes the Transport
// code to log spam. Disable keep-alives so we never even try
// to reuse the connection.
cst.tr.DisableKeepAlives = true
res, err := cst.c.Get(cst.ts.URL)
if err != nil {
t.Fatal(err)