Skip to content

Commit 3b655fe

Browse files
committed
fix: enhance temporary directory setup for SQLite tests with additional options
1 parent 2e33dd8 commit 3b655fe

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

test/sessions.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ import {
77
import { useTempDir } from "./test-utils";
88

99
describe("SQLite Sessions", () => {
10-
const { getDbPath, closeDatabases } = useTempDir("sqlite-session-test-");
10+
const { getDbPath, closeDatabases } = useTempDir("sqlite-session-test-", {
11+
waitForWindows: true,
12+
cleanupWalFiles: true,
13+
});
1114
let db: DatabaseSyncInstance;
1215

1316
beforeEach(() => {

test/test-utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ export function useTempDir(
138138

139139
// Wait a bit for Windows file handles to be released if requested
140140
if (options?.waitForWindows && process.platform === "win32") {
141-
await new Promise((resolve) => setTimeout(resolve, 100));
141+
await new Promise((resolve) => setTimeout(resolve, 500));
142142
}
143143

144144
if (fs.existsSync(context.tempDir)) {

0 commit comments

Comments
 (0)