@@ -128,6 +128,10 @@ fn lifecycle() {
128128 let _guard = subscribe ( ) ;
129129 let mut pair = Pair :: default ( ) ;
130130 let ( client_ch, server_ch) = pair. connect ( ) ;
131+ assert_matches ! (
132+ pair. client_conn_mut( client_ch) . poll( ) ,
133+ Some ( Event :: ResumptionEnabled )
134+ ) ;
131135 assert_matches ! ( pair. client_conn_mut( client_ch) . poll( ) , None ) ;
132136 assert ! ( pair. client_conn_mut( client_ch) . using_ecn( ) ) ;
133137 assert ! ( pair. server_conn_mut( server_ch) . using_ecn( ) ) ;
@@ -161,6 +165,10 @@ fn draft_version_compat() {
161165 let mut pair = Pair :: default ( ) ;
162166 let ( client_ch, server_ch) = pair. connect_with ( client_config) ;
163167
168+ assert_matches ! (
169+ pair. client_conn_mut( client_ch) . poll( ) ,
170+ Some ( Event :: ResumptionEnabled )
171+ ) ;
164172 assert_matches ! ( pair. client_conn_mut( client_ch) . poll( ) , None ) ;
165173 assert ! ( pair. client_conn_mut( client_ch) . using_ecn( ) ) ;
166174 assert ! ( pair. server_conn_mut( server_ch) . using_ecn( ) ) ;
@@ -206,6 +214,10 @@ fn server_stateless_reset() {
206214 pair. client . connections . get_mut ( & client_ch) . unwrap ( ) . ping ( ) ;
207215 info ! ( "resetting" ) ;
208216 pair. drive ( ) ;
217+ assert_matches ! (
218+ pair. client_conn_mut( client_ch) . poll( ) ,
219+ Some ( Event :: ResumptionEnabled )
220+ ) ;
209221 assert_matches ! (
210222 pair. client_conn_mut( client_ch) . poll( ) ,
211223 Some ( Event :: ConnectionLost {
@@ -327,6 +339,10 @@ fn finish_stream_simple() {
327339 pair. client_send ( client_ch, s) . finish ( ) . unwrap ( ) ;
328340 pair. drive ( ) ;
329341
342+ assert_matches ! (
343+ pair. client_conn_mut( client_ch) . poll( ) ,
344+ Some ( Event :: ResumptionEnabled )
345+ ) ;
330346 assert_matches ! (
331347 pair. client_conn_mut( client_ch) . poll( ) ,
332348 Some ( Event :: Stream ( StreamEvent :: Finished { id } ) ) if id == s
@@ -379,6 +395,10 @@ fn reset_stream() {
379395 let mut chunks = recv. read ( false ) . unwrap ( ) ;
380396 assert_matches ! ( chunks. next( usize :: MAX ) , Err ( ReadError :: Reset ( ERROR ) ) ) ;
381397 let _ = chunks. finalize ( ) ;
398+ assert_matches ! (
399+ pair. client_conn_mut( client_ch) . poll( ) ,
400+ Some ( Event :: ResumptionEnabled )
401+ ) ;
382402 assert_matches ! ( pair. client_conn_mut( client_ch) . poll( ) , None ) ;
383403}
384404
@@ -597,6 +617,10 @@ fn zero_rtt_happypath() {
597617 ) ;
598618 let _ = chunks. finalize ( ) ;
599619 assert_eq ! ( pair. client_conn_mut( client_ch) . stats( ) . path. lost_packets, 0 ) ;
620+ assert_matches ! (
621+ pair. client_conn_mut( client_ch) . poll( ) ,
622+ Some ( Event :: ResumptionEnabled )
623+ ) ;
600624}
601625
602626#[ test]
@@ -905,6 +929,10 @@ fn stream_id_limit() {
905929 pair. client_send ( client_ch, s) . write ( MSG ) . unwrap ( ) ;
906930 pair. client_send ( client_ch, s) . finish ( ) . unwrap ( ) ;
907931 pair. drive ( ) ;
932+ assert_matches ! (
933+ pair. client_conn_mut( client_ch) . poll( ) ,
934+ Some ( Event :: ResumptionEnabled )
935+ ) ;
908936 assert_matches ! (
909937 pair. client_conn_mut( client_ch) . poll( ) ,
910938 Some ( Event :: Stream ( StreamEvent :: Finished { id } ) ) if id == s
@@ -1192,6 +1220,10 @@ fn idle_timeout() {
11921220 }
11931221
11941222 assert ! ( pair. time - start < Duration :: from_millis( 2 * IDLE_TIMEOUT ) ) ;
1223+ assert_matches ! (
1224+ pair. client_conn_mut( client_ch) . poll( ) ,
1225+ Some ( Event :: ResumptionEnabled )
1226+ ) ;
11951227 assert_matches ! (
11961228 pair. client_conn_mut( client_ch) . poll( ) ,
11971229 Some ( Event :: ConnectionLost {
@@ -1271,6 +1303,10 @@ fn migration() {
12711303 assert_ne ! ( pair. server_conn_mut( server_ch) . total_recvd( ) , 0 ) ;
12721304
12731305 pair. drive ( ) ;
1306+ assert_matches ! (
1307+ pair. client_conn_mut( client_ch) . poll( ) ,
1308+ Some ( Event :: ResumptionEnabled )
1309+ ) ;
12741310 assert_matches ! ( pair. client_conn_mut( client_ch) . poll( ) , None ) ;
12751311 assert_eq ! (
12761312 pair. server_conn_mut( server_ch) . remote_address( ) ,
@@ -1657,6 +1693,10 @@ fn finish_stream_flow_control_reordered() {
16571693 pair. server . finish_delay ( ) ; // Add flow control packets after
16581694 pair. drive ( ) ;
16591695
1696+ assert_matches ! (
1697+ pair. client_conn_mut( client_ch) . poll( ) ,
1698+ Some ( Event :: ResumptionEnabled )
1699+ ) ;
16601700 assert_matches ! (
16611701 pair. client_conn_mut( client_ch) . poll( ) ,
16621702 Some ( Event :: Stream ( StreamEvent :: Finished { id } ) ) if id == s
@@ -1749,6 +1789,10 @@ fn stop_during_finish() {
17491789 pair. drive_server ( ) ;
17501790 pair. client_send ( client_ch, s) . finish ( ) . unwrap ( ) ;
17511791 pair. drive_client ( ) ;
1792+ assert_matches ! (
1793+ pair. client_conn_mut( client_ch) . poll( ) ,
1794+ Some ( Event :: ResumptionEnabled )
1795+ ) ;
17521796 assert_matches ! (
17531797 pair. client_conn_mut( client_ch) . poll( ) ,
17541798 Some ( Event :: Stream ( StreamEvent :: Stopped { id, error_code: ERROR } ) ) if id == s
@@ -2036,6 +2080,10 @@ fn finish_acked() {
20362080 // Send FIN, receive data ack
20372081 info ! ( "client receives ACK, sends FIN" ) ;
20382082 pair. drive_client ( ) ;
2083+ assert_matches ! (
2084+ pair. client_conn_mut( client_ch) . poll( ) ,
2085+ Some ( Event :: ResumptionEnabled )
2086+ ) ;
20392087 // Check for premature finish from data ack
20402088 assert_matches ! ( pair. client_conn_mut( client_ch) . poll( ) , None ) ;
20412089 // Process FIN ack
@@ -2074,6 +2122,10 @@ fn finish_retransmit() {
20742122 // Receive FIN ack, but no data ack
20752123 pair. drive_client ( ) ;
20762124 // Check for premature finish from FIN ack
2125+ assert_matches ! (
2126+ pair. client_conn_mut( client_ch) . poll( ) ,
2127+ Some ( Event :: ResumptionEnabled )
2128+ ) ;
20772129 assert_matches ! ( pair. client_conn_mut( client_ch) . poll( ) , None ) ;
20782130 // Recover
20792131 pair. drive ( ) ;
0 commit comments