From e35ea7692f1a6b30836d186186b63fc16431c42b Mon Sep 17 00:00:00 2001 From: mesalogo Date: Wed, 9 Sep 2026 03:33:25 +0800 Subject: [PATCH] test: avoid disk-bound history limit fixtures Use real in-memory SQLite for the remote-message ordering and active-task retention query tests. Both exceeded the CI five-second limit while seeding 502 independently committed records on disk. Keep the record counts, public database calls, and assertions unchanged. Disk persistence, transactional migration, and reopen tests remain disk-backed. Production database behavior is unchanged. --- src/main/assistant/assistant-database.test.ts | 6 ++++-- src/main/knowledge/knowledge-database.test.ts | 7 +++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/main/assistant/assistant-database.test.ts b/src/main/assistant/assistant-database.test.ts index 7e3cdbb1..b0203eed 100644 --- a/src/main/assistant/assistant-database.test.ts +++ b/src/main/assistant/assistant-database.test.ts @@ -1965,8 +1965,10 @@ describe('AssistantDatabase', () => { database.close() }) - it('returns the latest 500 remote messages in chronological order', async () => { - const database = await createDatabase() + it('returns the latest 500 remote messages in chronological order', () => { + // Exercise the query boundary without 502 disk-synchronized fixture writes. + const database = new AssistantDatabase(':memory:') + database.initialize('C:\\Workspace') const project = database.ensureChannelProjects( 'C:\\Users\\test', channelDefaultProfileId diff --git a/src/main/knowledge/knowledge-database.test.ts b/src/main/knowledge/knowledge-database.test.ts index 1f36250f..2666a7a2 100644 --- a/src/main/knowledge/knowledge-database.test.ts +++ b/src/main/knowledge/knowledge-database.test.ts @@ -621,8 +621,11 @@ describe('KnowledgeDatabase', () => { }) }) - it('lists every active task in addition to the terminal history limit', async () => { - const { database } = await createDatabase() + it('lists every active task in addition to the terminal history limit', () => { + // This checks retention, not the disk latency of 502 independent writes. + const database = new KnowledgeDatabase(':memory:') + database.initialize() + openDatabases.push(database) const library = database.createKnowledgeBase({ name: 'Task listing', storageMode: 'reference'