Skip to content

Commit 923309a

Browse files
committed
test(server): set the fake serving child's busy timeout with a PRAGMA so it holds on every Node version
1 parent fe4bff9 commit 923309a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎apps/server/src/serviceLauncher.test.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,8 @@ if (context.update?.status === "pending") {
499499
writeFileSync(context.update.dbPath + "-wal", "trial wal");
500500
process.exit(1);
501501
} else if (context.update === undefined) {
502-
const db = new DatabaseSync(paths.databasePath, { timeout: 5000 });
502+
const db = new DatabaseSync(paths.databasePath);
503+
db.exec("PRAGMA busy_timeout = 5000;");
503504
db.exec("PRAGMA journal_mode = " + paths.journalMode + ";");
504505
const insert = db.prepare("INSERT INTO events (payload) VALUES (?)");
505506
const writer = setInterval(() => insert.run("written while serving"), 1);

0 commit comments

Comments
 (0)