Skip to content

Give a process room to exit in the tests that time one - #19

Merged
Piergiuseppe merged 1 commit into
mainfrom
test/room-for-a-process-to-exit
Nov 15, 2026
Merged

Piergiuseppe merged 1 commit into
mainfrom
test/room-for-a-process-to-exit

Conversation

@Piergiuseppe

Copy link
Copy Markdown
Owner

Two tests that have nothing wrong with the code they test fail now and then, and with ci-passed required each failure blocks a merge.

  • test_the_cli_exits_within_its_shutdown_timeout_while_a_job_ignores_cancellation failed on pull request Add tinyjobs move, and delete in the backend protocol #18 (Python 3.13, Postgres 14): a worker with a 2 s shutdown timeout took 2.27 s to exit on the runner, against a bound of 2.15. The tests that time a worker process gave it 0.1, 0.15, 0.3 or 0.6 s to exit, depending on the test. They now share PROCESS_EXIT_SECONDS = 0.6, which is still under the 1.25 s of the next phase a regression would add.
  • test_the_cli_exits_within_the_shutdown_timeout_with_outcomes_stuck_on_a_lock failed about half the time against a local Postgres 17, on main too: the cleanup dropped the test's tables one by one while a statement the exited worker had left running on the server still held one of them, and Postgres reported a deadlock. The cleanup now drops them in one statement and tries again after a deadlock. Six runs in a row pass.

Only tests change.

Still open, not in this pull request: test_one_stop_signal_ends_a_process_whose_thread_writes_to_a_stalled_stdout timed out three times in about ten full local runs under load and passes alone; not understood yet.

…that times one, and drop a test's Postgres tables in one statement, again after a deadlock with a statement the exited worker left running
@Piergiuseppe
Piergiuseppe force-pushed the test/room-for-a-process-to-exit branch from 16aaaa3 to fb0f4d8 Compare November 15, 2026 09:07
@Piergiuseppe
Piergiuseppe merged commit 31b6259 into main Nov 15, 2026
21 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant