From 2f1c690cea9c16d08113c6b9aff2d87d2efbce58 Mon Sep 17 00:00:00 2001 From: lawrence Date: Mon, 14 Sep 2026 11:01:18 +0800 Subject: [PATCH] revert: restore the upstream auth prefetch test This keeps the PR's diff limited to its own fix. The test's timing sensitivity belongs to it, not to this change: its org rows are cached with the 5 second DEFAULT_IN_MEMORY_TTL and it then spends seconds in real Postgres round-trips, so it can flake on a loaded runner. Verified against a local postgres:16 (prisma generate + db push, same steps as CI): 3 passed in 6.53s, with 3.0s in the call phase alone. --- tests/proxy_behavior/auth/test_auth_object_prefetch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/proxy_behavior/auth/test_auth_object_prefetch.py b/tests/proxy_behavior/auth/test_auth_object_prefetch.py index ffbb47ed042..e2d947f4284 100644 --- a/tests/proxy_behavior/auth/test_auth_object_prefetch.py +++ b/tests/proxy_behavior/auth/test_auth_object_prefetch.py @@ -58,7 +58,7 @@ async def test_join_binds_the_membership_to_the_requested_team(prisma): data={"user_id": user_id, "team_id": team_b, "litellm_budget_table": {"connect": {"budget_id": f"b-{run}"}}} ) - cache = UserApiKeyCache(in_memory_cache=InMemoryCache(clock=lambda: 0.0), redis_cache=None) + cache = UserApiKeyCache(in_memory_cache=InMemoryCache(), redis_cache=None) refs = AuthObjectRefs(user_id=user_id, team_id=team_a, membership_user_id=user_id, organization_id=org_id) await prefetch_auth_objects(refs=refs, user_api_key_cache=cache, prisma_client=prisma)