From f4e21430c09d5201673b8093031d80391221a05a Mon Sep 17 00:00:00 2001 From: Shivi Jain Date: Mon, 14 Sep 2026 22:32:11 +0530 Subject: [PATCH] test(auth): freeze prefetch cache clock so the org getter cannot miss on a slow runner Prefetch still writes org entries with the 5s getter TTL. This test only asserts the SQL join, and wall-clock expiry on CI turned that into a MagicMock await TypeError. Co-authored-by: Cursor --- tests/proxy_behavior/auth/test_auth_object_prefetch.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/proxy_behavior/auth/test_auth_object_prefetch.py b/tests/proxy_behavior/auth/test_auth_object_prefetch.py index 59e9585a296..cfa958500af 100644 --- a/tests/proxy_behavior/auth/test_auth_object_prefetch.py +++ b/tests/proxy_behavior/auth/test_auth_object_prefetch.py @@ -66,6 +66,7 @@ async def test_join_binds_the_membership_to_the_requested_team(prisma): cache = _frozen_cache() 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) + assert cache.in_memory_cache.get_cache(f"org_id:{org_id}") is not None dead_db = _dead_db() membership = await get_team_membership(