Repository navigation
test(audio): count only the test thread's sleeps in the AudioMixer wait tests (869fbyjzx) - #30
Merged
Merged
Conversation
…it tests (869fbyjzx) Seven tests patched time.sleep process-wide and counted every call. Under pytest-xdist, threads left running by other tests in the same worker sleep through that patch too: on PR #25's CI run the shared-budget check saw 6083 s of foreign sleeps against a 1 s ceiling. _this_thread_sleeps() records only the calls made by the test's own thread (foreign calls are still swallowed), with a guard test. Test-only change.
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.
Summary
tests/test_players_audiomixer.pypatchedtime.sleepprocess-wide in seven tests and counted every call. Under pytest-xdist, threads left running by other tests in the same worker sleep through that patch too. On #25's CI run, after its branch was updated to current rc_1,TestSharedBudget::test_total_wait_stays_within_the_ceiling[6-0.2-10]saw 6083 s of foreign sleeps against a 1 s ceiling (run 37822438513). The production wait is correct. The test was measuring other threads._this_thread_sleeps()records only calls made by the test's own thread. Foreign calls are still swallowed, as before. A guard test runs a foreign sleeping thread inside the patch.Changelog Line
Fixed: AudioMixer wait tests no longer count other tests' threads, which made CI fail intermittently.
Contribution Tier
src/cuemsengine/change.Tests & Lint
tests/test_players_audiomixer.py: 114 passed (local iteration).src/only.Notes for Reviewers
This unblocks #25. The same test exists on the rc5 line (
hotfix/rc5-6-orphan-kill, released as 0.1.0rc5-6); it does not affect the shipped deb.