OxL Reference

method node.kill

Crashes the node: its memory and timers are gone, its disk keeps only what was synced. With after the crash happens that much virtual time later (the test body continues immediately; time passes with clock.advance / sleep).

Example:

oxl✓ checked in CI
use std.test { node }

test sim "a killed node is down" seeds 1..=2 {
  node.kill("n1")
  assert !node.isUp("n1")
}
pub(api) static fn kill(name: str, after: Dur = 0ms)

Since. 1.0.0-beta

Parameters

NameType
namestr
afterDur = 0ms

Effects

none declared (pure unless the body says otherwise)

Defined in: std/test/test.oxl:229

See also