~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.
Python academiaanthropicarxivbravedeep-researchencryptionhome-automationhomeserverlocallocal-deep-researchlocal-llmmistralollamaopenaipubmedresearchresearch-toolretrieval-augmented-generationsearxngself-hosted
test(conftest): stop QueueProcessorV2 thread between tests (#4441)
LearningCircuit5f5a691c9fec
diff --git a/changelog.d/+test-stop-queue-processor-between-tests.misc.md b/changelog.d/+test-stop-queue-processor-between-tests.misc.mdnew file mode 100644index 0000000000..dad856bf55--- /dev/null+++ b/changelog.d/+test-stop-queue-processor-between-tests.misc.md@@ -0,0 +1 @@+Tests: stop the ``QueueProcessorV2`` background thread between tests in the ``reset_singletons`` autouse fixture (it already did this for ``BackgroundJobScheduler``). The module-level ``queue_processor`` singleton was started by the first ``create_app()`` in an xdist worker and never stopped, so one test's processor thread ran for the whole worker — looping through ``SettingsManager`` → SQLCipher connection opens on the shared ``db_manager`` concurrently with every later test, and emitting logs to a closed pytest stderr sink at teardown (the same class of bug the scheduler handling fixes). Tests that exercise the queue patch the singleton, so stopping the real thread does not affect them.diff --git a/tests/conftest.py b/tests/conftest.pyindex e06d87c063..6c0a543619 100644--- a/tests/conftest.py+++ b/tests/conftest.py@@ -93,6 +93,28 @@ def reset_all_singletons():except ImportError:pass+ # QueueProcessorV2 (module-level singleton thread). Like the+ # scheduler above, create_app() starts this background thread, but+ # nothing stopped it between tests — so the first test's processor+ # ran for the whole worker, looping through SettingsManager ->+ # SQLCipher connection opens on the shared db_manager concurrently+ # with every later test (and emitting logs to a closed pytest+ # stderr sink at teardown). Stop it here so each test starts clean;+ # the next create_app() restarts it (stop() clears the running+ # guard). Tests that exercise the queue patch this object, so+ # stopping the real thread does not affect them.+ try:+ from local_deep_research.web.queue.processor_v2 import (+ queue_processor,+ )++ queue_processor.stop()+ except ImportError:+ pass+ except Exception:+ # Never fail fixture teardown on queue-processor edge cases.+ pass+# ProviderDiscovery - reset both class-level and module-level statetry:from local_deep_research.llm.providers import auto_discovery