MeshConformanceSuite

abstract class MeshConformanceSuite

Reusable contract test suite for N-peer mesh Seam implementations.

Subclass and implement newMeshOfSize to bind any N-peer mesh under test. Every Test encodes a required invariant of the mesh contract.

Lives in commonMain of :kuilt-conformance so every mesh implementation can subclass it from its own test source set.

newMeshOfSize returns a list of n fully-connected Seams — one per peer. The harness must not return until all inter-peer connections are established (i.e. every returned seam has already completed its handshakes with every other peer).

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun broadcastReachesAllPeers(): TestResult
Link copied to clipboard
fun eachPeerSeesMeshSize(): TestResult
Link copied to clipboard
abstract suspend fun newMeshOfSize(n: Int): List<Seam>

Build a fully-connected N-peer mesh and return one Seam per peer. The returned list must have exactly n elements. All inter-peer connections must be established before this returns.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard