Repository navigation
perf(test): wait for the stinger transition to stop instead of sleeping past the clip (#2072) - #3117
Merged
Merged
Conversation
…ng past the clip `test_stinger_media_duration` ran five cases, each sleeping `CLIP_MS + 2000` (3.6 s) after starting the transition, for 18 s of fixed sleep in a 23.5 s test. The transition already reports when it stops (`obs_transition_is_active()`), and the case's last assertion needs a scene B frame, which the program output shows. Wait for the transition to stop and then for that scene B frame, with the old sleep as the timeout, so no assertion loosens and a genuinely stuck transition still fails. Refs #2072.
zackees
enabled auto-merge
October 31, 2026 00:54
Member
Author
|
Handed off to the coordinator. #3117 is ready with auto-merge on: |
3 of 4 tasks
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.
Refs #2072 (item 4: shorten the real-time Tier 2 tests).
What
test_stinger_media_durationslept a fixedCLIP_MS + 2000ms (3.6 s) after starting the transition, in each of its five cases: 18 s of the test's 23.5 s. The transition already reports its own state, so wait for it instead:wait_transition_stopped()pollsobs_transition_is_active()every 5 ms until the transition stops ticking (the clip has played to its end), with the oldCLIP_MS + 2000as the timeout, so a stuck transition still fails rather than hanging.wait_shows_scene_b()then waits (up to 1 s) for the program output's last recorded frame to be scene B, which the case's final assertion needs. That replaces the "a while after it has ended" part of the sleep instead of assuming the tail frames arrived.No assertion changed; the same frames must be seen, and the failure messages for a transition that never stops or never shows scene B are new and explicit.
Measured (this checkout's warm Tier 2 volume, xvfb-run,
LP_NUM_THREADS=1)libobs-c-referencelibobsAbout -8.6 s (-37%) per mode, i.e. ~17 s off the
tests ON/tests OFFlanes together. Six consecutive runs passed in each mode; the seven remaining fixed sleeps are the 700/1500 ms clip-open wait in this test (no public "clip open" signal) and the waits intest_vlc_audio_pacing,test_vlc_playlist_gap,test_pipewire_screencast_resume,test_portal_shortcutsandtest_inhibit_sleep_dbus, which are already condition waits or assert that something does not happen inside a real-time window (a 1 s wait for "no next item started" cannot be shortened without weakening it).Tiers
Tier 1/2 only: this is the unchanged C characterization test; the Tier 2 lanes build and run it. No user-visible change, so no
docs/features.mdline.Local gate stamp: none — the change is one cmocka test, and the Tier 2 lanes carry it.