From dcf83903e59c300c5eff239acf34b913ea8ea40f Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sat, 28 Feb 2026 07:53:03 +0000 Subject: [PATCH] fix(ci): add xdist_group(proxy_heavy) to prevent OOM in parallel proxy tests - Add pytestmark = pytest.mark.xdist_group('proxy_heavy') to test_proxy_utils.py - Change test_db_schema_migration.py from schema_migration to proxy_heavy group - Add @pytest.mark.xdist_group('proxy_heavy') to test_proxy_server.py::test_health Groups heavy proxy tests to run on same worker, avoiding worker OOM crashes. Co-authored-by: Ishaan Jaff --- tests/proxy_unit_tests/test_db_schema_migration.py | 2 +- tests/proxy_unit_tests/test_proxy_server.py | 1 + tests/proxy_unit_tests/test_proxy_utils.py | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/proxy_unit_tests/test_db_schema_migration.py b/tests/proxy_unit_tests/test_db_schema_migration.py index b1b7d237621..bfd46f4b3dd 100644 --- a/tests/proxy_unit_tests/test_db_schema_migration.py +++ b/tests/proxy_unit_tests/test_db_schema_migration.py @@ -17,7 +17,7 @@ def schema_setup(postgresql_my): return postgresql_my -@pytest.mark.xdist_group("schema_migration") +@pytest.mark.xdist_group("proxy_heavy") def test_aaaasschema_migration_check(schema_setup, monkeypatch): """Test to check if schema requires migration""" # Set test database URL diff --git a/tests/proxy_unit_tests/test_proxy_server.py b/tests/proxy_unit_tests/test_proxy_server.py index d39edef793c..61a2f3055af 100644 --- a/tests/proxy_unit_tests/test_proxy_server.py +++ b/tests/proxy_unit_tests/test_proxy_server.py @@ -835,6 +835,7 @@ def test_add_new_model(client_no_auth): pytest.fail(f"LiteLLM Proxy test failed. Exception {str(e)}") +@pytest.mark.xdist_group("proxy_heavy") def test_health(client_no_auth): global headers import logging diff --git a/tests/proxy_unit_tests/test_proxy_utils.py b/tests/proxy_unit_tests/test_proxy_utils.py index fd97a38b41e..f7101085f0f 100644 --- a/tests/proxy_unit_tests/test_proxy_utils.py +++ b/tests/proxy_unit_tests/test_proxy_utils.py @@ -24,6 +24,8 @@ from litellm.proxy.litellm_pre_call_utils import ( add_litellm_data_to_request, ) +pytestmark = pytest.mark.xdist_group("proxy_heavy") + @pytest.fixture def mock_request(monkeypatch):