atomix-jepsen is a suite of Jepsen based tests for Atomix including:
- Linearizable CAS
The tests are run against various nemeses including:
- Partition with random halves
- Partition a random isolated node
- Partition in half with a bridge node
- Crash a random set of nodes
- Randomize the clock on all nodes
To run atomix-jepsen you'll need to setup a Jepsen test environment. If you don't already have one, you can create one using Docker. First, clone atomix-jepsen:
git clone https://github.com/atomix/atomix-jepsen.git
Then create a jepsen Docker container, sharing your atomix-jepsen
directory into the container:
cd atomix-jepsen
docker run --privileged --name jepsen -it -v $(pwd):/atomix-jepsen jhalterman/jepsen
This jepsen container will include 5 docker-in-docker sub-containers in which Atomix will be deployed.
To run the atomix-jepsen tests, from your atomix-jepsen
directory, run:
lein test
To run a single test (ex):
lein test :only atomix-jepsen.dvalue-test/bridge
To cut down on test setup time and disk usage, you can share your local ~/.m2
directory with your Jepsen environment by including the following in your docker run
command:
-v $HOME/.m2:/root/.m2
To run your local atomix-jepsen source on your Jepsen nodes instead of pulling and building it from Github, build and install the atomix-jepsen replica to your local .m2
repo:
lein uberjar
lein localrepo install target/atomix-replica.jar io.atomix.atomix-jepsen/replica 0.1.0
Then declare DEV=true
when running atomix-jepsen tests:
DEV=true lein test
If you break out of a running test, the java processes that maintain SSH sessions to your jepsen nodes may be left running, as well as the atomix server processes on those nodes. To kill these, run pkill java
from your jepsen container.
Copyright © 2015-2016 Jonathan Halterman and contributors
Distributed under the Eclipse Public License version 1.0