Skip to content

Commit 4f80044

Browse files
authored
test: Mark test_resource_management flaky on Windows (#1919)
### Description `tests/unit/browsers/test_browser_pool.py::test_resource_management` failed on master CI (Windows, Python 3.10) with `playwright._impl._errors.Error: Page.goto: net::ERR_NO_BUFFER_SPACE` — see [run 26453810483](https://github.com/apify/crawlee-python/actions/runs/26453810483/job/77881886837). The previous fix (#1916) bumped the `goto` timeout to 60s, but the failure is not a slow response — it's a hard kernel-level socket buffer exhaustion on Windows when many xdist workers simultaneously launch Chromium and open sockets. A larger timeout cannot help. Mark the test with `@pytest.mark.flaky(reruns=3)` to match the existing project precedent for this exact failure mode (see `test_stagehand_browser_controller.py` and `test_adaptive_playwright_crawler.py`).
1 parent 3de06f5 commit 4f80044

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tests/unit/browsers/test_browser_pool.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ async def test_new_page_with_invalid_plugin() -> None:
138138
await browser_pool.new_page(browser_plugin=plugin_2)
139139

140140

141+
@pytest.mark.flaky(
142+
reruns=3,
143+
reason='Test is flaky on Windows when Playwright hits net::ERR_NO_BUFFER_SPACE under xdist load.',
144+
)
141145
async def test_resource_management(server_url: URL) -> None:
142146
playwright_plugin = PlaywrightBrowserPlugin(browser_type='chromium')
143147

0 commit comments

Comments
 (0)