Close SQLite probe handle after journalMode assertion

This commit is contained in:
Huanqi Cao
2026-07-05 17:47:24 +08:00
committed by imccyu
parent 1a4af034c0
commit 130944caeb

View File

@@ -423,7 +423,9 @@ describe('SessionPersistenceSqlite: edge cases', () => {
const walPath = await freshDbPath()
const bWal = await backend(walPath)
await bWal.ctx.sessionPersistence.create(meta('jm-wal'))
expect((openDatabase(walPath, 'wal').prepare('PRAGMA journal_mode').get() as { journal_mode: string }).journal_mode).toBe('wal')
const probe = openDatabase(walPath, 'wal')
expect((probe.prepare('PRAGMA journal_mode').get() as { journal_mode: string }).journal_mode).toBe('wal')
probe.close()
await bWal.dispose()
const deletePath = await freshDbPath()