MCPcopy Create free account
hub / github.com/IBM/mcp-cli / test_no_timeout_when_fast

Function test_no_timeout_when_fast

tests/tools/test_execution.py:576–592  ·  view source on GitHub ↗

Fast tools complete normally without triggering the batch timeout.

()

Source from the content-addressed store, hash-verified

574
575@pytest.mark.asyncio
576async def test_no_timeout_when_fast():
577 """Fast tools complete normally without triggering the batch timeout."""
578 manager = SlowMockToolManager(default_delay=0.01)
579 calls = [
580 CTPToolCall(id="call_1", tool="tool_a", arguments={}),
581 CTPToolCall(id="call_2", tool="tool_b", arguments={}),
582 CTPToolCall(id="call_3", tool="tool_c", arguments={}),
583 ]
584
585 results = await execute_tools_parallel(manager, calls, batch_timeout=5.0)
586
587 # All tools should complete successfully
588 assert len(results) == 3
589 completed_tools = {r.tool for r in results}
590 assert completed_tools == {"tool_a", "tool_b", "tool_c"}
591 for r in results:
592 assert r.is_success
593
594
595# ----------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 2

execute_tools_parallelFunction · 0.90
SlowMockToolManagerClass · 0.85

Tested by

no test coverage detected