Repository navigation
Conversation
The shared wait() gave a run 10 s to end. On a loaded machine a run that works can take longer. join() returns when the run ends, so a passing test takes the same time as before.
The kit isolation tests gave each setup and score request 10 s. On a loaded machine the driver can take longer. request() returns at the reply, so a passing test takes the same time as before.
The test gave each of its three runs 15 s to end, and the whole driver 120 s. On a loaded machine a run that works can take longer. Each run now has 60 s and the driver 240 s, room for the three runs. join() and run() return at the end, so a passing test takes the same time as before.
The check details test gave each kit driver 10 s to reply to units. On a loaded machine a driver that works can take longer. request() returns at the reply, so a passing test takes the same time as before.
The scope test gave the child of a killed group 0.2 s to go. On a loaded machine it can take longer. The test now polls with gone(), as the other process tests do, for up to 30 s. The limit stays under the child's own 60 s sleep, so a child that the run leaves running still fails the test. gone() returns when the child is gone, so a passing test takes no longer than before.
harenome
marked this pull request as draft
November 17, 2026 10:20
This branch has not been deployed
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 #169
What
Six backend tests give a run, a kit driver or a killed process a fixed time to end, to reply or to go: 10 s, 15 s or 0.2 s. On a loaded machine this can take longer, and the test fails. Each wait now has an upper limit of 60 s, the limit that #142 gives the SIGTERM test of a memory run, or 30 s where 60 s is too long for the test.
Each wait stops on its condition:
Thread.joinreturns when the run ends,jsonl.Proc.requestreturns at the reply, andgone()returns when the process is gone. Thus a passing test takes no longer than before. Only the upper limit changes.wait()inapp/tests/execution_support.py: 60 s for the run's end, where it was 10 s. This is the shared helper of the execution tests. Calls that give their own time do not change.test_kit_check_isolationWorkspaceKit: 60 s for eachsetupandscorereply, where it was 10 s.test_standard_payloadinstalled snapshot test: 60 s for each of its three runs, where it was 15 s. The upper limit of its driver subprocess is now 240 s, where it was 120 s, so that the three runs fit.test_standard_definitionstest_catalogue_check_details_cover_the_driver_units: 60 s for each driver'sunitsreply, where it was 10 s.test_constraintstest_a_unit_past_its_timeout_is_killed_with_its_group: polls withgone()fromexecution_support, as the other process tests do, for up to 30 s, where it slept 0.2 s and then checked once. The limit stays under the child's ownsleep 60, so a child that the run leaves running still fails the test.gone()counts a zombie as gone, because a zombie runs nothing.Touches
backend · the standard (tests only)
app/tests/execution_support.pyapp/tests/test_kit_check_isolation.pyapp/tests/test_standard_payload.pyapp/tests/test_standard_definitions.pyapp/tests/test_constraints.pyVerified
The backend suite,
python3 app/tests/parallel.py, in rootless Podman containers (python:3.12,--init --cpus 1), two containers at a time. Main: 12 runs on ce8b39d. This branch: 18 runs at its tip, 12 on b11083b and 6 on 411b985. These bases change nothing that the tests wait for.KeyCutShort.test_a_harbor_run_gets_the_agent_keys_and_the_standard_noneCrashAtLaunch.test_a_part_started_before_its_pid_was_saved_runs_onceWorkspaceKit.test_a_planted_link_is_not_followedSnapshot.test_installed_local_execution_has_one_backend_provider_and_keeps_helpers_and_proof_writesProblems.test_catalogue_check_details_cover_the_driver_unitsScope.test_a_unit_past_its_timeout_is_killed_with_its_groupThe further runs used the same suite and load, while the fixes for the other tests were applied one by one. Each count is of the runs made while that test itself was unchanged.
Other tests failed in some runs. This change does not touch them, and they have other causes:
test_standard_runRunTest.test_a_cap_per_unit_cuts_off_the_unit_that_reaches_it_and_the_run_goes_on, 1 of the 18 runs on this branch: a unit other than the capped one was notresolved. Its outcome was not kept.test_run_deleteRunDelete.test_it_asks_what_goes, 2 of the further runs on b11083b:['b', 'a'] != ['a', 'b']. The test expects workspaces a and b in creation order.workspace.list_allorders them byopened, a timestamp in whole seconds, most recent first. Under load the two creations fall in different seconds.test_execution_stopStopAtLaunch.test_a_part_started_by_a_launcher_cut_short_here_is_stopped, 1 of the further runs:the part ran to its end after the Stop. The part sleeps 3 s, and the Stop must reach it before then. This is a race in the checked behaviour, not an upper limit on a wait.Each test still fails when the behaviour it checks is wrong. Each check used a local change that is not in this branch, and ran in a container at
--cpus 1:threading.Event().wait()at the start ofExecution._main)KeyCutShortharbor testthe run did not end, after 60 s for each of 3 subtestsCrashAtLaunchthe run did not end, after 60 s for each of 2 subtestsfixture did not finish, after 60 s_agent_keys = {})KeyCutShortharbor test'cursor=none' != 'cursor=cur-...', at oncefollowalways false)CrashAtLaunchfollowing a againline, at onceO_NOFOLLOW)test_a_planted_link_is_not_followed(True, 'nullius-ok') != (False, None), at oncescoretest_a_planted_link_is_not_followedscore: no reply in 60 sunitstest_catalogue_check_details_cover_the_driver_unitsunits: no reply in 60 stest_catalogue_check_details_cover_the_driver_units['write', 'fix'] != ['write', 'fix', 'extra'], at oncep.kill()in place of_kill_group(p)inrun_group)test_a_unit_past_its_timeout_is_killed_with_its_groupthe background child outlived its group, after 30 sWithout a CPU limit, at this branch: backend suite
2046 tests in 119 modules: OK, route suite353 tests in 42 modules: OK.Risk
Low. The change is in test code only. Undo it with a revert.