Expand description
Async testing utilities.
This module provides helpers for testing async MCP code, including timeout wrappers and assertion helpers.
Structs§
- Test
Barrier - A test barrier for synchronizing async tests.
- Test
Latch - A test latch that can be awaited once.
Constants§
- DEFAULT_
TIMEOUT - Default timeout for async operations in tests.
Functions§
- assert_
completes_ within - Assert that an async operation completes within a timeout.
- assert_
times_ out - Assert that an async operation times out.
- collect_
with_ timeout - Collect async stream items into a vector with timeout.
- retry
- Retry an async operation until it succeeds or max attempts is reached.
- wait_
for - Wait for a condition to become true.
- wait_
for_ async - Wait for an async condition to become true.
- with_
default_ timeout - Run an async function with the default timeout.
- with_
timeout - Run an async function with a timeout.