From 19d1e1d33492000861cea7ca11104adfc90a7d02 Mon Sep 17 00:00:00 2001 From: silverwind Date: Wed, 10 Jun 2026 10:32:32 +0200 Subject: [PATCH] test: enable WAL for sqlite integration tests (#37861) Enable `SQLITE_JOURNAL_MODE = WAL` for the sqlite integration test config. With modernc as the default driver, concurrent writers serialize on SQLite's single write lock and the tail of the queue can exceed the 20s busy timeout under CI load. WAL drains the queue fast enough to stay inside the timeout (removes rollback's fsync-per-commit and reader-vs-commit blocking) and covers all sqlite integration tests in one change. --- This PR was written with the help of Claude Opus 4.7 --------- Co-authored-by: Claude (Opus 4.7) Co-authored-by: Lunny Xiao Co-authored-by: Giteabot --- .github/workflows/files-changed.yml | 5 +++++ tests/sqlite.ini.tmpl | 1 + 2 files changed, 6 insertions(+) diff --git a/.github/workflows/files-changed.yml b/.github/workflows/files-changed.yml index 3c0603974e..11ff4cec68 100644 --- a/.github/workflows/files-changed.yml +++ b/.github/workflows/files-changed.yml @@ -64,6 +64,11 @@ jobs: - ".golangci.yml" - ".editorconfig" - "options/locale/locale_en-US.json" + - "models/fixtures/**" + - "tests/*.ini.tmpl" + - "tests/gitea-repositories-meta/**" + - "tests/testdata/**" + - "tools/test-integration.sh" frontend: - "*.ts" diff --git a/tests/sqlite.ini.tmpl b/tests/sqlite.ini.tmpl index 95a1df283f..a12735e06d 100644 --- a/tests/sqlite.ini.tmpl +++ b/tests/sqlite.ini.tmpl @@ -5,6 +5,7 @@ RUN_MODE = prod [database] DB_TYPE = sqlite3 PATH = gitea-test.db +SQLITE_JOURNAL_MODE = WAL [indexer] REPO_INDEXER_ENABLED = true