Skip to content

Build your personal knowledge base with Trilium Notes

integration-test: Disable WAL for cleaner commits

Elian Doran5aa0040a834c
diff --git a/integration-tests/db/document.db b/integration-tests/db/document.db
index c10de9aec1..72864bb154 100644
Binary files a/integration-tests/db/document.db and b/integration-tests/db/document.db differ
diff --git a/integration-tests/db/document.db-shm b/integration-tests/db/document.db-shm
deleted file mode 100644
index c29f3a9599..0000000000
Binary files a/integration-tests/db/document.db-shm and /dev/null differ
diff --git a/integration-tests/db/document.db-wal b/integration-tests/db/document.db-wal
deleted file mode 100644
index 75e5436757..0000000000
Binary files a/integration-tests/db/document.db-wal and /dev/null differ
diff --git a/package.json b/package.json
index ce2aeef7fe..eb3fc04648 100644
--- a/package.json
+++ b/package.json
@@ -45,7 +45,7 @@
"prepare-dist": "rimraf ./dist && tsc && tsx ./bin/copy-dist.ts",
"update-build-info": "tsx bin/update-build-info.ts",
"errors": "tsc --watch --noEmit",
- "integration-edit-db": "cross-env TRILIUM_PORT=8081 TRILIUM_DATA_DIR=./integration-tests/db nodemon src/www.ts"
+ "integration-edit-db": "cross-env TRILIUM_INTEGRATION_TEST=edit TRILIUM_PORT=8081 TRILIUM_DATA_DIR=./integration-tests/db nodemon src/www.ts"
},
"dependencies": {
"@braintree/sanitize-url": "^7.1.0",
diff --git a/src/services/sql.ts b/src/services/sql.ts
index 0d92e62091..a3ba519a7f 100644
--- a/src/services/sql.ts
+++ b/src/services/sql.ts
@@ -15,7 +15,9 @@ import becca_loader from "../becca/becca_loader.js";
import entity_changes from "./entity_changes.js";
const dbConnection: DatabaseType = new Database(dataDir.DOCUMENT_PATH);
-dbConnection.pragma('journal_mode = WAL');
+if (!process.env.TRILIUM_INTEGRATION_TEST) {
+ dbConnection.pragma('journal_mode = WAL');
+}
const LOG_ALL_QUERIES = false;