Skip to content

Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.

test(runtime): use complete llama selection in shutdown regression

myhloli58c0d64cec00
diff --git a/tests/unittest/test_runtime_shutdown_regressions.py b/tests/unittest/test_runtime_shutdown_regressions.py
index 1f368a30..80dcfb21 100644
--- a/tests/unittest/test_runtime_shutdown_regressions.py
+++ b/tests/unittest/test_runtime_shutdown_regressions.py
@@ -272,7 +272,8 @@ def test_failed_real_factory_closes_engine_outside_global_cache_lock() -> None:
worker.start()
waited.append(finished.wait(2))
- llama_device.resolve_llama_device = lambda **kwargs: SimpleNamespace(device="cpu")
+ # 使用完整设备计划,让真实线程策略通过后继续验证失败构造的清理与锁边界。
+ llama_device.resolve_llama_device = lambda **kwargs: llama_device.LlamaSelection(device="cpu")
llama_device.llama_engine_scope = engine_scope
runtime.MinerUClient = client_factory
sys.modules["mineru_llama_cpp"] = SimpleNamespace(Engine=Engine)