add a Config and ConnectionState flag for RESET_STREAM_AT (#5243)

* add a Config and ConnectionState flag for RESET_STREAM_AT

* add RESET_STREAM_AT to README
This commit is contained in:
Marten Seemann
2025-06-29 11:42:02 +08:00
committed by GitHub
parent 61d2fa57ac
commit 0eb237f797
5 changed files with 37 additions and 22 deletions

View File

@@ -126,6 +126,8 @@ func configWithNonZeroNonFunctionFields(t *testing.T) *Config {
f.Set(reflect.ValueOf(true))
case "Allow0RTT":
f.Set(reflect.ValueOf(true))
case "EnableStreamResetPartialDelivery":
f.Set(reflect.ValueOf(true))
default:
t.Fatalf("all fields must be accounted for, but saw unknown field %q", fn)
}
@@ -133,7 +135,7 @@ func configWithNonZeroNonFunctionFields(t *testing.T) *Config {
return c
}
func TestConfigCloning(t *testing.T) {
func TestConfigClone(t *testing.T) {
t.Run("function fields", func(t *testing.T) {
var calledAllowConnectionWindowIncrease, calledTracer bool
c1 := &Config{
@@ -153,7 +155,7 @@ func TestConfigCloning(t *testing.T) {
require.True(t, calledTracer)
})
t.Run("clones non-function fields", func(t *testing.T) {
t.Run("non-function fields", func(t *testing.T) {
c := configWithNonZeroNonFunctionFields(t)
require.Equal(t, c, c.Clone())
})