]> Cypherpunks.ru repositories - gostls13.git/commitdiff
net/http: deflake TestClientTimeout
authorBrad Fitzpatrick <bradfitz@golang.org>
Thu, 10 Nov 2016 23:03:06 +0000 (23:03 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 10 Nov 2016 23:27:10 +0000 (23:27 +0000)
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>

src/net/http/client_test.go

index dc6d339264366864ea7e0df752813d26994509f0..b1677c1e08c438ebb9cd55b4d947cc1a55576732 100644 (file)
@@ -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):