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.
This commit is contained in:
mesalogo
2026-09-09 03:33:25 +08:00
parent 5a77dfdb93
commit 65dd752bc9
2 changed files with 9 additions and 4 deletions
@@ -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
@@ -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'