diff --git a/joule-code/joule-code-rs/crates/joule-moq-ingest/tests/contrib_srt.rs b/joule-code/joule-code-rs/crates/joule-moq-ingest/tests/contrib_srt.rs index 8ee5ac745..c00b390af 100644 --- a/joule-code/joule-code-rs/crates/joule-moq-ingest/tests/contrib_srt.rs +++ b/joule-code/joule-code-rs/crates/joule-moq-ingest/tests/contrib_srt.rs @@ -101,8 +101,11 @@ async fn run() { let s = open_srt(&w, &auth).await; let sid = s["stream_id"].as_str().unwrap(); assert!(sid.starts_with(&format!("#!::r={}/{},m=publish,s=", hex::encode(w.room), w.owner())), "{sid}"); - // 3% of the datagrams dropped each way, and a burst of six toward the gateway. - let up = Impair { loss_ppm: 30_000, drop_index: &[200, 201, 202, 203, 204, 205], ..Impair::default() }; + // 3% of the datagrams dropped each way, and a burst of six toward the gateway, mid-stream. + // The publisher closes after about 211 datagrams and sends its three SHUTDOWNs back to + // back; a burst at 200 swallowed all three when a host sent a few fewer before the close, + // and the gateway ended the session by its idle timeout. + let up = Impair { loss_ppm: 30_000, drop_index: &[100, 101, 102, 103, 104, 105], ..Impair::default() }; let px = Proxy::start(w.gateway.srt_addr.unwrap(), up, Impair { loss_ppm: 30_000, ..Impair::default() }, 0xabc).await.unwrap(); let link = timeout(STEP, srt::call(px.addr, call_cfg(&s))).await.unwrap().expect("the call is admitted"); assert_eq!(link.info.cipher_bits, 128);