]> Cypherpunks repositories - gostls13.git/commit
net/http: deflake TestIssue4191_InfiniteGetTimeout
authorDamien Neil <dneil@google.com>
Fri, 18 Nov 2022 22:10:50 +0000 (14:10 -0800)
committerDamien Neil <dneil@google.com>
Sat, 19 Nov 2022 01:19:55 +0000 (01:19 +0000)
commitf4f8397fed02b612c36c425fc9c5dce32408e21b
tree3eab46722211be405f8a9e4ccc4e8e565a5550cb
parentc6cdfd88c762ee746cd9579ae57e528f56f5dd00
net/http: deflake TestIssue4191_InfiniteGetTimeout

This test exercises the case where a net.Conn error occurs while
writing a response body. It injects an error by setting a timeout
on the Conn. If this timeout expires before response headers are
written, the test fails. The test attempts to recover from this
failure by extending the timeout and retrying.

Set the timeout after the response headers are removed, and
remove the retry loop.

Fixes #56274.

Change-Id: I293f8bedb7b20a21d14f43ea9bb48fc56b59441c
Reviewed-on: https://go-review.googlesource.com/c/go/+/452175
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
src/net/http/transport_test.go