Skip to content

Add Jepsen tests for openraft #1597

@drmingdrmer

Description

@drmingdrmer

Parent issue: #475

Overview

Add Jepsen black-box testing to validate openraft's correctness under real-world fault conditions.

Goals

  • Validate linearizability of operations
  • Test behavior under network partitions
  • Test leader/follower crash and recovery
  • Test membership changes during operations

Implementation Steps

Phase 1: Infrastructure

  • Create jepsen/ directory with Clojure/Leiningen project
  • Define cluster provisioning (Docker-based recommended)
  • Implement DB interface for openraft KV example

Phase 2: Test Target

  • Choose target app (raft-kv-memstore or raft-kv-rocksdb)
  • Ensure HTTP endpoints return proper error codes for jepsen client
  • Add health check endpoint for cluster coordination

Phase 3: Workloads & Nemesis

  • Implement basic workload (append/read operations)
  • Add nemesis for network partition
  • Add nemesis for process kill/restart
  • Add checker using Elle for linearizability

Phase 4: CI Integration

  • Document how to run jepsen tests locally
  • (Optional) Add to CI pipeline

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-testCategory: test infrastructure or coverage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions