@@ -91,9 +91,10 @@ test_initial_token_odd_sz( fd_quic_t * server_quic,
9191 /* Verify server sent a retry packet (difference-based check) */
9292 FD_TEST ( server_quic -> metrics .conn_retry_cnt == initial_retry_count + 1 );
9393
94- /* Verify the 46-byte token was counted in the "other sizes" category */
94+ /* Verify the 46-byte token was counted in the "other sizes" category
95+ See test_retry_integration for details on the expected increases */
9596 FD_TEST ( server_quic -> metrics .initial_token_len_cnt [2 ] == initial_token_len_other + 1 );
96- FD_TEST ( server_quic -> metrics .initial_token_len_cnt [1 ] == initial_token_len_our + 1 );
97+ FD_TEST ( server_quic -> metrics .initial_token_len_cnt [1 ] == initial_token_len_our + 2 );
9798
9899 /* Verify the connection was created */
99100 FD_TEST ( server_quic -> metrics .conn_created_cnt == conn_created_count + 1 );
@@ -126,10 +127,13 @@ test_retry_integration( fd_quic_t * server_quic,
126127 FD_TEST ( server_quic -> metrics .conn_created_cnt == 1 );
127128 FD_TEST ( server_quic -> metrics .conn_retry_cnt == 1 );
128129
129- /* Check initial token length metrics - should have seen 1 packet with no token (idx 0)
130- and 1 packet with retry token (idx 1) */
130+ /* Check initial token length metrics - should have seen:
131+ * 1 packet with no token (idx 0), the very first initial
132+ * 2 packets with retry token with correct fd_quic len (idx 1):
133+ - first the Initial with crypto frames triggered by Retry
134+ - second an Initial with ack frame, ACKing server Initial */
131135 FD_TEST ( server_quic -> metrics .initial_token_len_cnt [0 ] == 1 ); /* no token */
132- FD_TEST ( server_quic -> metrics .initial_token_len_cnt [1 ] == 1 ); /* retry token */
136+ FD_TEST ( server_quic -> metrics .initial_token_len_cnt [1 ] == 2 ); /* retry token */
133137 FD_TEST ( server_quic -> metrics .initial_token_len_cnt [2 ] == 0 ); /* other sizes */
134138 /* Server: Retry, Initial, Handshake
135139 Client: Initial, Initial, Handshake */
0 commit comments