


























@@ -305,6 +305,7 @@ describe("main-session-restart-recovery", () => {
305305const callParams = vi.mocked(callGateway).mock.calls[0]?.[0].params as { message?: string };
306306expect(callParams.message).toContain(pendingPayload);
307307308+const beforeStoreRead = Date.now();
308309const store = loadSessionStore(path.join(sessionsDir, "sessions.json"));
309310const entry = store["agent:main:main"];
310311expect(entry).toMatchObject({
@@ -314,8 +315,8 @@ describe("main-session-restart-recovery", () => {
314315pendingFinalDeliveryAttemptCount: 1,
315316pendingFinalDeliveryLastError: null,
316317});
317-expect(entry?.pendingFinalDeliveryCreatedAt).toEqual(expect.any(Number));
318-expect(entry?.pendingFinalDeliveryLastAttemptAt).toEqual(expect.any(Number));
318+expect(entry?.pendingFinalDeliveryCreatedAt).toBeLessThanOrEqual(beforeStoreRead);
319+expect(entry?.pendingFinalDeliveryLastAttemptAt).toBeLessThanOrEqual(beforeStoreRead);
319320expect(entry?.pendingFinalDeliveryLastAttemptAt ?? 0).toBeGreaterThanOrEqual(
320321entry?.pendingFinalDeliveryCreatedAt ?? Number.POSITIVE_INFINITY,
321322);
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。