First, clone the Jepsen test repo. We have our fork to have a well-known working commit:
git clone https://github.com/dgraph-io/jepsen/
Remember the path of your repo (e.g.,
/repo/jepsen). You’ll need it to specify jepsen root directory later.
Build and install the specific version of Dgraph you want to test. e.g., to test the master branch, check it out, and install Dgraph from there.
cd $GOPATH/src/github.com/dgraph-io/dgraph git checkout master git pull --ff-only make install
dgraph binary is installed in
To run the Jepsen tests, run the
jepsen tool in the Dgraph contrib folder, e.g.,
cd $GOPATH/src/github.com/dgraph-io/dgraph cd contrib/jepsen go build
If you run
./jepsen -h you’ll see a bunch of options.
By default, the tests run for 600 seconds (10 minutes). You can change that by setting the
The tests will open up the test results page and Jaeger pages by default. To skip opening the pages automatically, set
./jepsen --jepsen-root /repo/jepsen -w bank -n "none"
./jepsen --jepsen-root /repo/jepsen -w bank -n "partition-ring"
./jepsen --jepsen-root /repo/jepsen -w bank -n "kill-alpha,kill-zero"
The end of each passing test will say
Everything looks good! ヽ(‘ー`)ノ.
The test results page will show if the test passed if the row is blue under the Valid? column.