]> Cypherpunks repositories - gostls13.git/commit
net/http: run TestRequestWriteTransport with fake time to avoid flakes
authorDamien Neil <dneil@google.com>
Thu, 9 Oct 2025 22:25:30 +0000 (15:25 -0700)
committerGopher Robot <gobot@golang.org>
Fri, 10 Oct 2025 15:39:10 +0000 (08:39 -0700)
commit5368e7742971c8dbcb75a405eb2319e71fb1d0c7
tree68d3c75bf34890d54a5c54b02fb968c87c9dc08f
parentc53cb642deea152e28281133bc0053f5ec0ce358
net/http: run TestRequestWriteTransport with fake time to avoid flakes

This test verifies whether or not we use the chunked encoding when
sending a request with a body like io.NopCloser(strings.NewReader("")).
This depends on whether the transport can read a single byte from the
request body within 200ms, which is flaky on very slow builders.

Use fake time to avoid flakes.

Fixes #52575

Change-Id: Ie11a58ac6bc18d43af1423827887e804242dee30
Reviewed-on: https://go-review.googlesource.com/c/go/+/710737
Auto-Submit: Nicholas Husin <nsh@golang.org>
Reviewed-by: Nicholas Husin <husin@google.com>
Reviewed-by: Nicholas Husin <nsh@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/net/http/requestwrite_test.go