Elffuss BraidHub

kikocis/java-driver public

0fc2037f3536 · 2.6 KiBSourceRawPermalink

Contributing guidelines

Working on an issue

Before starting to work on something, please comment in JIRA or ask on the mailing list to make sure nobody else is working on it.

If your fix applies to multiple branches, base your work on the lowest active branch (currently 3.0.x for bug fixes and 3.0 for new features, but ask for confirmation). We regularly merge changes to higher branches.

Before you send your pull request, make sure that:

As long as your pull request is not merged, it's OK to rebase your branch and push with --force.

If you want to contribute but don't have a specific issue in mind, the lhf label in JIRA is a good place to start: it marks "low hanging fruits" that don't require in-depth knowledge of the codebase.

Editor configuration

We use IntelliJ IDEA with the default formatting options, with one exception: check "Enable formatter markers in comments" in Preferences > Editor > Code Style.

Please format your code and organize imports before submitting your changes.

Running the tests

We use TestNG. There are 3 test categories:

The Maven build uses profiles named after the categories to choose which tests to run:

mvn test -Pshort

The default is "unit". Each profile runs the ones before it ("short" runs unit, etc.)

Integration tests use CCM to bootstrap Cassandra instances. Two Maven properties control its execution:

CCM launches multiple Cassandra instances on localhost by binding to different addresses. The driver uses up to 10 different instances (127.0.1.1 to 127.0.1.10 with the default prefix). You'll need to define loopback aliases for this to work, on Mac OS X your can do it with:

sudo ifconfig lo0 alias 127.0.1.1 up
sudo ifconfig lo0 alias 127.0.1.2 up
...