Repository navigation
tests: the parallel timeout case no longer times out its healthy modules on a loaded CPU (TEST-SEMANTIC-TIMEOUT-QUICK-LOAD) - #2135
Draft
Anonymous78e wants to merge 1 commit into
Conversation
…les on a loaded CPU (TEST-SEMANTIC-TIMEOUT-QUICK-LOAD) test_parallel_timeout_reports_partial_output_and_keeps_healthy_modules ran the whole suite under --timeout 1. The limit applies to every module, so on a loaded CPU the two healthy modules timed out as well and the run reported "3 files, 0 tests, 3 files failed". The run now gets a 10 s limit, which the healthy modules do not reach, while the hanging module sleeps for 60 s and still times out; the subprocess limit of this one call is raised to 60 s to leave room for it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Note 🤖 gpt-6.2-sol responding on behalf of EdenBendheim Independent verification of head
The roughly nine-second increase in the test suite is the expected tradeoff for this fix. No blocking findings. |
|
Checked on main a73a57e (Ubuntu 24.04 x86-64, 2 cores, Python 3.13). Merges cleanly. python -I tests/test_run_semantic_tests.py: 26 tests OK with this PR (14.9 s), and also OK on main (15.1 s): this machine is not loaded enough to reproduce the timeout the PR fixes, so this is only a no-regression check. AI-assisted: yes (Claude Code) |
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.
Claimed in the coordination issue as: TEST-SEMANTIC-TIMEOUT-QUICK-LOAD (#1608 (comment))
What and why
tests/test_run_semantic_tests.py::RunnerTest::test_parallel_timeout_reports_partial_output_and_keeps_healthy_modulesruns a hanging module and two healthy ones with-j 2 --timeout 1.--timeoutlimits every module subprocess, so when the CPU is busy the healthy modules also hit the 1 s limit, even after unittest has printedOK, and the test fails with3 files, 0 tests, 3 files failed(or2 files failed) instead of3 files, 4 tests, 1 files failed. I first saw it while running the standard-library tests in parallel on Windows.The run now uses
--timeout 10. The healthy modules do not reach that limit, and the hanging module sleeps for 60 s, so it still times out and the test still checks the partial output, theTIMED OUT after 10 sline and the count.cli()takes an optional subprocess limit (15 s by default, as before), and this call uses 60 s. Test-only; the runner is not changed. Same kind of fix as #1427.Tested
Windows 11, Python 3.13, on
mainab2fb71, running only this test (python -I tests/test_run_semantic_tests.py RunnerTest.test_parallel_timeout_reports_partial_output_and_keeps_healthy_modules), with 32 busy-looping processes on a 16-thread CPU:mainThe whole file passes (26 tests, 1 skipped, about 40 s, the same as before), also after rebasing onto
mainb739685.python -I scripts/check_no_game_data.py tests/test_run_semantic_tests.pyis clean.Limit: with 48 busy processes (3 times the CPU) a module can still take more than 10 s just to start, and 2 of 10 runs failed. A higher limit would make every run of this test that much longer.
GPUs tested: n/a (no GPU involved)
AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)🤖 Generated with Claude Code