Skip to main content

Module testing

Module testing 

Source
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).

Structs§

TestPeer

Functions§

duplex_pair
In-memory ACP transport pair: (agent_transport, client_transport). Hand each half to a connect_to / connect_with call on the corresponding side. Must be used inside a LocalSet since the runners are spawn_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 a LocalSet.

Type Aliases§

DuplexByteStreams