Expand description
Utilities for testing subsystems.
Modules§
- Generally useful mock data providers for unit tests.
Macros§
- Asserts that two patterns match, yet only one
Structs§
- A forward subsystem that implements
Subsystem
. - Message counter over subsystems.
- The sink half of a single-item sink that does not resolve until the item has been read.
- The stream half of a single-item sink.
- A test subsystem context.
- A handle for interacting with the subsystem context.
- A test subsystem sender.
- Future that yields the execution once and resolves immediately after.
Functions§
- Helper for chunking available data.
- Make a test subsystem context with buffered overseer channel. Some tests (e.g.
dispute-coordinator
) create too many parallel operations and deadlock unless the channel is buffered. Usuallybuffer_size=1
is enough. - Make a test subsystem context with
buffer_size == 0
. This is used by most of the tests. - Construct a sender/receiver pair.
- Create a single-item Sink/Stream pair.
- Test a subsystem, mocking the overseer