@@ -115,60 +115,28 @@ public void ProcessFrame_should_warn_on_non_divisible_by_four_goaway()
115115 }
116116
117117 [ Fact ( Timeout = 5000 ) ]
118- public void ProcessFrame_should_reject_push_promise_when_push_disabled ( )
118+ public void ProcessFrame_should_reject_push_promise_with_cancel_push ( )
119119 {
120- var sm = CreateMachine ( new TurboClientOptions { Http3 = new Http3Options { AllowServerPush = false } } ) ;
120+ var sm = CreateMachine ( ) ;
121121 var push = new Http3PushPromiseFrame ( 1 , new byte [ ] { 0x01 } ) ;
122122
123123 var result = sm . ProcessFrame ( push ) ;
124124
125125 Assert . Null ( result ) ;
126- Assert . Single ( _ops . Outbound ) ; // serialized CANCEL_PUSH frame
126+ Assert . Single ( _ops . Outbound ) ;
127127 Assert . IsType < TransportData > ( _ops . Outbound [ 0 ] ) ;
128128 }
129129
130130 [ Fact ( Timeout = 5000 ) ]
131131 public void ProcessFrame_should_warn_when_push_rejected ( )
132132 {
133- var sm = CreateMachine ( new TurboClientOptions { Http3 = new Http3Options { AllowServerPush = false } } ) ;
133+ var sm = CreateMachine ( ) ;
134134
135135 sm . ProcessFrame ( new Http3PushPromiseFrame ( 42 , new byte [ ] { 0x01 } ) ) ;
136136
137137 Assert . Contains ( _ops . Warnings , w => w . Contains ( "push promise rejected" ) && w . Contains ( "42" ) ) ;
138138 }
139139
140- [ Fact ( Timeout = 5000 ) ]
141- public void ProcessFrame_should_forward_push_promise_to_app_when_push_enabled ( )
142- {
143- var sm = CreateMachine ( new TurboClientOptions { Http3 = new Http3Options { AllowServerPush = true } } ) ;
144- var push = new Http3PushPromiseFrame ( 1 , new byte [ ] { 0x01 } ) ;
145-
146- var result = sm . ProcessFrame ( push ) ;
147-
148- Assert . Same ( push , result ) ; // forwarded to app layer
149- Assert . Empty ( _ops . Outbound ) ; // no CANCEL_PUSH sent
150- }
151-
152- [ Fact ( Timeout = 5000 ) ]
153- public void ProcessFrame_should_enforce_push_limit_when_push_enabled ( )
154- {
155- var sm = CreateMachine ( new TurboClientOptions { Http3 = new Http3Options { AllowServerPush = true } } ) ;
156-
157- // The default maxPushCount is 100 when AllowServerPush = true.
158- // Push 100 times to hit the limit, then one more should warn.
159- for ( var i = 0 ; i < 100 ; i ++ )
160- {
161- var forwarded = sm . ProcessFrame ( new Http3PushPromiseFrame ( i , new byte [ ] { 0x01 } ) ) ;
162- Assert . NotNull ( forwarded ) ; // each push is forwarded to app
163- }
164-
165- _ops . Warnings . Clear ( ) ;
166- var exceeded = sm . ProcessFrame ( new Http3PushPromiseFrame ( 100 , new byte [ ] { 0x01 } ) ) ;
167-
168- Assert . Null ( exceeded ) ; // push limit exceeded — not forwarded
169- Assert . Contains ( _ops . Warnings , w => w . Contains ( "Push limit exceeded" ) ) ;
170- }
171-
172140 [ Fact ( Timeout = 5000 ) ]
173141 public void ProcessFrame_should_absorb_cancel_push_frame ( )
174142 {
0 commit comments