pub enum Step<C> {
Command {
node: NodeId,
cmd: C,
},
Crash(NodeId),
Restart(NodeId),
Suspend(NodeId),
Resume(NodeId),
CrashOnNextWrite(NodeId),
Sever(NodeId, NodeId),
Reconnect(NodeId, NodeId),
Partition(Vec<Vec<NodeId>>),
Heal,
BreakSession(NodeId, NodeId),
}Expand description
One thing done to a run from outside it.
The vocabulary is exactly the simulator’s own mutators, so that anything a hand-written test can do to a run is something a description can say. The two opt-ins that are not faults — the codec check and session-event delivery — belong to how the run is built rather than to what happens during it, and so live in the constructor a scenario is run with.
Variants§
Command
Hand a command to a process.
Crash(NodeId)
Crash a process: it loses everything volatile.
Restart(NodeId)
Restart a crashed process, which takes its startup branch.
Suspend(NodeId)
Suspend a process: it stops, keeping its state and everything addressed to it.
Resume(NodeId)
Resume a suspended process.
CrashOnNextWrite(NodeId)
Arm a process’s next durable write to be the one it dies inside.
Sever(NodeId, NodeId)
Cut one pair off from each other, leaving every other pair alone.
Reconnect(NodeId, NodeId)
Restore one pair, leaving every other severing in place.
Partition(Vec<Vec<NodeId>>)
Split the network into groups, replacing whatever was severed before.
Heal
Restore full connectivity, discarding every severing however it was made.
BreakSession(NodeId, NodeId)
End the session between a pair, losing an unknown suffix of what was in flight.