Skip to content
Browse files
Add instructions on running the fdb bindingtester
  • Loading branch information
davisp committed Oct 29, 2019
1 parent 7718a3d commit f310eaa229a680627f5192651d82ceb3d9dcd80e
Showing 3 changed files with 89 additions and 2 deletions.
@@ -0,0 +1,81 @@
Running the bindingstester

This assumes that all FoundationDB dependencies are installed properly. See
the FoundationDB documentation for information on the dependencies.

1. Download and build FoundationDB

$ git clone
$ cd foundationdb
$ # Optionally checkout a specific release branch
$ # git checkout -b release-6.1 origin/release-6.1
$ mkdir _build
$ cd _build
$ cmake ..
$ make -j4

2. Tweak `bindingtester` to be able to run our Erlang client

$ cd ../bindings/bindingtester
$ vi # Comment out the sys.path injection on line 25
$ vi # Add the following line to the `testers` hash

'erlang': Tester('erlang', '/Users/davisp/github/labs-cloudant/couchdb-erlfdb/test/', 2040, MAX_API_VERSION, MAX_API_VERSION, types=ALL_TYPES),

3. Start a temporary fdbserver instance

*This should be done in a second shell*

$ mkdir ~/tmp/fdbtest
$ cd ~/tmp/fdbtest
$ echo "foo:bar@" > fdb.cluster
$ /Users/davisp/github/davisp/foundationdb/_build/bin/fdbserver \
-p \
-C fdb.cluster \
-d . \
-L .

4. Configure the temporary fdbserver instance

*This only needs to be done once after step 3*

$ cd ~/tmp/fdbtest
$ /Users/davisp/github/davisp/foundationdb/_build/bin/fdbcli
Database created

5. Start the binding test

*Notice that the ERL_LIBS=... command is one long single line.*

$ cd /Users/davisp/github/davisp/foundationdb/bindings/bindingtester
$ ERL_LIBS=/Users/davisp/github/labs-cloudant/couchdb-erlfdb/ PYTHONPATH=/Users/davisp/github/davisp/foundationdb/_build/bindings/python/ ./ --cluster-file /Users/davisp/tmp/fdbtest/fdb.cluster erlang

By default, `` runs the `` test which is a deterministic set of tests. To really try and soak test the bindings you should add the following command line parameters:

`--test-name api --num-ops 10000`

The `api` test is a large randomly generated set of test instructions and should exercise a number of combinations of parameters exercising large portions of the bindings.

If you do encounter an error in tests you can add these options to try and debug the issue:

`--seed $SEED --bisect`

Where `$SEED` is printed in the output of the failed test run.
@@ -46,4 +46,11 @@ ok
4> erlfdb:get(Db, <<"bar">>).

Binding Tester

FoundationDB has a custom binding tester that can be used to test whether
changes have broken compatibility. See the [BINDING_TESTER](
documentation for instructions on building and running that system.
@@ -1,5 +1,4 @@
#!/usr/bin/env escript
%%! -pa /Users/davisp/github/labs-cloudant/couchdb-erlfdb/ebin


0 comments on commit f310eaa

Please sign in to comment.