diff --git a/rs/moq-net/tests/integration/relay_upstream_close.rs b/rs/moq-net/tests/integration/relay_upstream_close.rs index 4c9eb212682..b91004d3ffa 100644 --- a/rs/moq-net/tests/integration/relay_upstream_close.rs +++ b/rs/moq-net/tests/integration/relay_upstream_close.rs @@ -9,7 +9,9 @@ //! //! Deterministic: simulated time over the mock transport. The relay's group streams to //! the subscriber are held, with a one-message stream buffer, so the relay still holds -//! most of each track when the upstream session ends. +//! most of each track when the upstream session ends. The publisher's FINs are +//! acknowledged on arrival, as QUIC does, so its close can drain before the relay reads +//! them. use crate::support; @@ -134,6 +136,7 @@ async fn round(name: &str, end: End) -> Vec { .expect("no subscriber appeared"); } + upstream.server_transport.ack_fins(); // The subscriber now reads nothing until the upstream session is gone. downstream.server_transport.hold_unis(); for track in &tracks { @@ -177,10 +180,10 @@ async fn round(name: &str, end: End) -> Vec { outcomes } -/// Every frame of every track, then a clean end. Lite03 and Lite04 declare no end, so the -/// relay is still waiting out its tail grace when the session goes, and on a close each -/// track's SUBSCRIBE FIN is its only end: the transport acknowledges it, which lets the -/// close drain, before the relay has read it. +/// Every frame of every track, then a clean end. On a close the transport acknowledges each +/// track's SUBSCRIBE FIN, which lets the close drain, before the relay has read it, so the +/// relay must still read it from the closed session. Lite03 and Lite04 declare no end, so +/// there the relay is still waiting out its tail grace and the FIN is the track's only end. #[moq_clock::test] async fn relay_delivers_finished_tracks_after_upstream_closes() { let want: Vec<(u64, u64)> = (0..GROUPS)