From b448d8d423002c1dad4eaf76ed82424e469a2d65 Mon Sep 17 00:00:00 2001 From: "lilly.luo" Date: Wed, 11 Nov 2026 23:35:41 +0000 Subject: [PATCH 1/2] Rerun the Gemini auth-recovery e2e case on a live gateway timeout Co-authored-by: Isaac --- tests/test_e2e.py | 11 ++++++++++- uv.lock | 4 ++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/tests/test_e2e.py b/tests/test_e2e.py index d429c19c8..6551de331 100644 --- a/tests/test_e2e.py +++ b/tests/test_e2e.py @@ -137,12 +137,21 @@ def _run_gemini_gateway_smoke(workspace: str, model: str, token: str) -> str: }, method="POST", ) + timeout_seconds = 30 try: - with urllib_request.urlopen(req, timeout=30) as response: + with urllib_request.urlopen(req, timeout=timeout_seconds) as response: body = response.read().decode("utf-8") except urllib_error.HTTPError as exc: body = exc.read().decode("utf-8", errors="replace") if exc.fp else "" raise AssertionError(f"Gemini gateway smoke failed: HTTP {exc.code}: {body[:500]}") from exc + except (TimeoutError, urllib_error.URLError) as exc: + if isinstance(exc, urllib_error.URLError) and not isinstance(exc.reason, TimeoutError): + raise + # Matches the e2e shards' `--only-rerun 'timed out after [0-9]+s'`, so a slow live + # model gets the same single rerun as the CLI launch tests. + raise AssertionError( + f"Gemini gateway smoke for model={model} timed out after {timeout_seconds}s" + ) from exc data = json.loads(body) return data.get("candidates", [{}])[0].get("content", {}).get("parts", [{}])[0].get("text", "") diff --git a/uv.lock b/uv.lock index 2fa86ecec..c196b4af4 100644 --- a/uv.lock +++ b/uv.lock @@ -1,5 +1,5 @@ version = 1 -revision = 3 +revision = 5 requires-python = ">=3.12" resolution-markers = [ "python_full_version >= '3.14'", @@ -800,7 +800,7 @@ wheels = [ [[package]] name = "pytest-rerunfailures" version = "16.7" -source = { registry = "https://pypi-proxy.cloud.databricks.com/simple/" } +source = { registry = "https://pypi-proxy.cloud.databricks.com/simple" } dependencies = [ { name = "packaging" }, { name = "pytest" }, From c63a0470485200b2ac1a709e1c563651f6c33f79 Mon Sep 17 00:00:00 2001 From: "lilly.luo" Date: Thu, 12 Nov 2026 04:15:02 +0000 Subject: [PATCH 2/2] Restore uv.lock without unrelated lockfile changes --- uv.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/uv.lock b/uv.lock index c196b4af4..2fa86ecec 100644 --- a/uv.lock +++ b/uv.lock @@ -1,5 +1,5 @@ version = 1 -revision = 5 +revision = 3 requires-python = ">=3.12" resolution-markers = [ "python_full_version >= '3.14'", @@ -800,7 +800,7 @@ wheels = [ [[package]] name = "pytest-rerunfailures" version = "16.7" -source = { registry = "https://pypi-proxy.cloud.databricks.com/simple" } +source = { registry = "https://pypi-proxy.cloud.databricks.com/simple/" } dependencies = [ { name = "packaging" }, { name = "pytest" },