diff options
Diffstat (limited to 'vendor/golang.org/x/net/http2/transport_test.go')
-rw-r--r-- | vendor/golang.org/x/net/http2/transport_test.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/vendor/golang.org/x/net/http2/transport_test.go b/vendor/golang.org/x/net/http2/transport_test.go index adee48c..17c09ca 100644 --- a/vendor/golang.org/x/net/http2/transport_test.go +++ b/vendor/golang.org/x/net/http2/transport_test.go @@ -1693,7 +1693,7 @@ func TestTransportChecksResponseHeaderListSize(t *testing.T) { ct.run() } -// Test that the the Transport returns a typed error from Response.Body.Read calls +// Test that the Transport returns a typed error from Response.Body.Read calls // when the server sends an error. (here we use a panic, since that should generate // a stream error, but others like cancel should be similar) func TestTransportBodyReadErrorType(t *testing.T) { @@ -2394,11 +2394,12 @@ func TestTransportHandlerBodyClose(t *testing.T) { } tr.CloseIdleConnections() - gd := runtime.NumGoroutine() - g0 - if gd > numReq/2 { + if !waitCondition(5*time.Second, 100*time.Millisecond, func() bool { + gd := runtime.NumGoroutine() - g0 + return gd < numReq/2 + }) { t.Errorf("appeared to leak goroutines") } - } // https://golang.org/issue/15930 |