mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-16 09:22:22 +00:00
test(auth): preload proxy app so prefetch test outlives the org cache TTL
The prefetch caches the org row for DEFAULT_IN_MEMORY_TTL (5s), and the first getter the test calls goes through log_db_metrics, which lazily imports proxy_server. On CI that import takes around 5s, so the org entry expires before get_org_object reads it and the lookup falls through to the mocked DB. Loading proxy_server with the test module moves that cost ahead of the prefetch
This commit is contained in:
parent
82a73cd699
commit
b5635e1a8f
1 changed files with 1 additions and 0 deletions
|
|
@ -8,6 +8,7 @@ from uuid import uuid4
|
|||
|
||||
import pytest
|
||||
|
||||
import litellm.proxy.proxy_server # noqa: F401 # preload log_db_metrics' lazy import; it can outlast the 5s org TTL
|
||||
from litellm.caching.in_memory_cache import InMemoryCache
|
||||
from litellm.proxy.auth.auth_checks import (
|
||||
get_org_object,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue