Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

Studio tests: give the llama-server owner tests a wait cap a loaded runner can meet (#17488)

Daniel Han9dc37ed086e8
diff --git a/studio/backend/tests/test_llama_upstream_single_owner.py b/studio/backend/tests/test_llama_upstream_single_owner.py
index 45131c71464..95d81167d06 100644
--- a/studio/backend/tests/test_llama_upstream_single_owner.py
+++ b/studio/backend/tests/test_llama_upstream_single_owner.py
@@ -415,12 +415,17 @@ class _BlockedRespawnBackend(_Backend):
self.finished.set()
+# Only a cap: _until returns as soon as the predicate holds. 1 s was too short for a loaded 2-core
+# runner under xdist, where the backend thread's next turn can come later than that.
+_UNTIL_TIMEOUT_S = 15
+
+
async def _until(predicate):
async def poll():
while not predicate():
await asyncio.sleep(0.005)
- await asyncio.wait_for(poll(), timeout = 1)
+ await asyncio.wait_for(poll(), timeout = _UNTIL_TIMEOUT_S)
_STREAM_ROUTES = [_ROUTES[i] for i in (0, 3, 4, 6)]