litellm/tests/unit/integrations/prompt_cache_alerts
yuneng-jiang c4e70ccc1b
test: stabilize the flaky prompt cache detector unit tests (#52671)
The detector classifies each request on a worker thread, so the logging for
requests sent back to back can reach the streak script in any order. Two tests
sent several requests and only then waited, then compared the order of what
the script saw. They now wait for each request's logging before sending the
next one.

The response comparison test silenced the detector by emptying
litellm.callbacks, but the logger was already registered for success
callbacks, so the second request was still observed. The assertion only
passed because it ran before that logging finished, and the late event could
land in a later test's script. The baseline request now goes out as a no-log
request and its logging is drained before the assertion.
2026-11-18 14:47:18 -08:00
..
__init__.py
test_detector.py test: stabilize the flaky prompt cache detector unit tests (#52671) 2026-11-18 14:47:18 -08:00
test_evidence.py