From a501fef3455a8e0ff0424bb29a9403d7539c6164 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Thu, 10 Nov 2016 23:03:06 +0000 Subject: [PATCH] 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 --- src/net/http/client_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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): -- 2.48.1