RoomHarness
data class RoomHarness(val hostFactory: RoomFactory, val joinerFactory: RoomFactory, val faultyLoom: FaultyLoom?, val clock: () -> Instant, val advanceClock: (Long) -> Unit)
A harness that bundles host and joiner RoomFactorys plus optional FaultyLoom for partition tests.
faultyLoom wraps the same InMemoryLoom that both factories use. setFaultProfileOnAll partitions all links atomically. When null the suite treats this fabric as non-faultable and skips partition tests.
Per-side fault injection: access individual FaultySeam instances via faultyLoom.links — index 0 is the host's seam (created by the first host() call), index 1 is the joiner's seam (created by join()).
clock and advanceClock are shared across the harness so the injected clock stays in sync with virtual-time advancement.
Constructors
Link copied to clipboard
constructor(hostFactory: RoomFactory, joinerFactory: RoomFactory, faultyLoom: FaultyLoom?, clock: () -> Instant, advanceClock: (Long) -> Unit)