diff --git a/cypress/plugins/index.js b/cypress/plugins/index.js --- a/cypress/plugins/index.js +++ b/cypress/plugins/index.js @@ -35,7 +35,9 @@ }; function getDatabase() { - return new sqlite3.Database('./swh-web-test.sqlite3'); + const db = new sqlite3.Database('./swh-web-test.sqlite3'); + db.configure('busyTimeout', 20000); // 20 seconds + return db; } module.exports = (on, config) => { diff --git a/swh/web/settings/common.py b/swh/web/settings/common.py --- a/swh/web/settings/common.py +++ b/swh/web/settings/common.py @@ -132,6 +132,9 @@ "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": swh_web_config.get("development_db", ""), + "OPTIONS": { + "timeout": 20, # in seconds + }, } }