Skip to content

Commit fcd6746

Browse files
Improve compaction test
1 parent 1b8dd2a commit fcd6746

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

nodejs/test/e2e/session_fs.test.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,17 @@ describe("Session Fs", async () => {
139139

140140
const eventsPath = p(session.sessionId, "/session-state/events.jsonl");
141141
await expect.poll(() => provider.exists(eventsPath)).toBe(true);
142+
const contentBefore = await provider.readFile(eventsPath, "utf8");
143+
expect(contentBefore).not.toContain("checkpointNumber");
142144

143145
await session.rpc.compaction.compact();
144146
await expect.poll(() => compactionEvent).toBeDefined();
145147
expect(compactionEvent!.data.success).toBe(true);
146-
expect(compactionEvent!.data.summaryContent).toContain("<overview>");
148+
149+
// Verify the events file was rewritten with a checkpoint via sessionFs
150+
await expect
151+
.poll(() => provider.readFile(eventsPath, "utf8"))
152+
.toContain("checkpointNumber");
147153
});
148154
});
149155

0 commit comments

Comments
 (0)