From: Brad Fitzpatrick Date: Thu, 10 Nov 2016 23:03:06 +0000 (+0000) Subject: net/http: deflake TestClientTimeout X-Git-Tag: go1.8beta1~221 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=a501fef3455a8e0ff0424bb29a9403d7539c6164;p=gostls13.git 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 Run-TryBot: Brad Fitzpatrick --- diff --git a/src/net/http/client_test.go b/src/net/http/client_test.go index dc6d339264..b1677c1e08 100644 --- a/src/net/http/client_test.go +++ b/src/net/http/client_test.go @@ -1200,9 +1200,9 @@ func testClientTimeout(t *testing.T, h2 bool) { return } if r.URL.Path == "/slow" { + sawSlow <- true w.Write([]byte("Hello")) w.(Flusher).Flush() - sawSlow <- true select { case <-testDone: case <-time.After(timeout * 10):