]> Cypherpunks repositories - gostls13.git/commit
all: enable disabled HTTP/2 tests
authorDamien Neil <dneil@google.com>
Fri, 11 Nov 2022 20:31:44 +0000 (12:31 -0800)
committerDamien Neil <dneil@google.com>
Tue, 22 Nov 2022 18:52:58 +0000 (18:52 +0000)
commit21015cf6baed45a1e7c3d1a0dfe34c778140344f
tree2cf5e48c4e38e5409b9fb0dd025519485e1ed235
parent69ca0a859cbd8807b03b7772a11f5a147cd46565
all: enable disabled HTTP/2 tests

Update net/http to enable tests that pass with the latest update
to the vendored x/net.

Update a few tests:

Windows apparently doesn't guarantee that time.Since(time.Now())
is >=0, so to set a definitely-expired write deadline, use a time
firmly in the past rather than now.

Put a backoff loop on TestServerReadTimeout to avoid failures
when the timeout expires mid-TLS-handshake. (The TLS handshake
timeout is set to min(ReadTimeout, WriteTimeout, ReadHeaderTimeout);
there's no way to set a long TLS handshake timeout and a short
read timeout.)

Don't close the http.Server in TestServerWriteTimeout while the
handler may still be executing, since this can result in us
getting the wrong error.

Change the GOOS=js fake net implementation to properly return
ErrDeadlineExceeded when a read/write deadline is exceeded,
rather than EAGAIN.

For #49837
For #54136

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