Skip to content

Commit 12ef1cb

Browse files
authored
test: Bump goto timeout in flaky test_resource_management (#1916)
## Summary - `tests/unit/browsers/test_browser_pool.py::test_resource_management` has been failing intermittently on `windows-latest` + Python 3.14 with `playwright._impl._errors.TimeoutError: Page.goto: Timeout 30000ms exceeded`. - Root cause: Playwright's default 30s navigation timeout is too short for a cold Windows + 3.14 CI runner; the local test server is fine, but Chromium's page load (waiting for `load`) overruns the default budget. - Fix: Pass an explicit `timeout=60_000` to the single `page.goto(...)` call in this test. Failure run for reference: https://github.com/apify/crawlee-python/actions/runs/26436864359/job/77821574408
1 parent 5b0ca17 commit 12ef1cb

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tests/unit/browsers/test_browser_pool.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ async def test_resource_management(server_url: URL) -> None:
143143

144144
async with BrowserPool([playwright_plugin]) as browser_pool:
145145
page = await browser_pool.new_page()
146-
await page.page.goto(str(server_url))
146+
# Use a generous navigation timeout to avoid flakes on slow Windows CI runners.
147+
await page.page.goto(str(server_url), timeout=60_000)
147148
assert page.page.url == str(server_url)
148149
assert '<html' in await page.page.content() # there is some HTML content
149150
assert browser_pool.total_pages_count == 1

0 commit comments

Comments
 (0)