Repository navigation
test(standard): give a stopped memory run a load-tolerant time to clean up - #142
Merged
Merged
Conversation
…an up After SIGTERM, the run closes the memory process (3 s for it to exit, then SIGKILL), writes the cancelled results and exits. The test gave this 12 s, which a loaded runner exceeds. Give it 60 s, the same time the test gives the memory process to start.
This was referenced Nov 16, 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.
Closes #112
What
test_sigterm_stops_a_real_memory_process_and_writes_cancelled_resultssends SIGTERM to a standard run, then waits for the run to exit withcommunicate. The upper limit of this wait is now 60 s, where it was 12 s. 60 s is the limit that the same test gives the memory process to start.communicatereturns when the run exits. Thus the wait already stops on a condition, and a passing run takes the same time as before. Only the limit changes. A wait on the cancelled results would add a poll loop and would not make the test shorter: the test must wait for the exit to check the exit code and the memory process.After SIGTERM, the run gives the memory process 3 s to exit, then kills its group. Then the run writes the cancelled results and exits. On a loaded machine, this can take more than 12 s. The exit code, cancelled-result and parse checks do not change.
Touches
backend · the standard (tests only)
app/tests/test_audit_regressions.pyVerified
Measured on e7c3e85. Rebased onto 4648c75, which changes nothing this test runs.
The backend suite,
python3 app/tests/parallel.py, in rootless Podman containers (python:3.12,--init --cpus 1), 12 runs on each side:TimeoutExpiredafter SIGTERMmemory did not startThe main failures are
subprocess.TimeoutExpired: ... timed out after 12 seconds, atcommunicate(timeout=12). Thememory did not startfailures are the 60 s wait before SIGTERM, which this change does not touch. They occurred only in the 6 runs on each side made while the host itself was overloaded.Other tests also fail at 1 CPU, on main and on this branch: on their own fixed waits, or because the image has no
uv. This change does not touch them.The test still fails when the run does not stop correctly. Each check used a local change that is not in this branch:
signal.SIG_IGNin place ofcli._exit_on_term()):TimeoutExpiredafter 60 s.os.killpgremoved fromjsonl.Proc.close):TimeoutExpiredafter 60 s.AssertionError: -15 != 143.Without a CPU limit, at this branch: backend suite
1991 tests in 116 modules: OK, route suite328 tests in 41 modules: OK.Risk
Low. The change is in test code only. Undo it with a revert.