refactor(timeouts): make BROWSER_SUBMIT_NAV_TIMEOUT a per-platform defaultdict

This commit is contained in:
Barrett Ruth 2026-03-05 11:47:10 -05:00
parent 789cb3205b
commit 0082ecc9f4
3 changed files with 7 additions and 3 deletions

View file

@ -33,6 +33,7 @@ from .timeouts import (
BROWSER_NAV_TIMEOUT,
BROWSER_SESSION_TIMEOUT,
BROWSER_SETTLE_DELAY,
BROWSER_SUBMIT_NAV_TIMEOUT,
BROWSER_TURNSTILE_POLL,
HTTP_TIMEOUT,
)
@ -361,7 +362,7 @@ def _submit_headless(
page.wait_for_timeout(BROWSER_SETTLE_DELAY)
page.locator('button[type="submit"]').click()
page.wait_for_url(
lambda url: "/submissions/me" in url, timeout=BROWSER_NAV_TIMEOUT
lambda url: "/submissions/me" in url, timeout=BROWSER_SUBMIT_NAV_TIMEOUT["atcoder"]
)
except Exception as e:
submit_error = str(e)