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.
This commit is contained in:
Yuneng Jiang 2026-11-09 22:41:32 -08:00
parent 9eedf608e7
commit f8eeb05ba8
No known key found for this signature in database

View file

@ -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")