Expand description
Duplex-backed test harness for ACP connections.
test_connection returns a full (ConnectionTo<Client>, TestPeer) pair
over an in-memory duplex transport. Use it for integration-style tests that
need to exercise the full serialize/dispatch path (so wire-format
regressions like extension method-name typos surface in tests).
When a test needs to pass a real Responder<ElicitationResponse> into a
component under test (e.g. an elicitation UI) and observe what that
component eventually sends, call TestPeer::fake_elicitation: it kicks
off a placeholder elicitation request, hands back the captured responder,
and returns a receiver that resolves when the responder is consumed.
Structs§
Functions§
- duplex_
pair - In-memory ACP transport pair:
(agent_transport, client_transport). Hand each half to aconnect_to/connect_withcall on the corresponding side. Must be used inside aLocalSetsince the runners arespawn_local’d. - test_
connection - Build a live
ConnectionTo<Client>over an in-memory duplex transport with a peer on the other end. Must be called inside aLocalSet.