From e429b36baa2d4944db2c9a4377c29b5eff9ba49c Mon Sep 17 00:00:00 2001 From: Andreas Hartel Date: Mon, 1 Jul 2024 15:49:19 +0200 Subject: [PATCH] Increase retries for test clients Tests sometimes fail in pipelines if they run concurrently against the same system. To make this a bit more robust we increase retries. --- tests/common.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/common.py b/tests/common.py index b06b298..d92347b 100644 --- a/tests/common.py +++ b/tests/common.py @@ -11,7 +11,8 @@ def sync_client() -> Client: return Client( token=get_env_var("TEST_TOKEN"), host=get_env_var("TEST_API_URL"), - total_retries=4, + # This will retry after [0.0, 0.5, 1.0, 2.0, 4.0] seconds + total_retries=5, ) @@ -20,7 +21,8 @@ async def async_client() -> AsyncIterable[AsyncClient]: async with AsyncClient( token=get_env_var("TEST_TOKEN"), host=get_env_var("TEST_API_URL"), - total_retries=4, + # This will retry after [0.0, 0.5, 1.0, 2.0, 4.0] seconds + total_retries=5, ) as client: yield client