Skip to main content

Module testing

Module testing 

Source
Expand description

In-process harness for cluster integration tests. Gated because it pulls in chitchat on loopback UDP. MiniCluster — in-process harness for cluster-control integration tests.

Spawns N chitchat instances on loopback UDP, each wrapped in a GossipDiscovery + ClusterController pair. Shared by the integration test matrix in tests/cluster_integration.rs; designed to be reusable from downstream crates (laminar-db, laminar-server) as dev-dependency.

§Scope

  • Real chitchat gossip; gossip_interval tuned down to 50 ms to keep convergence under a second.
  • Loopback UDP only; each node binds to 127.0.0.1:0 (ephemeral) and records the assigned port before handing off to chitchat.
  • No LaminarDB engine — just the cluster primitives. Full engine harness is a follow-up when the checkpoint flow consumes the controller.

§Not production API

Gated on cluster-unstable. The APIs here are test helpers; expect churn.

Structs§

FaultyObjectStore
Object store middleware with runtime-flippable fault injection.
MiniCluster
Builder + wrapper for a set of in-process cluster nodes.
NetworkRules
Shared per-cluster partition rules. Each (src, dst) pair in the set causes sends from src to dst to be silently dropped. The rules are bidirectional when set via Self::partition; one-way partitions can be constructed by adding a single pair via Self::drop_pair.
NodeHandle
One instance of the mini-cluster: a gossip discovery + controller.
PartitionableTransport
Chitchat transport that delegates to a real [UdpTransport] but consults a shared NetworkRules before each send. Packets destined for a partitioned peer are silently dropped.

Enums§

ObjectStoreFault
Fault mode for FaultyObjectStore, flippable at runtime.