From 44989c5fbff2c701f12fa0eefac4928639937a51 Mon Sep 17 00:00:00 2001 From: ptiurin Date: Mon, 6 Oct 2025 17:21:47 +0100 Subject: [PATCH] test(FIR-47519): fix async falky test --- tests/unit/V1/client/test_client_async.py | 2 +- tests/unit/client/test_client_async.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/V1/client/test_client_async.py b/tests/unit/V1/client/test_client_async.py index 8bd25b62678..5c3b70c187d 100644 --- a/tests/unit/V1/client/test_client_async.py +++ b/tests/unit/V1/client/test_client_async.py @@ -209,7 +209,7 @@ async def check_token_callback_with_queue(request: Request, **kwargs) -> Respons async def mock_send_handling_redirects(self, *args: Any, **kwargs: Any) -> Response: # simulate network delay so the context switches # random delay to make sure that requests are not executed in order - await sleep(0.1 * random.random()) + await sleep(random.random()) return await AsyncClient._send_handling_redirects(self, *args, **kwargs) httpx_mock.add_callback(auth_callback, url=auth_url, is_reusable=True) diff --git a/tests/unit/client/test_client_async.py b/tests/unit/client/test_client_async.py index 8cfbd504d68..e81fb567920 100644 --- a/tests/unit/client/test_client_async.py +++ b/tests/unit/client/test_client_async.py @@ -177,7 +177,7 @@ async def check_token_callback_with_queue(request: Request, **kwargs) -> Respons async def mock_send_handling_redirects(self, *args: Any, **kwargs: Any) -> Response: # simulate network delay so the context switches # random delay to make sure that requests are not executed in order - await sleep(0.1 * random.random()) + await sleep(random.random()) return await AsyncClient._send_handling_redirects(self, *args, **kwargs) httpx_mock.add_callback(auth_callback, url=auth_url, is_reusable=True)