litellm/tests/mcp_tests
ryan-crabbe-berri c3bcb6f64f
test(mcp): drain the logging worker after each test so queued callbacks cannot leak into the next test (#38228)
LoggingWorker now carries still-queued coroutines onto the next event loop (12a34a10d8). Under xdist,
a success-logging coroutine queued by test_acompletion_mcp_respects_manual_approval ran nine seconds
later inside test_mcp_tool_call_hook on the same worker, resolved litellm.callbacks at run time and
overwrote that test's captured payload with a gpt-4o-mini completion (assert 1.35e-05 == 1.42).

Run clear_queue() in the suite's autouse teardown so every coroutine a test enqueues finishes before the
next test registers its callbacks, and add a subprocess regression test that runs the real conftest
against a stopped worker with work still queued.
2026-08-25 10:50:35 -07:00
..
test_configs
conftest.py test(mcp): drain the logging worker after each test so queued callbacks cannot leak into the next test (#38228) 2026-08-25 10:50:35 -07:00
mcp_e2e_upstream_server.py
mcp_server.py
test_aresponses_api_with_mcp.py
test_mcp_auth_header_extraction.py
test_mcp_auth_priority.py
test_mcp_chat_completions.py
test_mcp_client_unit.py
test_mcp_guardrails.py
test_mcp_hooks.py
test_mcp_litellm_client.py
test_mcp_logging.py test(mcp): drain the logging worker after each test so queued callbacks cannot leak into the next test (#38228) 2026-08-25 10:50:35 -07:00
test_mcp_server.py
test_oauth2_mcp_config.yaml
test_openapi_spec_path_url.py
test_per_user_oauth_cache.py
test_proxy_mcp_e2e.py
test_semantic_tool_filter_e2e.py