From 9ef883cf2cd17c25ab652fcb2b6a336986e43535 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Mon, 12 Oct 2026 20:52:32 -0700 Subject: [PATCH] test(net): subscribe the back-to-back loom model from group 0 An unfloored subscriber on an untimed track starts at the latest group, so loom found the interleaving where both groups land before subscribe resolves and the subscriber only ever sees the second. Co-Authored-By: Claude Opus 5.5 --- rs/moq-net/tests/loom.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rs/moq-net/tests/loom.rs b/rs/moq-net/tests/loom.rs index 25d201c651..23312ea544 100644 --- a/rs/moq-net/tests/loom.rs +++ b/rs/moq-net/tests/loom.rs @@ -80,6 +80,9 @@ fn frame_reaches_a_parked_subscriber() { /// Two groups written back to back must both reach the subscriber in order. This is /// the path where the producer takes the waiter list for group 1 and wakes outside /// the lock while group 2 is already being written. +/// +/// The subscription starts at group 0: an unfloored subscriber on an untimed track +/// starts at the latest group, so one opened after both writes would only see the second. #[test] fn back_to_back_groups_arrive_in_order() { model(|| { @@ -96,7 +99,8 @@ fn back_to_back_groups_arrive_in_order() { track.finish().expect("finish track"); }); - let mut subscriber = block_on(track_consumer.subscribe(None)).expect("subscribe"); + let from_start = moq_net::track::Subscription::default().with_start(moq_net::track::Position::group(0)); + let mut subscriber = block_on(track_consumer.subscribe(from_start)).expect("subscribe"); let first = block_on(subscriber.recv_group()).expect("recv").expect("first group"); let second = block_on(subscriber.recv_group()).expect("recv").expect("second group"); assert!(second.sequence > first.sequence, "groups arrived out of order");