MultiNodeRaftSim
Parameters
The ordered list of voter NodeIds forming the initial cluster config.
The test's TestScope — used for withTimeout bounds in the await helpers.
Scope for node coroutines — pass TestScope.backgroundScope so the infinite heartbeat/election loops are cancelled at test teardown without kotlinx.coroutines.test.UncompletedCoroutinesError.
Timing parameters for every node. RaftConfig.random is overridden per node (Random(baseSeed + nodeIndex)) to ensure distinct election timeouts and guarantee convergence. Must have RaftConfig.expectVirtualTime = true for tests running under a kotlinx.coroutines.test.TestDispatcher. Defaults to MULTI_NODE_SIM_BASE_CONFIG.
Seed from which per-node Randoms are derived. Change to explore different election orderings; the default MULTI_NODE_SIM_SEED is stable across runs.
Optional payload cap forwarded to MultiNodeRaftNetwork — forces InstallSnapshot chunking in tests that exercise the snapshot-transfer path.
Override to wire a custom RaftNode implementation. The default wires CoroutineScope.raftNode with a per-node seeded config. Parameters: (id, transport, storage, childScope).