mirror of
https://gitee.com/mateos/mateclaw.git
synced 2026-09-13 11:13:43 +08:00
Adds WebChatStreamE2ETest — first test in the suite to boot a real servlet container (RANDOM_PORT) and exercise /stream over actual HTTP, parsing the SSE wire format that any third-party SDK would see. AgentService is swapped with a Mockito @MockBean so chatStructuredStream returns canned StreamDeltas — fast, deterministic, no real LLM. Coverage: - happy path: meta → content_delta* → done, assistant reply persisted - multi-chunk reply with thinking_delta + _usage_final event (verifies persisted prompt_tokens / completion_tokens / runtime_model) - bad API key → SSE error event "Invalid API Key" - blank message → SSE error event "Message is required" - channel with no bound agent → SSE error event "No agent configured" - explicit sessionId → meta echoes it + seeds conversation namespace - invalid visitorId charset → SSE error event 7 tests, ~5s. Mid-stream stop is covered by WebChatStopStreamTest at the controller level; attachment ingestion is left for a follow-up since it requires POST /upload first. Stack: feat/webchat-docs → feat/webchat-stream-e2e-test Epic issue: #355 |
||
|---|---|---|
| .. | ||
| src | ||
| Dockerfile | ||
| pom.xml | ||
| settings.xml | ||