fix(daemon): extend restart health timeout and improve restart errors

This commit is contained in:
Peter Steinberger
2026-02-23 01:49:54 +01:00
parent 278331c49c
commit 80f430c2be
3 changed files with 28 additions and 7 deletions

View File

@@ -41,6 +41,8 @@ vi.mock("../../daemon/service.js", () => ({
}));
vi.mock("./restart-health.js", () => ({
DEFAULT_RESTART_HEALTH_ATTEMPTS: 120,
DEFAULT_RESTART_HEALTH_DELAY_MS: 500,
waitForGatewayHealthyRestart,
terminateStaleGatewayPids,
renderRestartDiagnostics,
@@ -123,7 +125,7 @@ describe("runDaemonRestart health checks", () => {
const { runDaemonRestart } = await import("./lifecycle.js");
await expect(runDaemonRestart({ json: true })).rejects.toMatchObject({
message: "Gateway restart failed health checks.",
message: "Gateway restart timed out after 60s waiting for health checks.",
});
expect(terminateStaleGatewayPids).not.toHaveBeenCalled();
expect(renderRestartDiagnostics).toHaveBeenCalledTimes(1);