diff --git a/tests/unit/crawlers/_adaptive_playwright/test_adaptive_playwright_crawler.py b/tests/unit/crawlers/_adaptive_playwright/test_adaptive_playwright_crawler.py index 8aed535c8a..ed337f36f8 100644 --- a/tests/unit/crawlers/_adaptive_playwright/test_adaptive_playwright_crawler.py +++ b/tests/unit/crawlers/_adaptive_playwright/test_adaptive_playwright_crawler.py @@ -631,6 +631,10 @@ async def request_handler(context: AdaptivePlaywrightCrawlingContext) -> None: mocked_browser_handler.assert_called_once_with() +@pytest.mark.flaky( + rerun=3, + reason='Test is flaky on Windows and MacOS, see https://github.com/apify/crawlee-python/issues/1650.', +) async def test_adaptive_context_query_selector_beautiful_soup(test_urls: list[str]) -> None: """Test that `context.query_selector_one` works regardless of the crawl type for BeautifulSoup variant. diff --git a/tests/unit/request_loaders/test_sitemap_request_loader.py b/tests/unit/request_loaders/test_sitemap_request_loader.py index 8033211157..d3742dfd6f 100644 --- a/tests/unit/request_loaders/test_sitemap_request_loader.py +++ b/tests/unit/request_loaders/test_sitemap_request_loader.py @@ -144,7 +144,7 @@ async def wait_for_sitemap_loader_not_empty(sitemap_loader: SitemapRequestLoader sitemap_loader = SitemapRequestLoader([str(sitemap_url)], http_client=http_client, persist_state_key=persist_key) # Give time to load - await asyncio.wait_for(wait_for_sitemap_loader_not_empty(sitemap_loader), timeout=2) + await asyncio.wait_for(wait_for_sitemap_loader_not_empty(sitemap_loader), timeout=10) await sitemap_loader.close()