Skip to content

Commit 81e3334

Browse files
committed
test: align doctor session lock repair expectation
1 parent 5b1bebc commit 81e3334

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/commands/doctor-session-locks.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ describe("noteSessionLockHealth", () => {
104104
await expect(fs.access(freshLock)).resolves.toBeUndefined();
105105
});
106106

107-
it("uses configured stale threshold when repairing lock files", async () => {
107+
it("uses configured stale threshold without removing live OpenClaw lock files", async () => {
108108
const sessionsDir = state.sessionsDir();
109109
await fs.mkdir(sessionsDir, { recursive: true });
110110

@@ -124,8 +124,8 @@ describe("noteSessionLockHealth", () => {
124124
expect(note).toHaveBeenCalledTimes(1);
125125
const [message] = firstNoteCall();
126126
expect(message).toContain("stale=yes (too-old)");
127-
expect(message).toContain("[removed]");
128-
await expectPathMissing(configuredStaleLock);
127+
expect(message).not.toContain("[removed]");
128+
await expect(fs.access(configuredStaleLock)).resolves.toBeUndefined();
129129
});
130130

131131
it("removes fresh live locks when the owner is not an OpenClaw process", async () => {

0 commit comments

Comments
 (0)