OxL Справочник OxL
РусскийEnglish

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✓ проверяется в 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)

С версии. 1.0.0-beta

Параметры

ИмяТип
namestr
afterDur = 0ms

Эффекты

не объявлены (чистая, пока тело не говорит иное)

Определено в: std/test/test.oxl:229

См. также