Browse Source

test(session): exclude interval fallback from mandatory checkpoint

Tianyi Cui 1 month ago
parent
commit
3ba25cd4cb
1 changed files with 2 additions and 0 deletions
  1. 2 0
      packages/session/session-projection-cache/tests/cache.spec.ts

+ 2 - 0
packages/session/session-projection-cache/tests/cache.spec.ts

@@ -201,6 +201,8 @@ afterEach(async () => {
 describe('SessionProjectionCache write policy', () => {
   it('writes a durable checkpoint at turn/end (mandatory point)', async () => {
     const { ctx, root } = await harness()
+    // The interval cannot substitute for the mandatory turn/end trigger.
+    vi.useFakeTimers({ toFake: ['setTimeout', 'clearTimeout'] })
     const id = SessionId('turn-end')
     const created = whenWritten(ctx, id)
     const session = ctx.sessions.create(id)