Files
sales-trainer/backend/tests/test_llm_timeout.py
Macky f63f1867f5 feat: trial follow-up drills, persona progress UI, LLM timeout 180s
- social trial: silent/gone follow-up outcomes with localized notice
  variants; gone is always a loss with possibility-framed debrief
- gone marker persists across judge outages; retries stay on the
  deterministic loss path (no roleplay reopen)
- bounded analysis_progress persisted during persona generation,
  exposed via safe serializer, polled + rendered as accessible UI
- LLM HTTP timeout 105s -> 180s for Qwen 3.8 (enable_thinking off)
- demo-account test clock made relative to current UTC
- regression coverage: follow-up branches, judge-failure retry,
  progress callback, timeout contract, progress serializer
- independent review finding verified stale against final tree

Tests: 532 backend, 29 frontend, prod build green
2026-10-02 12:53:59 +07:00

16 lines
430 B
Python

from app.llm import LLMClient
def test_llm_client_allows_slow_model_calls(monkeypatch):
captured = {}
class StubOpenAI:
def __init__(self, **kwargs):
captured.update(kwargs)
monkeypatch.setattr("app.llm.OpenAI", StubOpenAI)
LLMClient(base_url="https://llm.example/v1", api_key="test-key", model="slow-model")
assert captured["timeout"] == 180.0
assert captured["max_retries"] == 0