fix: close finite remote database connections

This commit is contained in:
vorotamoroz
2026-08-14 10:29:29 +00:00
parent 16c7cc1b0f
commit de03534d2f
10 changed files with 163 additions and 45 deletions
@@ -222,6 +222,7 @@ describe("LocalDatabaseMaintenance Garbage Collection V3", () => {
const remoteDatabase = {
compact: vi.fn(async () => ({ ok: true })),
info: vi.fn(async () => ({ compact_running: true })),
close: vi.fn(async () => undefined),
};
Object.assign(maintenance, {
core: {
@@ -243,6 +244,7 @@ describe("LocalDatabaseMaintenance Garbage Collection V3", () => {
"Compaction on remote database completed successfully.",
"gc-compact"
);
expect(remoteDatabase.close).toHaveBeenCalledOnce();
});
it.each([