diff options
| author | Nicholas S. Husin <nsh@golang.org> | 2026-03-30 19:17:03 -0400 |
|---|---|---|
| committer | Nicholas Husin <nsh@golang.org> | 2026-04-10 14:18:34 -0700 |
| commit | ccf4ba99a90f6f1366daef776ae90187c9f3c6b1 (patch) | |
| tree | 379004141a9699a153e5555dc0721779513d74ef /src/net/http/clientconn_test.go | |
| parent | 6299ca285a0a6bf7d2b1bfbb03b6c3288b846bdf (diff) | |
| download | go-ccf4ba99a90f6f1366daef776ae90187c9f3c6b1.tar.xz | |
net/http: run tests for HTTP/3 where it can already pass
By default, our test harnesses (run and runSynctest) now use http3Mode,
in addition to http1Mode and http2Mode, when no []testMode were
explicitly defined for a given test.
Tests that cannot currently pass for HTTP/3 have been modified to use
http3SkippedMode, which serves as a convenient alias for the old default
of []testMode{http1Mode, http2Mode}.
We changed the default mode and defined http3SkippedMode so we have a
clear list of TODOs in terms of how much changes are still needed before
our HTTP/3 implementation reaches basic feature parity with HTTP/1 and
HTTP/2.
For #70914
Change-Id: I719d5d66399a51f7c3d96180ebed9b606a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/765320
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Nicholas Husin <husin@google.com>
Diffstat (limited to 'src/net/http/clientconn_test.go')
| -rw-r--r-- | src/net/http/clientconn_test.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/net/http/clientconn_test.go b/src/net/http/clientconn_test.go index 1027d75fed..df1e2ed4e3 100644 --- a/src/net/http/clientconn_test.go +++ b/src/net/http/clientconn_test.go @@ -16,7 +16,7 @@ import ( "time" ) -func TestTransportNewClientConnRoundTrip(t *testing.T) { run(t, testTransportNewClientConnRoundTrip) } +func TestTransportNewClientConnRoundTrip(t *testing.T) { run(t, testTransportNewClientConnRoundTrip, http3SkippedMode) } func testTransportNewClientConnRoundTrip(t *testing.T, mode testMode) { cst := newClientServerTest(t, mode, http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { io.WriteString(w, req.Host) @@ -82,7 +82,7 @@ func newClientConnTest(t testing.TB, mode testMode, h http.HandlerFunc, opts ... } // TestClientConnReserveAll reserves every concurrency slot on a connection. -func TestClientConnReserveAll(t *testing.T) { runSynctest(t, testClientConnReserveAll) } +func TestClientConnReserveAll(t *testing.T) { runSynctest(t, testClientConnReserveAll, http3SkippedMode) } func testClientConnReserveAll(t *testing.T, mode testMode) { cst, cc := newClientConnTest(t, mode, nil, optFakeNet, func(s *http.Server) { s.HTTP2 = &http.HTTP2Config{ @@ -121,7 +121,7 @@ func testClientConnReserveAll(t *testing.T, mode testMode) { // TestClientConnReserveParallel starts concurrent goroutines which reserve every // concurrency slot on a connection. -func TestClientConnReserveParallel(t *testing.T) { runSynctest(t, testClientConnReserveParallel) } +func TestClientConnReserveParallel(t *testing.T) { runSynctest(t, testClientConnReserveParallel, http3SkippedMode) } func testClientConnReserveParallel(t *testing.T, mode testMode) { _, cc := newClientConnTest(t, mode, nil, optFakeNet, func(s *http.Server) { s.HTTP2 = &http.HTTP2Config{ @@ -159,7 +159,7 @@ func testClientConnReserveParallel(t *testing.T, mode testMode) { } // TestClientConnReserveRelease repeatedly reserves and releases concurrency slots. -func TestClientConnReserveRelease(t *testing.T) { runSynctest(t, testClientConnReserveRelease) } +func TestClientConnReserveRelease(t *testing.T) { runSynctest(t, testClientConnReserveRelease, http3SkippedMode) } func testClientConnReserveRelease(t *testing.T, mode testMode) { _, cc := newClientConnTest(t, mode, nil, optFakeNet, func(s *http.Server) { s.HTTP2 = &http.HTTP2Config{ @@ -323,7 +323,7 @@ func TestClientConnReserveAndConsume(t *testing.T) { t.Errorf("cc.Reserve() = %v, want success", err) } } - }) + }, http3SkippedMode) }) } @@ -331,7 +331,7 @@ func TestClientConnReserveAndConsume(t *testing.T) { // TestClientConnRoundTripBlocks verifies that RoundTrip blocks until a concurrency // slot is available on a connection. -func TestClientConnRoundTripBlocks(t *testing.T) { runSynctest(t, testClientConnRoundTripBlocks) } +func TestClientConnRoundTripBlocks(t *testing.T) { runSynctest(t, testClientConnRoundTripBlocks, http3SkippedMode) } func testClientConnRoundTripBlocks(t *testing.T, mode testMode) { var handlerCalls atomic.Int64 requestc := make(chan struct{}) |
