@@ -31,6 +31,8 @@ use crate::integration_tests::Http3Settings;
3131use crate :: integration_tests:: QuicSettings ;
3232use crate :: integration_tests:: TestConnectionHook ;
3333use datagram_socket:: QuicAuditStats ;
34+ use foundations:: telemetry:: with_test_telemetry;
35+ use foundations:: telemetry:: TestTelemetryContext ;
3436use futures:: SinkExt ;
3537use h3i;
3638use h3i:: actions:: h3:: send_headers_frame;
@@ -410,8 +412,8 @@ impl EarlyDataClient {
410412/// A client that resumes a session with 0-RTT, but never completes the
411413/// handshake while it keeps sending 0-RTT packets, must still be subject to
412414/// the handshake timeout, even though the application was already started.
413- #[ tokio:: test]
414- async fn handshake_timeout_after_0_rtt ( ) {
415+ #[ with_test_telemetry ( tokio:: test) ]
416+ async fn handshake_timeout_after_0_rtt ( cx : TestTelemetryContext ) {
415417 const HANDSHAKE_TIMEOUT : Duration = Duration :: from_secs ( 1 ) ;
416418
417419 let mut server = EarlyDataServer :: start ( HANDSHAKE_TIMEOUT ) . await ;
@@ -442,4 +444,17 @@ async fn handshake_timeout_after_0_rtt() {
442444
443445 server. assert_handshake_timeout ( & audit_stats) ;
444446 assert ! ( failed_handshake_timeouts( ) > failed_handshake_timeouts_before) ;
447+
448+ // A handshake timeout is an expected outcome, it must not be logged as an
449+ // error by the application.
450+ let error_logs: Vec < _ > = cx
451+ . log_records ( )
452+ . iter ( )
453+ . filter ( |record| record. level . as_str ( ) == "ERROR" )
454+ . map ( |record| record. message . clone ( ) )
455+ . collect ( ) ;
456+ assert ! (
457+ error_logs. is_empty( ) ,
458+ "unexpected error logs: {error_logs:?}"
459+ ) ;
445460}
0 commit comments