Skip to content

test: scale-the-timeout test no longer races interpreter startup - #112

Merged
cekees merged 1 commit into
mainfrom
launch-timing-test
Oct 26, 2026
Merged

cekees merged 1 commit into
mainfrom
launch-timing-test

Conversation

@cekees

@cekees cekees commented Oct 26, 2026

Copy link
Copy Markdown
Owner

test_the_timeout_is_scaled_for_a_slow_runner ran a python that slept 1.2 s under a 0.5 s timeout that the harness scales to 1.5 s, so it passed only if the interpreter started in under 0.3 s. On a loaded CI runner it did not: it failed on linux-64 / py3.12 of #109 (TimeoutExpired ... timed out after 1.5 seconds), a PR that touches nothing near it.

Fix: the test now hands the wrapper a stand-in for subprocess.run and checks the timeout it passes on (1.5 for 0.5 at scale 3, and none invented when none is given). To make that possible the wrapper is retrying_run(run) in test/conftest.py, exposed through the existing launch_policy fixture; the autouse fixture just installs it. Behavior of the wrapper is unchanged.

Checked: all 11 tests in the file pass; with the scaling line removed from the wrapper the test fails, so it still guards what it was written for. I looked at the other tests in that file and none races wall-clock time (the relaunch delay is set to 0).

🤖 Generated with Claude Code

test_the_timeout_is_scaled_for_a_slow_runner started a python that slept
1.2 s under a 0.5 s timeout scaled to 1.5 s, so it passed only if the
interpreter started in under 0.3 s; on a loaded CI runner it did not
(linux-64 py3.12 on #109). Hand the wrapper a stand-in for
subprocess.run instead and look at the timeout it passes on. The wrapper is
now retrying_run(run), exposed through the launch_policy fixture.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@cekees
cekees merged commit 1672603 into main Oct 26, 2026
10 checks passed
@cekees
cekees deleted the launch-timing-test branch October 26, 2026 09:00
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