test: complete bounded HTTP2 TLS soak and flow control checks

This commit is contained in:
2026-09-23 10:06:30 +08:00
parent d94df4fc54
commit 830cb3a7ad
9 changed files with 3018 additions and 8 deletions

View File

@@ -20,7 +20,7 @@ type framePeer struct {
framer *xhttp2.Framer
}
func newFramePeer(t *testing.T, address string) *framePeer {
func newFramePeer(t *testing.T, address string, settings ...xhttp2.Setting) *framePeer {
t.Helper()
c, err := net.DialTimeout("tcp", address, time.Second)
if err != nil {
@@ -32,7 +32,7 @@ func newFramePeer(t *testing.T, address string) *framePeer {
if _, err = io.WriteString(c, xhttp2.ClientPreface); err != nil {
t.Fatal(err)
}
if err = p.framer.WriteSettings(); err != nil {
if err = p.framer.WriteSettings(settings...); err != nil {
t.Fatal(err)
}
return p