diff --git a/tests/load_tests/test_proxy_chat_completions_memory_growth.py b/tests/load_tests/test_proxy_chat_completions_memory_growth.py index a7b0522a56d..ddab06555d1 100644 --- a/tests/load_tests/test_proxy_chat_completions_memory_growth.py +++ b/tests/load_tests/test_proxy_chat_completions_memory_growth.py @@ -439,3 +439,20 @@ async def test_proxy_memory_baseline_50k(proxy_server, limit_memory): pytest tests/load_tests/test_proxy_chat_completions_memory_growth.py::test_proxy_memory_baseline_50k -v """ await run_proxy_memory_baseline_test(50000, proxy_server, limit_memory) + +@pytest.mark.asyncio +@pytest.mark.limit_leaks(MEMORY_LIMIT) +@pytest.mark.no_parallel # Must run sequentially - measures process memory +async def test_proxy_memory_baseline_500k(proxy_server, limit_memory): + """ + Memory baseline test with 500,000 requests to the proxy server. + Uses @pytest.mark.limit_leaks("40 MB") to enforce memory limit. + If test_proxy_memory_baseline_1k and test_proxy_memory_baseline_2k pass but this fails, + it's a clear sign of sequential/progressive memory growth. + + NOTE: This test should be run INDIVIDUALLY, not with other tests in this file. + Running multiple tests together causes memory baseline drift, making it difficult + to accurately detect linear memory growth. Run with: + pytest tests/load_tests/test_proxy_chat_completions_memory_growth.py::test_proxy_memory_baseline_500k -v + """ + await run_proxy_memory_baseline_test(500000, proxy_server, limit_memory) diff --git a/tests/load_tests/test_router_acompletion_memory_growth.py b/tests/load_tests/test_router_acompletion_memory_growth.py index 406c38709e9..33b60d44c95 100644 --- a/tests/load_tests/test_router_acompletion_memory_growth.py +++ b/tests/load_tests/test_router_acompletion_memory_growth.py @@ -138,3 +138,20 @@ async def test_memory_baseline_50k(test_router, limit_memory): pytest tests/load_tests/test_router_acompletion_memory_growth.py::test_memory_baseline_50k -v """ await run_memory_baseline_test(50000, test_router, limit_memory) + +@pytest.mark.asyncio +@pytest.mark.limit_leaks(MEMORY_LIMIT) +@pytest.mark.no_parallel # Must run sequentially - measures process memory +async def test_memory_baseline_500k(test_router, limit_memory): + """ + Memory baseline test with 500,000 requests. + Uses @pytest.mark.limit_leaks("40 MB") to enforce memory limit. + If test_memory_baseline_1k and test_memory_baseline_2k pass but this fails, + it's a clear sign of sequential/progressive memory growth. + + NOTE: This test should be run INDIVIDUALLY, not with other tests in this file. + Running multiple tests together causes memory baseline drift, making it difficult + to accurately detect linear memory growth. Run with: + pytest tests/load_tests/test_router_acompletion_memory_growth.py::test_memory_baseline_500k -v + """ + await run_memory_baseline_test(500000, test_router, limit_memory) \ No newline at end of file