mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
test(caching): bind the redaction test to a closed port, not 6379
Constructing RedisCache runs a synchronous startup ping, which the redis_no_ping fixture does not suppress. Using the default port 6379 meant that ping could reach a real local Redis, adding latency and letting local Redis availability sway an otherwise isolated unit test. Use _closed_port(), like the sibling circuit-breaker tests, so the ping refuses immediately and the test stays hermetic.
This commit is contained in:
parent
16f1f93d6e
commit
3e86bafbde
1 changed files with 1 additions and 1 deletions
|
|
@ -672,7 +672,7 @@ async def test_redis_write_failure_does_not_log_master_key(redis_no_ping, call_c
|
|||
"""
|
||||
from litellm._logging import verbose_logger
|
||||
|
||||
cache: Final = RedisCache(host="127.0.0.1", port=6379, socket_timeout=0.5)
|
||||
cache: Final = RedisCache(host="127.0.0.1", port=_closed_port(), socket_timeout=0.5)
|
||||
capture: Final = _CaptureRecords()
|
||||
verbose_logger.addFilter(capture)
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue