1
0
mirror of https://github.com/golang/go synced 2024-11-13 17:30:24 -07:00

net/http: deflake TestClientTimeout

This test was only enabled by default today so it hasn't been hardened
by build.golang.org. Welcome to the ring, TestClientTimeout.

Change-Id: I1967f6c825699f13f6c659dc14d3c3c22b965272
Reviewed-on: https://go-review.googlesource.com/33101
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Brad Fitzpatrick 2016-11-10 23:03:06 +00:00
parent caa434d280
commit a501fef345

View File

@ -1200,9 +1200,9 @@ func testClientTimeout(t *testing.T, h2 bool) {
return return
} }
if r.URL.Path == "/slow" { if r.URL.Path == "/slow" {
sawSlow <- true
w.Write([]byte("Hello")) w.Write([]byte("Hello"))
w.(Flusher).Flush() w.(Flusher).Flush()
sawSlow <- true
select { select {
case <-testDone: case <-testDone:
case <-time.After(timeout * 10): case <-time.After(timeout * 10):