Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Testing

cargo test                # Run all tests
cargo test --lib          # Unit tests only
cargo test --test <name>  # Specific test suite

Test Suites

SuiteDescription
lib (unit)Config, Raft state machine, RPC serialization
scheduler_testsJob queue, worker assignment, heartbeats
raft_rpc_testsAppendEntries, RequestVote, InstallSnapshot, term handling, compaction boundary cases, re-election vote reset
integration_testsMulti-node election, replication, consistency
failover_testsLeader crash, re-election, quorum loss
partition_testsNetwork partitions, split-brain prevention, healing
chaos_testsRapid leader churn, network flapping, cascading failures, full isolation recovery
tls_testsmTLS certificate loading, encrypted cluster communication
executor_testsDocker sandbox command execution
internal_service_testsInternal node-to-node API, job output fetching, ForwardJobStatus to leader
distribution_testsJobs spread across nodes (not just leader), WorkerHeartbeat RPC, dead-worker exclusion
dashboard_testsREST API endpoints
leadership_transfer_testsVoluntary leadership transfer, auto-select, non-leader rejection
drain_testsNode draining, job rejection during drain, leadership handoff
compaction_testsLog compaction trigger, snapshot transfer to slow followers, multiple compaction rounds, AppendEntries fallback when below compaction threshold, state consistency
backpressure_testsFull proposal channel returns RESOURCE_EXHAUSTED immediately; stalled Raft loop returns DEADLINE_EXCEEDED after 5 s
persistence_testsRocksDB storage: fresh DB returns None, hard state/log reload, log truncation, snapshot compaction deletes old entries, post-compaction state reconstruction on restart, node term survives restart