Fast tools complete normally without triggering the batch timeout.
()
| 574 | |
| 575 | @pytest.mark.asyncio |
| 576 | async 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 | # ---------------------------------------------------------------------------- |
nothing calls this directly
no test coverage detected