@@ -1302,9 +1302,8 @@ async def handler(context: BasicCrawlingContext) -> None:
13021302
13031303
13041304@pytest .mark .run_alone
1305- @pytest .mark .skipif (
1306- sys .platform != 'linux' ,
1307- reason = 'Test is flaky on Windows and MacOS, see https://github.com/apify/crawlee-python/issues/1652.' ,
1305+ @pytest .mark .flaky (
1306+ reruns = 3 , reason = 'Test is flaky on Windows and MacOS, see https://github.com/apify/crawlee-python/issues/1652.'
13081307)
13091308@pytest .mark .skipif (sys .version_info [:3 ] < (3 , 11 ), reason = 'asyncio.timeout was introduced in Python 3.11.' )
13101309@pytest .mark .parametrize (
@@ -1328,7 +1327,11 @@ async def test_timeout_in_handler(sleep_type: str) -> None:
13281327 double_handler_timeout_s = handler_timeout .total_seconds () * 2
13291328 handler_sleep = iter ([double_handler_timeout_s , double_handler_timeout_s , 0 ])
13301329
1331- crawler = BasicCrawler (request_handler_timeout = handler_timeout , max_request_retries = max_request_retries )
1330+ crawler = BasicCrawler (
1331+ request_handler_timeout = handler_timeout ,
1332+ max_request_retries = max_request_retries ,
1333+ storage_client = MemoryStorageClient (),
1334+ )
13321335
13331336 mocked_handler_before_sleep = Mock ()
13341337 mocked_handler_after_sleep = Mock ()
@@ -1355,8 +1358,8 @@ async def handler(context: BasicCrawlingContext) -> None:
13551358 assert mocked_handler_after_sleep .call_count == 1
13561359
13571360
1358- @pytest .mark .skipif (
1359- sys . platform != 'linux' ,
1361+ @pytest .mark .flaky (
1362+ reruns = 3 ,
13601363 reason = 'Test is flaky on Windows and MacOS, see https://github.com/apify/crawlee-python/issues/1649.' ,
13611364)
13621365@pytest .mark .parametrize (
@@ -1381,6 +1384,7 @@ async def test_keep_alive(
13811384 max_requests_per_crawl = max_requests_per_crawl ,
13821385 # If more request can run in parallel, then max_requests_per_crawl is not deterministic.
13831386 concurrency_settings = ConcurrencySettings (desired_concurrency = 1 , max_concurrency = 1 ),
1387+ storage_client = MemoryStorageClient (),
13841388 )
13851389 mocked_handler = Mock ()
13861390
0 commit comments