Expand description
Utilities for testing subsystems.
Modules§
- mock
- Generally useful mock data providers for unit tests.
Macros§
- arbitrary_
order - Asserts that two patterns match, yet only one
Structs§
- Forward
Subsystem - A forward subsystem that implements
Subsystem
. - Message
Counter - Message counter over subsystems.
- Single
Item Sink - The sink half of a single-item sink that does not resolve until the item has been read.
- Single
Item Stream - The stream half of a single-item sink.
- Test
Subsystem Context - A test subsystem context.
- Test
Subsystem Context Handle - A handle for interacting with the subsystem context.
- Test
Subsystem Sender - A test subsystem sender.
- Yield
- Future that yields the execution once and resolves immediately after.
Functions§
- derive_
erasure_ chunks_ with_ proofs_ and_ root - Helper for chunking available data.
- make_
buffered_ subsystem_ context - 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_
subsystem_ context - Make a test subsystem context with
buffer_size == 0
. This is used by most of the tests. - sender_
receiver - Construct a sender/receiver pair.
- single_
item_ sink - Create a single-item Sink/Stream pair.
- subsystem_
test_ harness - Test a subsystem, mocking the overseer