From f8eeb05ba87b731f897024643016642fcdbd71c4 Mon Sep 17 00:00:00 2001 From: Yuneng Jiang Date: Mon, 9 Nov 2026 22:41:32 -0800 Subject: [PATCH] test(integration): empty the shared client cache before the tier pin batch test The test stores its recording Redis client in litellm's shared client cache with the default ttl. When earlier tests in the same process have filled that cache with longer lived clients, the next insert evicts the recording client, the pin is read through a fresh client, and the test sees no commands on the wire. --- tests/integration/sdk/test_dual_cache_redis.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/integration/sdk/test_dual_cache_redis.py b/tests/integration/sdk/test_dual_cache_redis.py index 7d05eb2795b..b79683c126c 100644 --- a/tests/integration/sdk/test_dual_cache_redis.py +++ b/tests/integration/sdk/test_dual_cache_redis.py @@ -222,6 +222,7 @@ async def test_tier_pin_joins_pending_reads_without_reusing_request_state(mode: ) client: Final = Redis(connection_pool=pool) client_key: Final = redis._get_async_client_cache_key() + litellm.in_memory_llm_clients_cache.flush_cache() litellm.in_memory_llm_clients_cache.set_cache(key=client_key, value=client) cache: Final = DualCache(redis_cache=redis) key: Final = redis.check_and_fix_namespace("pin")