012 lease expiry renewal

✓ Passing This code compiles and runs correctly.

Code

input.k

Actual

slate cleared
node-a claimed epoch=1
node-b refused while lease live: node-a
node-b took expired lease epoch=2
record now says node-b
node-a fenced at epoch=2
node-a claimed room-99 epoch=1
node-b renew refused: node-a
node-a renewed its lease
room-99 still held: node-a
node-b took room-99 after lapse epoch=2

Expected output

slate cleared
node-a claimed epoch=1
node-b refused while lease live: node-a
node-b took expired lease epoch=2
record now says node-b
node-a fenced at epoch=2
node-a claimed room-99 epoch=1
node-b renew refused: node-a
node-a renewed its lease
room-99 still held: node-a
node-b took room-99 after lapse epoch=2

Flows

flow ~reset click a branch to expand · @labels scroll to their anchor
reset (world: "tests/regression/400_RUNTIME_FEATURES/470_FLEET/470_012_lease_expiry_renewal/world")
flow ~claim click a branch to expand · @labels scroll to their anchor
claim (world: "tests/regression/400_RUNTIME_FEATURES/470_FLEET/470_012_lease_expiry_renewal/world", id: "room-42", node: "node-a", ttl-ms: 250)
flow ~claim click a branch to expand · @labels scroll to their anchor
claim (world: "tests/regression/400_RUNTIME_FEATURES/470_FLEET/470_012_lease_expiry_renewal/world", id: "room-42", node: "node-b", ttl-ms: 0)
flow ~sleep-ms click a branch to expand · @labels scroll to their anchor
sleep-ms (ms: 400)
flow ~claim click a branch to expand · @labels scroll to their anchor
claim (world: "tests/regression/400_RUNTIME_FEATURES/470_FLEET/470_012_lease_expiry_renewal/world", id: "room-42", node: "node-b", ttl-ms: 0)
flow ~owner click a branch to expand · @labels scroll to their anchor
owner (world: "tests/regression/400_RUNTIME_FEATURES/470_FLEET/470_012_lease_expiry_renewal/world", id: "room-42")
flow ~guard click a branch to expand · @labels scroll to their anchor
guard (world: "tests/regression/400_RUNTIME_FEATURES/470_FLEET/470_012_lease_expiry_renewal/world", id: "room-42", node: "node-a", epoch: 1)
flow ~claim click a branch to expand · @labels scroll to their anchor
claim (world: "tests/regression/400_RUNTIME_FEATURES/470_FLEET/470_012_lease_expiry_renewal/world", id: "room-99", node: "node-a", ttl-ms: 200)
flow ~renew click a branch to expand · @labels scroll to their anchor
renew (world: "tests/regression/400_RUNTIME_FEATURES/470_FLEET/470_012_lease_expiry_renewal/world", id: "room-99", node: "node-b", ttl-ms: 800)
flow ~renew click a branch to expand · @labels scroll to their anchor
renew (world: "tests/regression/400_RUNTIME_FEATURES/470_FLEET/470_012_lease_expiry_renewal/world", id: "room-99", node: "node-a", ttl-ms: 800)
flow ~sleep-ms click a branch to expand · @labels scroll to their anchor
sleep-ms (ms: 250)
flow ~claim click a branch to expand · @labels scroll to their anchor
claim (world: "tests/regression/400_RUNTIME_FEATURES/470_FLEET/470_012_lease_expiry_renewal/world", id: "room-99", node: "node-b", ttl-ms: 0)
flow ~sleep-ms click a branch to expand · @labels scroll to their anchor
sleep-ms (ms: 700)
flow ~claim click a branch to expand · @labels scroll to their anchor
claim (world: "tests/regression/400_RUNTIME_FEATURES/470_FLEET/470_012_lease_expiry_renewal/world", id: "room-99", node: "node-b", ttl-ms: 0)

Test Configuration

MUST_RUN