Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

fix(tests): lower SQLCipher KDF iterations in app fixture to prevent CI worker timeouts (#4381)

LearningCircuit99b95cd3ab7a
diff --git a/tests/conftest.py b/tests/conftest.py
index f9002f82f7..755935464d 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -225,6 +225,15 @@ def app(temp_data_dir, monkeypatch):
# Override data directory
monkeypatch.setenv("LDR_DATA_DIR", str(temp_data_dir))
+ # Production default (256000) makes PBKDF2 dominate wall-clock in
+ # fixtures that register + log in users (authenticated_client runs
+ # it twice per test). Under xdist CPU contention from leaked auth
+ # background threads, setup blows past the 60s pytest-timeout and
+ # the worker dies — taking the rest of its tests with it and
+ # dropping coverage below the 50% gate. sqlcipher_utils declares
+ # MIN_KDF_ITERATIONS_TESTING=1 specifically to support this.
+ monkeypatch.setenv("LDR_DB_CONFIG_KDF_ITERATIONS", "1000")
+
# Note: PYTEST_CURRENT_TEST is automatically set by pytest, which
# app_factory.py checks to disable secure cookies for testing
@@ -260,6 +269,7 @@ def app_with_csrf(temp_data_dir, monkeypatch):
general request testing — those tests should not be coupled to CSRF.
"""
monkeypatch.setenv("LDR_DATA_DIR", str(temp_data_dir))
+ monkeypatch.setenv("LDR_DB_CONFIG_KDF_ITERATIONS", "1000")
app, _ = create_app()
app.config["TESTING"] = True
# Deliberately do NOT disable CSRF — this fixture exists to verify it.