Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions quest/m0/test-flakes-2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,11 @@ closed, left no finished record, so the final catalog snapshot started the
rendition again and replayed a group on its held pad. A failure now counts as
the track's end, fixed by [moq-dev/moq#8160](https://github.com/moq-dev/moq/pull/8160).

Added 2026-11-07 (maintainer, /quest-complete): moq-gst's stale-completion
sink test, which failed once in 30 stress iterations in
[moq-dev/moq#8160](https://github.com/moq-dev/moq/pull/8160)'s validation.
It is quarantined with `#[ignore]` until its child fixes it.
moq-gst's stale-completion sink test, which failed once in 30 stress iterations
in [moq-dev/moq#8160](https://github.com/moq-dev/moq/pull/8160)'s validation,
because the sink reported a stopped session as a terminal failure; the session
now tells a stop from a give-up through `Connection::closed`, fixed by
[moq-dev/moq#8246](https://github.com/moq-dev/moq/pull/8246).

`js/net`'s lite-07 relative-start integration test, which failed once on main in
[moq-dev/moq#8165](https://github.com/moq-dev/moq/pull/8165)'s baseline run,
Expand All @@ -193,6 +194,5 @@ Public API: none. Wire: none.
## Required

- [Fallback playback](/quest/m0/test-flakes-2/ietf22-fallback.md) - a browser viewer follows a fallback within the media lane's bound without dropping its session
- [moq-gst's stale-completion sink test survives load](/quest/m0/test-flakes-2/gst-stale-completion.md) - `a_stale_completion_cannot_end_the_next_publication` passes under stress, and its `#[ignore]` is removed
- [The http:// fingerprint tests survive a slow fetch](/quest/m0/test-flakes-2/fingerprint-host-clock.md) - a fingerprint fetch slower than the 500 ms hedge no longer trips the host-clock guard
- [A lite-07 reply FINs instead of resetting when the subscriber FINs mid-write](/quest/m0/test-flakes-2/lite07-reply-fin.md) - `js/net`'s empty-window reply test passes under `--rerun-each 200`, fixed in the publisher
29 changes: 0 additions & 29 deletions quest/m0/test-flakes-2/gst-stale-completion.md

This file was deleted.

1 change: 0 additions & 1 deletion rs/moq-gst/src/sink/imp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2236,7 +2236,6 @@ mod tests {
// A task outliving its session writes into the handle nobody reads any more. Scoping falls out of
// the topology: no id comparison guards the state the pads see.
#[test]
#[ignore = "flaky under stress; investigation: quest/m0/test-flakes-2/gst-stale-completion.md"]
fn a_stale_completion_cannot_end_the_next_publication() {
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
gst::init().unwrap();
let sink = sink();
Expand Down
29 changes: 27 additions & 2 deletions rs/moq-gst/src/sink/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,6 @@ impl Session {
/// wait, that dial outlives the state change an application waits on before it exits (`gst-launch`
/// right after NULL).
pub fn stop(self) {
// The status task goes first, so it never reports the loop's end as a failure.
self.join.abort();
self.connection.abort(moq_net::Error::Cancel);
crate::block_on(async {
Expand Down Expand Up @@ -474,7 +473,13 @@ async fn forward_registered(
}
notify(&element, &["status", "connected", "moq-version", "connection-stats"]);
}
Err(err) => {
Err(_) => {
// `closed` tells a stop from a give-up. A stop is what `Session::stop` asked for: its
// abort cannot cancel a poll already in flight, so the loop's end can reach the task
// before the task ends.
let Err(err) = reconnect.closed().await else {
return;
};
// The reconnect loop stopped on a terminal error (a non-retryable auth failure, or a
// bounded backoff's give-up). Ending the publication stops the pad threads feeding a
// dead session; losing that race means it already ended, so there is nothing to report.
Expand Down Expand Up @@ -627,6 +632,26 @@ mod tests {
assert!(is_closed(&connection));
}

// The losing order of a stop: the status task polls only after the loop it follows has ended.
#[test]
fn a_local_stop_is_not_a_session_failure() {
let (session, connection) = started();
let completion = session.completion();
let status = session.status().clone();
connection.abort(moq_net::Error::Cancel);
let _ = crate::block_on(connection.closed());
crate::block_on(forward_registered(
connection,
moq_tokio::origin::spawn(),
status.clone(),
completion.clone(),
glib::WeakRef::new(),
));
assert!(completion.is_open(), "the stopped publication is not failed");
assert_ne!(status.status(), ConnectionStatus::Failed);
session.stop();
}

#[tokio::test]
async fn a_terminal_result_waits_until_the_session_is_registered() {
let gate = Arc::new(tokio::sync::Notify::new());
Expand Down
1 change: 0 additions & 1 deletion sh/gh/test-inventory.allow
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ ignore moq-video::render::export::dx12::tests::exports_an_nv12_texture /quest/m5
ignore moq-video::render::export::dx12::tests::media_foundation_encodes_the_export_in_place /quest/m5/video-hardware.md

# Quarantined flakes, re-enabled by the quest that fixes them.
ignore moq-gst::sink::imp::tests::a_stale_completion_cannot_end_the_next_publication /quest/m0/test-flakes-2/gst-stale-completion.md

# Need another implementation to speak the route wire; the quest ports it.
ignore moq-net::test_interop::lite_tracks_interop /quest/m2/cluster-routing/routes/js.md
Expand Down
Loading