Skip to content

Commit b08da11

Browse files
committed
test: Deflake adaptive crawler timeout test against slow CI browser navigation
1 parent 5548c3d commit b08da11

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

tests/unit/crawlers/_adaptive_playwright/test_adaptive_playwright_crawler.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,11 @@ async def test_adaptive_playwright_crawler_timeout_in_sub_crawler(test_urls: lis
606606
max_request_retries=0,
607607
rendering_type_predictor=static_only_predictor_no_detection,
608608
request_handler_timeout=request_handler_timeout,
609+
# The fallback browser request navigates under its own `navigation_timeout` budget, separate from
610+
# the request handler timeout relaxed in the handler below. Give it the same generous ceiling:
611+
# with `max_request_retries=0`, a single navigation slower than the default budget on a loaded CI
612+
# runner would fail the only attempt before the handler ever runs.
613+
playwright_crawler_specific_kwargs={'navigation_timeout': timedelta(seconds=120)},
609614
)
610615
mocked_static_handler = Mock(name='static_handler')
611616
mocked_browser_handler = Mock(name='browser_handler')

0 commit comments

Comments
 (0)