mirror of
https://github.com/golang/go
synced 2024-11-18 10:04:43 -07:00
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: Josh Bleecher Snyder <josharian@gmail.com>
This commit is contained in:
parent
95c9583a18
commit
ffe923f6f4
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user