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.
This commit is contained in:
yuneng-jiang 2026-11-10 00:34:27 -08:00 • committed by GitHub
parent f700e21e32
commit 433163a8e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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