18.4 Simulation
test sim "checkout under faults" seeds 1..=500 {
net.partition(["api"], ["storage"], for: 2s)
net.latency(10ms..300ms)
node.kill("saga-0") after 1s
clock.advance(1h)
assert checkout(cart) is Order | PayError
}- In
simthe scheduler, network, clocks, randomness and disk failures are deterministic; the result depends only on the seed. - For every seed in the range the test is executed anew. A failure prints the seed;
oxl test --seed Nreproduces it. - Control:
net.partition,net.latency,net.drop(p),node.kill/restart,disk.fail(node, p),clock.advance/set.
Implementation-defined. Simulator model (D-8056; DIV-036; D-6213, D-6256..D-6258). The Standard requires determinism by seed; the level of detail of the model is implementation-defined. This implementation: simulation nodes use a shared storage; membership is exact (without SWIM); routing depends on the seed; Raft and SWIM,
cluster.leaderand streaming rpcs between nodes are not modelled;disk.faildoes not reach the storages; flags, KMS, telemetry and cron are one set per process.
See also
Source: docs/spec/oxl-standard.en.md