tests: raise pwsh/bash subprocess timeout from 10s to 60s (#5463)
CI surfaced a flaky failure on Linux 'Repo tests (CPU)': TestPwshPrForcePromotion.test_baked_in_pr_force_promotes -> subprocess.TimeoutExpired after 10s on /usr/bin/pwsh startup. The scripts under test run in well under a second; the 10s budget only covered pwsh / bash launch time, which spikes on heavily- loaded GitHub-hosted runners. Raise the default helper timeout to 60s for both run_bash and run_pwsh. Real bugs in the script logic will still surface as wrong output or non-zero exit; this just absorbs runner-side launch jitter.
This commit is contained in:
parent
85cf0a41ea
commit
4b23af48b1
1 changed files with 9 additions and 4 deletions
|
|
@ -35,9 +35,11 @@ requires_pwsh = pytest.mark.skipif(not PWSH_AVAILABLE, reason = "pwsh not availa
|
|||
# Helpers
|
||||
# ---------------------------------------------------------------------------
|
||||
def run_bash(
|
||||
script: str, *, timeout: int = 10, env: dict | None = None
|
||||
script: str, *, timeout: int = 60, env: dict | None = None
|
||||
) -> subprocess.CompletedProcess:
|
||||
"""Run a bash script fragment and return the CompletedProcess."""
|
||||
"""Run a bash script fragment and return the CompletedProcess.
|
||||
60s default tolerates slow shell startup on heavily-loaded CI
|
||||
runners; the scripts themselves run in well under a second."""
|
||||
run_env = os.environ.copy()
|
||||
if env:
|
||||
run_env.update(env)
|
||||
|
|
@ -51,9 +53,12 @@ def run_bash(
|
|||
|
||||
|
||||
def run_pwsh(
|
||||
script: str, *, timeout: int = 10, env: dict | None = None
|
||||
script: str, *, timeout: int = 60, env: dict | None = None
|
||||
) -> subprocess.CompletedProcess:
|
||||
"""Run a PowerShell script fragment and return the CompletedProcess."""
|
||||
"""Run a PowerShell script fragment and return the CompletedProcess.
|
||||
60s default tolerates slow pwsh startup on heavily-loaded CI
|
||||
runners; the scripts themselves run in well under a second.
|
||||
A 10s budget previously surfaced as a flaky TimeoutExpired."""
|
||||
run_env = os.environ.copy()
|
||||
run_env["NO_COLOR"] = "1"
|
||||
if env:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue