diff options
| author | Damien Neil <dneil@google.com> | 2023-08-24 10:12:38 -0700 |
|---|---|---|
| committer | Damien Neil <dneil@google.com> | 2023-08-24 18:02:42 +0000 |
| commit | 99a174f06e6c7043a2ec739d116f6663f6c0c7b2 (patch) | |
| tree | 3a12ea0cfba07a83ce1477bb2122600a3f15cad8 /src/net/http | |
| parent | 5374c1aaf53a2212ca6a27eedc936fa917c5d077 (diff) | |
| download | go-99a174f06e6c7043a2ec739d116f6663f6c0c7b2.tar.xz | |
net/http: remove arbitrary timeout from TestTransportGCRequest
This test expects a *Request to be garbage collected
within five seconds. Some slow builders take longer.
Drop the arbitrary timeout.
Fixes #56809
Change-Id: I4b5bdce09002a5b52b7b5d0b33e7876d48740bc3
Reviewed-on: https://go-review.googlesource.com/c/go/+/522615
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/net/http')
| -rw-r--r-- | src/net/http/clientserver_test.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/net/http/clientserver_test.go b/src/net/http/clientserver_test.go index 58321532ea..32948f3aed 100644 --- a/src/net/http/clientserver_test.go +++ b/src/net/http/clientserver_test.go @@ -1172,16 +1172,12 @@ func testTransportGCRequest(t *testing.T, mode testMode, body bool) { t.Fatal(err) } })() - timeout := time.NewTimer(5 * time.Second) - defer timeout.Stop() for { select { case <-didGC: return - case <-time.After(100 * time.Millisecond): + case <-time.After(1 * time.Millisecond): runtime.GC() - case <-timeout.C: - t.Fatal("never saw GC of request") } } } |
