From e3cf90b6ff095e8337f545e40d64ac267058508f Mon Sep 17 00:00:00 2001 From: Open-Squilla <275096992+Open-Squilla@users.noreply.github.com> Date: Tue, 8 Sep 2026 18:59:52 +0800 Subject: [PATCH] test(windows): bound recovery harness with a platform-aware watchdog --- tests/test_ci/test_upgrade_baselines.py | 46 ++++++++++++++----------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/tests/test_ci/test_upgrade_baselines.py b/tests/test_ci/test_upgrade_baselines.py index e2e4cc0430..d7c9f541a5 100644 --- a/tests/test_ci/test_upgrade_baselines.py +++ b/tests/test_ci/test_upgrade_baselines.py @@ -124,26 +124,32 @@ def test_packaged_recovery_preserves_original_failure_after_cleanup( + "}\n", encoding="utf-8", ) - result = subprocess.run( - [ - node, - str(tmp_path / "test-packaged-session-recovery.mjs"), - "--executable", - str(tmp_path / "synthetic.exe"), - "--user-data-dir", - str(tmp_path / "profile"), - "--session-key", - "synthetic-main", - "--switch-session-key", - "synthetic-peer", - "--label", - "synthetic", - ], - capture_output=True, - text=True, - check=False, - timeout=10, - ) + # This is a synthetic error/cleanup contract, not a recovery-latency check. + # Allow Windows CI headroom for Node startup and captured-pipe completion. + try: + result = subprocess.run( + [ + node, + str(tmp_path / "test-packaged-session-recovery.mjs"), + "--executable", + str(tmp_path / "synthetic.exe"), + "--user-data-dir", + str(tmp_path / "profile"), + "--session-key", + "synthetic-main", + "--switch-session-key", + "synthetic-peer", + "--label", + "synthetic", + ], + capture_output=True, + text=True, + check=False, + timeout=30 if os.name == "nt" else 10, + ) + except subprocess.TimeoutExpired as error: + error.add_note(f"Captured stdout: {error.stdout!r}\nCaptured stderr: {error.stderr!r}") + raise assert result.returncode != 0 assert "packaged_session_recovery_failed_before_cleanup" in result.stderr assert "synthetic-cleanup-ran" in result.stderr