@@ -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 :: ResumptionTicketsReceived )
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 :: ResumptionTicketsReceived )
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 :: ResumptionTicketsReceived )
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 :: ResumptionTicketsReceived )
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 :: ResumptionTicketsReceived )
401+ ) ;
382402 assert_matches ! ( pair. client_conn_mut( client_ch) . poll( ) , None ) ;
383403}
384404
@@ -596,7 +616,10 @@ fn zero_rtt_happypath() {
596616 Ok ( Some ( chunk) ) if chunk. offset == 0 && chunk. bytes == MSG
597617 ) ;
598618 let _ = chunks. finalize ( ) ;
599- assert_eq ! ( pair. client_conn_mut( client_ch) . lost_packets( ) , 0 ) ;
619+ assert_matches ! (
620+ pair. client_conn_mut( client_ch) . poll( ) ,
621+ Some ( Event :: ResumptionTicketsReceived )
622+ ) ;
600623}
601624
602625#[ test]
@@ -905,6 +928,10 @@ fn stream_id_limit() {
905928 pair. client_send ( client_ch, s) . write ( MSG ) . unwrap ( ) ;
906929 pair. client_send ( client_ch, s) . finish ( ) . unwrap ( ) ;
907930 pair. drive ( ) ;
931+ assert_matches ! (
932+ pair. client_conn_mut( client_ch) . poll( ) ,
933+ Some ( Event :: ResumptionTicketsReceived )
934+ ) ;
908935 assert_matches ! (
909936 pair. client_conn_mut( client_ch) . poll( ) ,
910937 Some ( Event :: Stream ( StreamEvent :: Finished { id } ) ) if id == s
@@ -1192,6 +1219,10 @@ fn idle_timeout() {
11921219 }
11931220
11941221 assert ! ( pair. time - start < Duration :: from_millis( 2 * IDLE_TIMEOUT ) ) ;
1222+ assert_matches ! (
1223+ pair. client_conn_mut( client_ch) . poll( ) ,
1224+ Some ( Event :: ResumptionTicketsReceived )
1225+ ) ;
11951226 assert_matches ! (
11961227 pair. client_conn_mut( client_ch) . poll( ) ,
11971228 Some ( Event :: ConnectionLost {
@@ -1271,6 +1302,10 @@ fn migration() {
12711302 assert_ne ! ( pair. server_conn_mut( server_ch) . total_recvd( ) , 0 ) ;
12721303
12731304 pair. drive ( ) ;
1305+ assert_matches ! (
1306+ pair. client_conn_mut( client_ch) . poll( ) ,
1307+ Some ( Event :: ResumptionTicketsReceived )
1308+ ) ;
12741309 assert_matches ! ( pair. client_conn_mut( client_ch) . poll( ) , None ) ;
12751310 assert_eq ! (
12761311 pair. server_conn_mut( server_ch) . remote_address( ) ,
@@ -1657,6 +1692,10 @@ fn finish_stream_flow_control_reordered() {
16571692 pair. server . finish_delay ( ) ; // Add flow control packets after
16581693 pair. drive ( ) ;
16591694
1695+ assert_matches ! (
1696+ pair. client_conn_mut( client_ch) . poll( ) ,
1697+ Some ( Event :: ResumptionTicketsReceived )
1698+ ) ;
16601699 assert_matches ! (
16611700 pair. client_conn_mut( client_ch) . poll( ) ,
16621701 Some ( Event :: Stream ( StreamEvent :: Finished { id } ) ) if id == s
@@ -1749,6 +1788,10 @@ fn stop_during_finish() {
17491788 pair. drive_server ( ) ;
17501789 pair. client_send ( client_ch, s) . finish ( ) . unwrap ( ) ;
17511790 pair. drive_client ( ) ;
1791+ assert_matches ! (
1792+ pair. client_conn_mut( client_ch) . poll( ) ,
1793+ Some ( Event :: ResumptionTicketsReceived )
1794+ ) ;
17521795 assert_matches ! (
17531796 pair. client_conn_mut( client_ch) . poll( ) ,
17541797 Some ( Event :: Stream ( StreamEvent :: Stopped { id, error_code: ERROR } ) ) if id == s
@@ -2036,6 +2079,10 @@ fn finish_acked() {
20362079 // Send FIN, receive data ack
20372080 info ! ( "client receives ACK, sends FIN" ) ;
20382081 pair. drive_client ( ) ;
2082+ assert_matches ! (
2083+ pair. client_conn_mut( client_ch) . poll( ) ,
2084+ Some ( Event :: ResumptionTicketsReceived )
2085+ ) ;
20392086 // Check for premature finish from data ack
20402087 assert_matches ! ( pair. client_conn_mut( client_ch) . poll( ) , None ) ;
20412088 // Process FIN ack
@@ -2074,6 +2121,10 @@ fn finish_retransmit() {
20742121 // Receive FIN ack, but no data ack
20752122 pair. drive_client ( ) ;
20762123 // Check for premature finish from FIN ack
2124+ assert_matches ! (
2125+ pair. client_conn_mut( client_ch) . poll( ) ,
2126+ Some ( Event :: ResumptionTicketsReceived )
2127+ ) ;
20772128 assert_matches ! ( pair. client_conn_mut( client_ch) . poll( ) , None ) ;
20782129 // Recover
20792130 pair. drive ( ) ;
0 commit comments