Skip to main content

Module mock

Module mock 

Source
Expand description

Test-only ProcessSpawner / ProcessHandle implementations.

Tests install a MockSpawner via super::handle::install_spawner, enqueue per-spawn responses, and drive the resulting MockProcess state explicitly via the controller returned at enqueue time. There are zero real subprocesses, no thread::sleep, no Instant::now polling.

Structsยง

MockHandleController
Test-side controller for a MockProcess. Cloneable; all clones reference the same underlying state.
MockProcess
Mock process backed by a shared MockState.
MockProcessConfig
Behaviour to script for a single mocked spawn.
MockSpawner
Test ProcessSpawner that returns scripted MockProcess handles and captures the SpawnSpec passed to each spawn.