Skip to content

Commit 520992a

Browse files
committed
test(gateway): avoid future session fixture timestamps
1 parent 00d21a4 commit 520992a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/gateway/server-methods/agent.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1823,6 +1823,7 @@ describe("gateway agent handler", () => {
18231823
});
18241824
it("reactivates completed subagent sessions and broadcasts send updates", async () => {
18251825
const childSessionKey = "agent:main:subagent:followup";
1826+
const updatedAt = Date.now() - 1_000;
18261827
const completedRun = {
18271828
runId: "run-old",
18281829
childSessionKey,
@@ -1843,15 +1844,15 @@ describe("gateway agent handler", () => {
18431844
storePath: "/tmp/sessions.json",
18441845
entry: {
18451846
sessionId: "sess-followup",
1846-
updatedAt: Date.now(),
1847+
updatedAt,
18471848
},
18481849
canonicalKey: childSessionKey,
18491850
});
18501851
mocks.updateSessionStore.mockImplementation(async (_path, updater) => {
18511852
const store: Record<string, unknown> = {
18521853
[childSessionKey]: {
18531854
sessionId: "sess-followup",
1854-
updatedAt: Date.now(),
1855+
updatedAt,
18551856
},
18561857
};
18571858
return await updater(store);

0 commit comments

Comments
 (0)