Skip to content
Cassandra Distributed Tests
Failed to load latest commit information.
bin add failure_notes to collect_known_failures output
cassandra-thrift Restore thrift interface for slice test
conf Exclude single_partition_consistent_reads_after_write_test during cov…
cqlsh_tests Add annotation for CASSANDRA-11121
doxygen Make doxygen html look nicer
lib Add jolokia license to lib/
thrift_bindings Regen thrift bindings for CASSANDRA-9352
upgrade_tests re-introduce Windows logic
.gitignore Add cassandra-attack.jar from CASSANDRA-6285
.travis.yml .travis.yml: Be a little more strict with the lint checker add some basic stuff to the checklist add more information about driver installation
LICENSE Add Apache 2.0 License file Add jdk switching Don't require an error_message kwarg for assert_almost_equal Merge into remove unnecessary redefinition of debug Change 10912 failure source even more multi datadir fixes Define node path in commit log tests. Accidentally removed in 112b851 Merge pull request #760 from krummas/marcuse/datadirs even more multi datadir fixes PEP8 Fixes Add test for 10902 Ensure node is totally up before continuing with test Mark consistent_reads test as known_failure Fixes after driver upgrade, batch 4 Use autopep8 to cleanup dtest Update link for large_collection test failure Change all instances of cursor to session Use autopep8 to cleanup dtest Remove all pre 2.1 logic Use autopep8 to cleanup dtest Extending fix from 18f2f68 to another test Block on traces in tag failing global row key cache test Make some pep8 fixes Revert "unskip multiple_subsequent_repair_test after #9752" Add known failure annotation for 11127 Add test for internode_compression: 'none' Remove annotation for 10913. It is resolved. PEP8 Fixes Revert "Totally undo changes for 10494. Revert once that is committed." Fixes to support microseconds in the default timestamp format, CASSAN… Remove all pre 2.1 logic Make test of number work with negative numbers
license.txt permissions .travis.yml: Be a little more strict with the lint checker Bump materialized view migration timeout up (again) to 5s don't @require hanging metadata test Use autopep8 to cleanup dtest Fix PEP-8 violations remove @since(3.0) as C* patch is now against 2.1 Add missing @since to new nodetool test comment on selection of amount of data to write Restrict test for 10010 to 2.2.6+ Use autopep8 to cleanup dtest Add test for CASSANDRA-10887 Remove all pre 2.1 logic Remove annotation for 10870 Use autopep8 to cleanup dtest Fixes after driver upgrade, batch 7 make flake8 happy Fix 'boostrap' typo across all tests 10860 is resolved. Removing known_failure Remove all pre 2.1 logic Block on traces in
requirements.txt Add psutil to req.txt rename function to better suit purpose fixed up schema alteration test clean up the way we iterate over data directories Remove 10905 annotation. Count data dirs, to solve 'x not defined' error Restrict appropriately for 9748 clean up the way we iterate over data directories Remove all pre 2.1 logic Remove 10919 annotation Use autopep8 to cleanup dtest Fix thrift_bindings imports Remove annotation for 10893. Resolved. Use jmx instead of lsof Remove now unneeded import Use autopep8 to cleanup dtest docstring style fixes in Add more debug output to topo.decomission test Change all instances of cursor to session Remove all pre 2.1 logic added tests for verifying if crc_check_chance option is correctly mig… Remove unused import tag known_failures for upgrade supercolumns remove bad version check logic fix dtest Use stricter CL on test_type_secondary_indexing Fixes after driver upgrade, batch 4 limit write_failures_test.test_mutation_v2 to C* 2.2

Cassandra Distributed Tests

Tests for Apache Cassandra clusters.


An up to date copy of ccm should be installed for starting and stopping Cassandra. The tests are run using nosetests. These tests require the datastax python driver. A few tests still require the deprecated python CQL over thrift driver.


The tests are run by nosetests. The only thing the framework needs to know is the location of the (compiled) sources for Cassandra. There are two options:

Use existing sources:

CASSANDRA_DIR=~/path/to/cassandra nosetests

Use ccm ability to download/compile released sources from

CASSANDRA_VERSION=1.0.0 nosetests

A convenient option if tests are regularly run against the same existing directory is to set a default_dir in ~/.cassandra-dtest. Create the file and set it to something like:


The tests will use this directory by default, avoiding the need for any environment variable (that still will have precedence if given though).

Existing tests are probably the best place to start to look at how to write tests.

Each test spawns a new fresh cluster and tears it down after the test, unless REUSE_CLUSTER is set to true. Then some tests will share cassandra instances. If a test fails, the logs for the node are saved in a logs/<timestamp> directory for analysis (it's not perfect but has been good enough so far, I'm open to better suggestions).

To run the upgrade tests, you have must both JDK7 and JDK8 installed. Paths to these installations should be defined in the environment variables JAVA7_HOME and JAVA8_HOME, respectively.

Installation Instructions

See more detailed instructions in the included INSTALL file.

Writing Tests

  • Most of the time when you start a cluster with cluster.start(), you'll want to pass in wait_for_binary_proto=True so the call blocks until the cluster is ready to accept CQL connections. We tried setting this to True by default once, but the problems caused there (e.g. when it waited the full timeout time on a node that was deliberately down) were more unpleasant and more difficult to debug than the problems caused by having it False by default.
  • If you're using JMX via the jmxutils module, make sure to call remove_perf_disable_shared_mem on the node or nodes you want to query with JMX before starting the nodes. remove_perf_disable_shared_mem disables a JVM option that's incompatible with JMX (see this JMX ticket). It works by performing a string replacement in the node's Cassandra startup script, so changes will only propagate to the node at startup time.

If you'd like to know what to expect during a code review, please see the included CONTRIBUTING file.

Something went wrong with that request. Please try again.