joule-moq-ingest: the SRT test's burst of losses mid-stream, not where the publisher closes #548

Merged
dcharlot merged 1 commit from test/srt-burst-mid-stream into main 2026-10-30 09:02:54 -04:00

View file

@ -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);