Skip to content

Commit 04a6a31

Browse files
committed
perf(test): isolate gateway health startup imports
1 parent c9349d1 commit 04a6a31

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/gateway/server.health.test.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,19 @@
22
* Gateway health endpoint integration tests.
33
*/
44
import { randomUUID } from "node:crypto";
5-
import { afterAll, beforeAll, describe, expect, test } from "vitest";
5+
import { afterAll, beforeAll, describe, expect, test, vi } from "vitest";
66
import { emitAgentEvent } from "../infra/agent-events.js";
77
import { emitHeartbeatEvent } from "../infra/heartbeat-events.js";
88
import { GATEWAY_CLIENT_MODES, GATEWAY_CLIENT_NAMES } from "../utils/message-channel.js";
99
import { startGatewayServerHarness, type GatewayServerHarness } from "./server.e2e-ws-harness.js";
1010
import { installGatewayTestHooks, onceMessage } from "./test-helpers.js";
1111

12+
// Health/presence coverage does not exercise post-restart delivery recovery.
13+
// Keep that auto-reply graph in the dedicated restart-sentinel suite.
14+
vi.mock("./server-restart-sentinel.js", () => ({
15+
recoverPendingRestartContinuationDeliveries: vi.fn(async () => undefined),
16+
}));
17+
1218
installGatewayTestHooks({ scope: "suite" });
1319
const HEALTH_E2E_TIMEOUT_MS = 20_000;
1420
const PRESENCE_EVENT_TIMEOUT_MS = 6_000;

0 commit comments

Comments
 (0)