Skip to content

Commit 8f121ec

Browse files
nickpismenkovclaude
andcommitted
test(e2e): widen auth OAuth matrix timeouts for CI load
Four tests in live-canary auth-full were failing in CI with `Page.wait_for_function: Timeout 60000ms exceeded`, `ClientConnectionError('Connection closed')`, and `Timed out waiting for OAuth refresh request` — all inside 60/20s deadlines that are tuned for a dev laptop and don't leave margin for ubuntu-latest's 2-vCPU runner under full suite load. Raise the per-call deadlines so the inner budgets fit comfortably inside pyproject.toml's 120s per-test cap: _wait_for_refresh_request default: 20.0s -> 60.0s _wait_for_auth_event call site: 60 -> 90 _wait_for_auth_prompt call site: 60 -> 90 send_chat_and_wait_for_terminal_message call sites: 60000 -> 90000 _wait_for_mock_google_tokens call site: 60.0 -> 90.0 _wait_for_response_contains (gmail) call site: 60.0 -> 90.0 Strictly widening; no passing test is slowed, no semantics change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 636c2ac commit 8f121ec

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

tests/e2e/scenarios/test_v2_auth_oauth_matrix.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,7 +1087,7 @@ async def _get_mock_mcp_state(mock_base_url: str) -> dict:
10871087
async def _wait_for_refresh_request(
10881088
mock_base_url: str,
10891089
*,
1090-
timeout: float = 20.0,
1090+
timeout: float = 60.0,
10911091
) -> dict:
10921092
for _ in range(int(timeout * 2)):
10931093
state = await _get_mock_oauth_state(mock_base_url)
@@ -1356,7 +1356,7 @@ async def test_wasm_tool_first_chat_auth_attempt_emits_auth_url(auth_matrix_serv
13561356
thread_id = await _create_thread(server["base_url"])
13571357

13581358
event_type, payload, auth_url = await _wait_for_auth_event(
1359-
server["base_url"], thread_id, timeout=60
1359+
server["base_url"], thread_id, timeout=90
13601360
)
13611361

13621362
assert auth_url, payload
@@ -1367,7 +1367,7 @@ async def test_wasm_tool_first_chat_auth_attempt_emits_auth_url(auth_matrix_serv
13671367
auth = payload["resume_kind"]["Authentication"]
13681368
assert auth.get("credential_name") in {"gmail", "google_oauth_token"}, payload
13691369

1370-
history = await _wait_for_auth_prompt(server["base_url"], thread_id, timeout=60)
1370+
history = await _wait_for_auth_prompt(server["base_url"], thread_id, timeout=90)
13711371
all_text = " ".join(turn.get("response") or "" for turn in history.get("turns", []))
13721372
pending = history.get("pending_gate")
13731373
assert (
@@ -1454,12 +1454,12 @@ async def test_mcp_same_server_multi_user_via_browser(browser, auth_matrix_serve
14541454
owner_result = await send_chat_and_wait_for_terminal_message(
14551455
owner_page,
14561456
"check mock mcp search",
1457-
timeout=60000,
1457+
timeout=90000,
14581458
)
14591459
member_result = await send_chat_and_wait_for_terminal_message(
14601460
member_page,
14611461
"check mock mcp search",
1462-
timeout=60000,
1462+
timeout=90000,
14631463
)
14641464
assert owner_result["role"] == "assistant", owner_result
14651465
assert member_result["role"] == "assistant", member_result
@@ -1567,10 +1567,10 @@ async def test_settings_first_gmail_auth_then_chat_runs(
15671567
await chat_input.press("Enter")
15681568

15691569
thread_id = await _current_thread_id(page)
1570-
tokens = await _wait_for_mock_google_tokens(server["mock_api_url"], timeout=60.0)
1570+
tokens = await _wait_for_mock_google_tokens(server["mock_api_url"], timeout=90.0)
15711571
assert tokens, "expected Gmail to hit the mock Google API after settings-first auth"
15721572
history = await _wait_for_response_contains(
1573-
server["base_url"], thread_id, "Quarterly update", timeout=60.0
1573+
server["base_url"], thread_id, "Quarterly update", timeout=90.0
15741574
)
15751575
assert history.get("pending_gate") is None, history
15761576
assert "Quarterly update" in " ".join(

0 commit comments

Comments
 (0)