Commit ffe923f6 authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

net/http: deflake TestClientRedirect308NoGetBody

In an unrelated CL I found a way to increase the likelihood of latent
flaky tests and found this one.

This is just like yesterday's https://golang.org/cl/37624 and dozens
before it (all remnants from the great net/http test parallelization
of Nov 2016 in https://golang.org/cl/32684).

Change-Id: I3fe61d1645062e5109206ff27d74f573ef6ebb2e
Reviewed-on: https://go-review.googlesource.com/37627
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarJosh Bleecher Snyder <josharian@gmail.com>
parent 95c9583a
......@@ -583,8 +583,9 @@ func TestClientRedirect308NoGetBody(t *testing.T) {
if err != nil {
t.Fatal(err)
}
c := &Client{Transport: &Transport{DisableKeepAlives: true}}
req.GetBody = nil // so it can't rewind.
res, err := DefaultClient.Do(req)
res, err := c.Do(req)
if err != nil {
t.Fatal(err)
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment