Pause relay test time while inspecting handshake diagnostics (#55848)

Pause Tokio time after the validation timeout in
`malformed_handshakes_preserve_active_streams_and_admission_recovers`
while inspecting diagnostics, since that inspection does not poll the
harness WebSocket for pings. Resume time before closing the WebSocket so
the close handshake and its timeout run with an active clock.

GitOrigin-RevId: 733a1fa35f80561424be97c4beb233780a7796cb
This commit is contained in:
jif
2026-10-21 09:57:27 +00:00
committed by copyberry
parent 21b1f5f534
commit 4faf60f126
@@ -794,6 +794,10 @@ async fn malformed_handshakes_preserve_active_streams_and_admission_recovers() -
next_relay_frame(&mut harness_websocket),
)
.await??;
if authorization == "timeout-authorization-secret" {
// Diagnostic inspection does not poll the harness socket for pings.
tokio::time::pause();
}
assert_eq!(reset.stream_id, stream_id);
assert_eq!(reset.validate()?, RelayFrameBodyKind::Reset);
}
@@ -816,6 +820,8 @@ async fn malformed_handshakes_preserve_active_streams_and_admission_recovers() -
})
}));
// Keep the close handshake and its timeout on a running clock.
tokio::time::resume();
harness_websocket.close(None).await?;
assert_eq!(
timeout(Duration::from_secs(1), environment_task).await??,