From 042ae73d55719d4b5d3b39e8ecb50aab447c6cb8 Mon Sep 17 00:00:00 2001 From: WieslerAA <166396688+WieslerAA@users.noreply.github.com> Date: Wed, 25 Sep 2024 11:40:11 +0200 Subject: [PATCH 1/2] Update common.py --- tests/common.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/common.py b/tests/common.py index d92347b..125f424 100644 --- a/tests/common.py +++ b/tests/common.py @@ -11,8 +11,8 @@ def sync_client() -> Client: return Client( token=get_env_var("TEST_TOKEN"), host=get_env_var("TEST_API_URL"), - # This will retry after [0.0, 0.5, 1.0, 2.0, 4.0] seconds - total_retries=5, + # This will retry after [0.0, 0.25, 0.5, 1.0, 2.0] seconds + total_retries=os.environ.get("TEST_API_RETRIES", 5), ) @@ -21,8 +21,8 @@ async def async_client() -> AsyncIterable[AsyncClient]: async with AsyncClient( token=get_env_var("TEST_TOKEN"), host=get_env_var("TEST_API_URL"), - # This will retry after [0.0, 0.5, 1.0, 2.0, 4.0] seconds - total_retries=5, + # This will retry after [0.0, 0.25, 0.5, 1.0, 2.0] seconds + total_retries=os.environ.get("TEST_API_RETRIES", 5), ) as client: yield client From 5b70c268ff7a5b3def7024d87cbcba0dc6076c74 Mon Sep 17 00:00:00 2001 From: WieslerAA <166396688+WieslerAA@users.noreply.github.com> Date: Wed, 25 Sep 2024 11:45:46 +0200 Subject: [PATCH 2/2] Update common.py --- tests/common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/common.py b/tests/common.py index 125f424..6a30287 100644 --- a/tests/common.py +++ b/tests/common.py @@ -12,7 +12,7 @@ def sync_client() -> Client: token=get_env_var("TEST_TOKEN"), host=get_env_var("TEST_API_URL"), # This will retry after [0.0, 0.25, 0.5, 1.0, 2.0] seconds - total_retries=os.environ.get("TEST_API_RETRIES", 5), + total_retries=int(os.environ.get("TEST_API_RETRIES", "5")), ) @@ -22,7 +22,7 @@ async def async_client() -> AsyncIterable[AsyncClient]: token=get_env_var("TEST_TOKEN"), host=get_env_var("TEST_API_URL"), # This will retry after [0.0, 0.25, 0.5, 1.0, 2.0] seconds - total_retries=os.environ.get("TEST_API_RETRIES", 5), + total_retries=int(os.environ.get("TEST_API_RETRIES", "5")), ) as client: yield client