From 754a9ef4e7caca69bdedb9ab77c84ed41c1a1d1b Mon Sep 17 00:00:00 2001 From: teknium1 <127238744+teknium1@users.noreply.github.com> Date: Mon, 14 Sep 2026 18:23:06 -0700 Subject: [PATCH] test(stt): give the silent-stall test the same idle budget test_silent_stall_still_times_out kept the 0.1s idle window and flaked once locally under heavy load (load avg ~250): the child was killed before its single stderr line was read, so the pre-stall-output assertion saw an empty stderr. Same class as the progress test this PR de-flakes; give it the same 0.25s budget. The 30s sleep still trips the window, so the must-time-out direction is unchanged. --- tests/tools/test_transcription_tools.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/tools/test_transcription_tools.py b/tests/tools/test_transcription_tools.py index 96156fef0c..20d3a9fa97 100644 --- a/tests/tools/test_transcription_tools.py +++ b/tests/tools/test_transcription_tools.py @@ -1246,10 +1246,15 @@ class TestRunCommandSttIdleTimeout: encoding="utf-8", ) + # Same budget rule as the progress test above: the idle window must + # comfortably exceed process spawn latency on a loaded runner, or the + # child is killed before its first stderr line is ever read and the + # pre-stall-output assertion fails spuriously. 30s of silence still + # trips a 0.25s window by a wide margin. with pytest.raises(subprocess.TimeoutExpired) as excinfo: _run_command_stt( self._shell_command(sys.executable, "-u", str(script)), - timeout=0.1, + timeout=0.25, ) assert "starting pass 1" in (excinfo.value.stderr or "")