]> Cypherpunks repositories - gostls13.git/commitdiff
net/http: increase timeout length for TestOnlyWriteTimeout
authorRichard Miller <miller.research@gmail.com>
Fri, 16 Feb 2018 17:01:52 +0000 (17:01 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 16 Feb 2018 17:26:20 +0000 (17:26 +0000)
This test was sometimes timing out on the plan9/arm builder
(raspberry pi) when run in parallel with other network intensive
tests. It appears that tcp on the loopback interface could do
with some tuning for better performance on Plan 9, but until
that's done, increasing the timeout from 5 to 10 seconds allows
this test to pass.  This should have no effect on other platforms
where 5 seconds was already enough.

Change-Id: If310ee569cae8ca8f56346d84ce23803feb23a41
Reviewed-on: https://go-review.googlesource.com/94796
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/net/http/serve_test.go

index 9cbfe872afe0bc53522e32bf95879e4e72f03252..5ff08b4036aa7c8a2ace4334896f9f9605795301 100644 (file)
@@ -931,7 +931,7 @@ func TestOnlyWriteTimeout(t *testing.T) {
                if err == nil {
                        t.Errorf("expected an error from Get request")
                }
-       case <-time.After(5 * time.Second):
+       case <-time.After(10 * time.Second):
                t.Fatal("timeout waiting for Get error")
        }
        if err := <-afterTimeoutErrc; err == nil {