Skip to content

Commit 559e89c

Browse files
authored
🐛 fix(test): resolve Windows CI flake in provision integration tests (#3732)
The Windows CI job `test 3.12 on windows-2025` fails intermittently on `test_provision_install_pkg_pep517`. Investigation showed the test consistently takes ~32s on Windows due to provisioned subprocess pip installs, which exceeds the global 30s `pytest-timeout`. The "deadlock" stack trace is actually `pytest-timeout` dumping threads before killing the test. 🔍 The fix raises the timeout to 120s for both provision integration tests that spawn real subprocesses. This also re-enables `test_provision_requires_ok` on Windows, which was skipped under the assumption it deadlocked — the actual cause was the same 30s timeout being too tight for these heavier integration tests. Validated with 20/20 passes on `windows-2025` CI runners.
1 parent ab4fc8c commit 559e89c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tests/test_provision.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def test_provision_requires_nok(tox_project: ToxProjectCreator) -> None:
151151

152152
@pytest.mark.integration
153153
@pytest.mark.usefixtures("_pypi_index_self")
154-
@pytest.mark.skipif(sys.platform == "win32", reason="Windows subprocess deadlocks during provision recreate")
154+
@pytest.mark.timeout(120)
155155
def test_provision_requires_ok(tox_project: ToxProjectCreator, tmp_path: Path) -> None:
156156
proj = tox_project({"tox.ini": "[tox]\nrequires=demo-pkg-inline\n[testenv]\npackage=skip"})
157157
log = tmp_path / "out.log"
@@ -279,6 +279,7 @@ def test_provision_default_arguments_exists(tox_project: ToxProjectCreator, subc
279279
@pytest.mark.integration
280280
@pytest.mark.usefixtures("_pypi_index_mirrored")
281281
@pytest.mark.flaky(max_runs=3, min_passes=1)
282+
@pytest.mark.timeout(120)
282283
def test_provision_install_pkg_pep517(
283284
tmp_path_factory: TempPathFactory,
284285
tox_project: ToxProjectCreator,

0 commit comments

Comments
 (0)