Repository navigation
test(mixer): link a late test input fully before it can start - #1041
Merged
Merged
Conversation
test_late_input_at_another_rate_is_resampled added a live audiotestsrc and a capsfilter to the running pipeline and started the source first. On the Linux runner the capsfilter sometimes pushed before it had a peer and the flow failed with not-linked (5 of 80 runs of mixer::tests). Keep both locked until linked, then start the capsfilter first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
blocks::builtin::mixer::tests::test_late_input_at_another_rate_is_resampledfails now and then on the Linux runner. It hit main and #1029:A diagnostic branch ran
mixer::tests80 times onubuntu-24.04and failed 5 times. On each failure the test dumped every pad in its pipeline:decoded) hadNotLinkedas its sink pad's last flow return;convert_0, the mixer input it feeds, had no error;So the capsfilter pushed before its src pad had a peer. The test added the source and capsfilter to the running pipeline and linked them, but they could start before the capsfilter's link to the mixer existed. The test also started the source before the capsfilter.
Change
Test only. The late source and capsfilter stay
set_locked_state(true)until they are fully linked into the mixer, and are then started downstream first. That is the usual way to add elements to a running pipeline. The test still checks the same thing: a late input at another rate links into a running mixer and is heard on main and on an aux bus.Evidence
mixer::testseach:Tests
Ran (macOS, GStreamer 1.28.6):
cargo test --lib late_input(passed). Linux: the runner statistics above.Out of scope
🤖 Generated with Claude Code