

























@@ -519,6 +519,8 @@ describe("stuck session diagnostics threshold", () => {
519519it("aborts and drains embedded runs after an extended no-progress stall", () => {
520520const events: DiagnosticEventPayload[] = [];
521521const recoverStuckSession = vi.fn();
522+const stuckSessionWarnMs = 30_000;
523+const stuckSessionAbortMs = resolveStuckSessionAbortMs(undefined, stuckSessionWarnMs);
522524const unsubscribe = onDiagnosticEvent((event) => {
523525events.push(event);
524526});
@@ -527,18 +529,18 @@ describe("stuck session diagnostics threshold", () => {
527529{
528530diagnostics: {
529531enabled: true,
530-stuckSessionWarnMs: 30_000,
532+ stuckSessionWarnMs,
531533},
532534},
533535{ recoverStuckSession },
534536);
535537logSessionStateChange({ sessionId: "s1", sessionKey: "main", state: "processing" });
536538markDiagnosticEmbeddedRunStarted({ sessionId: "s1", sessionKey: "main" });
537539538-vi.advanceTimersByTime(9 * 60_000);
540+vi.advanceTimersByTime(stuckSessionAbortMs - 30_000);
539541expect(recoverStuckSession).not.toHaveBeenCalled();
540542541-vi.advanceTimersByTime(2 * 60_000);
543+vi.advanceTimersByTime(30_000);
542544} finally {
543545unsubscribe();
544546}
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。