tests: relax 5s pytest-timeout marks that flake on slow CI runners - #9448
Merged
Conversation
The four timeout=5 marks added in #9433 use method="thread", so the 5-second budget covers fixture setup and teardown as well as the test body. Tearing down the mm2_download_queue fixture alone takes up to ~1s (five worker threads polling the queue at a 1-second interval), and on a heavily loaded CI runner the total easily exceeds 5s: the py3.11 windows-cpu job on #9447 timed out in test_base_exception_during_startup_releases_import_waiters during download-queue teardown, and an unrelated branch hit the same timeout in test_import_fails_after_startup_failure on linux-cpu the same day. Neither dump showed a deadlock - the workers were in their normal poll loop. Bump these marks to 30s, matching the other timeout marks in this file. The timeouts exist to catch hangs, not to enforce speed, so the larger budget loses nothing. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Pfannkuchensack
approved these changes
Aug 2, 2026
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
Bumps the four
@pytest.mark.timeout(timeout=5, method="thread")marks intests/app/services/model_install/test_model_install.py(added in #9433) totimeout=30, matching the other timeout marks in the file.Why
With
method="thread", the timeout budget covers fixture setup and teardown as well as the test body. Tearing down themm2_download_queuefixture alone takes up to ~1s (stop()joins five worker threads that poll the queue at a 1-second interval), and on a heavily loaded CI runner the total easily exceeds 5s.This flaked twice on the same day, on different platforms and unrelated branches:
py3.11: windows-cpuon fix: don't hold VRAM in an idle server (CUDA context at startup) #9447: timed out intest_base_exception_during_startup_releases_import_waiters, during download-queue teardown (job). The same run's slowness is visible elsewhere —test_missing_models.pytook 98s for 9 tests.py3.11: linux-cpuonfeat/fp8_quantized_guard: timed out intest_import_fails_after_startup_failure(job).Neither stack dump showed a deadlock — the download workers were sitting in their normal 1-second poll loop and the main thread was in routine teardown. The runner was just slow.
The timeout marks exist to catch hangs, not to enforce speed, so the larger budget loses nothing: a genuine hang still fails, just 25 seconds later.
Testing
🤖 Generated with Claude Code