How to Run Jepsen Tests

Download Jepsen repo

First, clone the Jepsen test repo. We have our fork to have a well-known working commit:

git clone

Remember the path of your repo (e.g., /repo/jepsen). You’ll need it to specify jepsen root directory later.

Install Dgraph

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/
git checkout master
git pull --ff-only
make install

The dgraph binary is installed in $GOPATH/bin.

Build the jepsen Tool

To run the Jepsen tests, run the jepsen tool in the Dgraph contrib folder, e.g.,

cd $GOPATH/src/
cd contrib/jepsen
go build

If you run ./jepsen -h you’ll see a bunch of options.

Run the Jepsen Tests

By default, the tests run for 600 seconds (10 minutes). You can change that by setting the --time-limit option.

The tests will open up the test results page and Jaeger pages by default. To skip opening the pages automatically, set --web=false.

Example: Bank test with no nemeses
./jepsen --jepsen-root /repo/jepsen -w bank -n "none"
Example: Bank test with partition-ring nemesis
./jepsen --jepsen-root /repo/jepsen -w bank -n "partition-ring"
Example: Bank test with kill-alpha,kill-zero nemesis
./jepsen --jepsen-root /repo/jepsen -w bank -n "kill-alpha,kill-zero"

Test Status

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.

I was wondering how I could run the Jepsen tests myself :grin: Thanks @dmai

@dmai are there any Jepsen tests that focus on Dgraph Encryption? I currently have encryption enabled for my Dgraph instance… and just curious if there are any that focus on crash resilience, etc.


I don’t believe so. Currently, Jepsen only have these workloads and nemeses

Workloads:[bank delete long-fork linearizable-register uid-linearizable-register upsert set uid-set sequential]

Nemeses:[none kill-alpha,kill-zero partition-ring move-tablet]

1 Like