Skip to content

Commit 806448e

Browse files
committed
test(webapp): assert the session ttl reaches the trigger options
1 parent 6137fd0 commit 806448e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

apps/webapp/test/realtimeServices.replicaLag.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ describe("realtime-svc — replica-lag guards", () => {
395395
environmentType: "DEVELOPMENT",
396396
organizationId: seed.organization.id,
397397
taskIdentifier: "my-task",
398-
triggerConfig: { basePayload: {} },
398+
triggerConfig: { basePayload: {}, ttl: "2m" },
399399
currentRunId: callingRunId,
400400
currentRunVersion: 0,
401401
streamBasinName: "session-pinned-basin",
@@ -429,6 +429,8 @@ describe("realtime-svc — replica-lag guards", () => {
429429
// previousRunId forwarded to the triggered run is the calling run's cuid (documented fallback).
430430
expect(triggerState.calls).toHaveLength(1);
431431
expect(triggerState.calls[0]!.body.payload.previousRunId).toBe(callingRunId);
432+
// The session's ttl reaches the trigger options, so an undequeued run expires.
433+
expect(triggerState.calls[0]!.body.options.ttl).toBe("2m");
432434
expect(versionCalls.at(-1)).toEqual({ requested: "v2", basin: null });
433435
expect(replica.wasHit("taskRun")).toBe(true);
434436

0 commit comments

Comments
 (0)