From b14932ce3cceb0fd726bd4fa14a31effd8f77327 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sat, 28 Feb 2026 10:36:11 +0000 Subject: [PATCH] fix(test): increase server wait time and add retry to flaky external API tests - test_basic_python_version.py: increase server startup wait from 60s to 90s for slower CI environments (fixes installing_litellm_on_python_3_13) - test_a2a_agent.py: add flaky(retries=3, delay=5) for non-streaming test that depends on live A2A agent endpoint Co-authored-by: Ishaan Jaff --- tests/agent_tests/test_a2a_agent.py | 1 + tests/local_testing/test_basic_python_version.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/agent_tests/test_a2a_agent.py b/tests/agent_tests/test_a2a_agent.py index acaf615ec88..ace1f8c54c5 100644 --- a/tests/agent_tests/test_a2a_agent.py +++ b/tests/agent_tests/test_a2a_agent.py @@ -25,6 +25,7 @@ def get_a2a_agent_url(): @pytest.mark.asyncio +@pytest.mark.flaky(retries=3, delay=5) async def test_a2a_non_streaming(): """Test non-streaming A2A request.""" from a2a.types import MessageSendParams, SendMessageRequest diff --git a/tests/local_testing/test_basic_python_version.py b/tests/local_testing/test_basic_python_version.py index e25f46ec1ba..f8882064ed0 100644 --- a/tests/local_testing/test_basic_python_version.py +++ b/tests/local_testing/test_basic_python_version.py @@ -138,8 +138,8 @@ def test_litellm_proxy_server_config_no_general_settings(): ] ) - # Allow some time for the server to start - time.sleep(60) # Adjust the sleep time if necessary + # Allow some time for the server to start (increased for CI environments) + time.sleep(90) # Increased from 60s for slower CI runners # Send a request to the /health/liveliness endpoint response = requests.get("http://localhost:4000/health/liveliness")