avoid triggering macOS dual-stack flakiness in HTTP/3 integration tests (#5187)

Unfortunately, there’s still no fix in sight for https://github.com/golang/go/issues/67226.
This commit is contained in:
Marten Seemann
2025-05-31 16:40:20 +08:00
committed by GitHub
parent eb427b599e
commit 7ca7a973ef
4 changed files with 55 additions and 8 deletions

View File

@@ -11,6 +11,7 @@ import (
"testing"
"time"
"github.com/quic-go/quic-go/http3"
"github.com/stretchr/testify/require"
)
@@ -62,7 +63,13 @@ func TestHTTPClientTrace(t *testing.T) {
}
ctx := httptrace.WithClientTrace(context.Background(), &trace)
cl := newHTTP3Client(t)
tr := &http3.Transport{
TLSClientConfig: getTLSClientConfigWithoutServerName(),
QUICConfig: getQuicConfig(nil),
}
t.Cleanup(func() { tr.Close() })
cl := &http.Client{Transport: tr}
req, err := http.NewRequestWithContext(ctx, http.MethodGet, fmt.Sprintf("https://localhost:%d/client-trace", port), nil)
require.NoError(t, err)
resp, err := cl.Do(req)