From 433163a8e29bcd01998d5c8e0b8260bb0c542d83 Mon Sep 17 00:00:00 2001 From: yuneng-jiang Date: Tue, 10 Nov 2026 00:34:27 -0800 Subject: [PATCH] test(integration): empty the shared client cache before the tier pin batch test (#50854) 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")