Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Testing MCP Tool Call Hangs with Deterministic Failure Lab

说明与用途

MCP Failure Lab 允许确定性地模拟工具挂起,以验证客户端超时、取消、会话可用性和状态变化。

问题

MCP clients need deterministic tests for tool calls that hang, to verify timeout handling, cancellation, and state consistency.

结果

Deterministic hangs enable reliable testing of client timeout logic, cancellation handling, and side‑effect verification, reducing flaky test failures.

工作流

  • 1. Install MCP Failure Lab: npx mcp-failure-lab demo
  • 2. Define a scenario JSON that calls the hang tool with a timeout, e.g. 1000 ms
  • 3. Run the scenario; the client should receive a timeout after the specified period
  • 4. Optionally call observe to check server state after the timeout
  • 5. Verify that the session remains usable and that other tool calls succeed

证据

MCP Failure Lab has a hang tool specifically for this.

来源

The server hangs. The client is expected to time out after one second.

来源

Failure Lab supports an independent observe call for scenarios where state needs to be checked after the main call.

来源

  • 记录日期: 2026-09-08T15:48:33.950Z