Skip to content

Commit 060809e

Browse files
authored
test(FIR-47519): fix async falky test (#461)
1 parent f58aa56 commit 060809e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/unit/V1/client/test_client_async.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ async def check_token_callback_with_queue(request: Request, **kwargs) -> Respons
209209
async def mock_send_handling_redirects(self, *args: Any, **kwargs: Any) -> Response:
210210
# simulate network delay so the context switches
211211
# random delay to make sure that requests are not executed in order
212-
await sleep(0.1 * random.random())
212+
await sleep(random.random())
213213
return await AsyncClient._send_handling_redirects(self, *args, **kwargs)
214214

215215
httpx_mock.add_callback(auth_callback, url=auth_url, is_reusable=True)

tests/unit/client/test_client_async.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ async def check_token_callback_with_queue(request: Request, **kwargs) -> Respons
177177
async def mock_send_handling_redirects(self, *args: Any, **kwargs: Any) -> Response:
178178
# simulate network delay so the context switches
179179
# random delay to make sure that requests are not executed in order
180-
await sleep(0.1 * random.random())
180+
await sleep(random.random())
181181
return await AsyncClient._send_handling_redirects(self, *args, **kwargs)
182182

183183
httpx_mock.add_callback(auth_callback, url=auth_url, is_reusable=True)

0 commit comments

Comments
 (0)