diff --git a/server/src/services/native-runtime/native-restart-recovery.test.ts b/server/src/services/native-runtime/native-restart-recovery.test.ts index 38d27760de..9fc969134b 100644 --- a/server/src/services/native-runtime/native-restart-recovery.test.ts +++ b/server/src/services/native-runtime/native-restart-recovery.test.ts @@ -210,6 +210,7 @@ describe("native controller takeover fencing", () => { it("does not let lease expiry bypass a live controller fence", async () => { const isProcessAlive = vi.fn(() => true); + const readProcessStartedAt = vi.fn(async () => recordedStart); await expect( evaluateNativeControllerTakeover({ owner: owner({ @@ -217,9 +218,11 @@ describe("native controller takeover fencing", () => { }), now, isProcessAlive, + readProcessStartedAt, }), ).resolves.toEqual({ allowed: false, reason: "controller_still_alive" }); expect(isProcessAlive).toHaveBeenCalledWith(123); + expect(readProcessStartedAt).toHaveBeenCalledWith(123); }); it("takes over an expired lease after proving the controller died", async () => {