Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Cassandra Distributed Tests
Python
Failed to load latest commit information.
cassandra-thrift Restore thrift interface for slice test
conf Add cassandra-2.2 fast select config
cqlsh_tests Tests for CASSANDRA-9399
doxygen Add instructions for installing doxygen
lib Add jolokia license to lib/
thrift_bindings Regen thrift bindings for CASSANDRA-9352
.gitignore Add cassandra-attack.jar from CASSANDRA-6285
CONTRIBUTING.md Explain that not all tags will be used
INSTALL.md Update instructions for 7163
README.md Minor formatting fixes
assertions.py Add tests for normal and compressed commitlogs
auth_roles_test.py Add enable_user_defined_functions:true + fixes for UDF/null
auth_test.py Remove all instances of the ignored arg 'version'
batch_test.py Remove all instances of the ignored arg 'version'
bootstrap_test.py Fix initial_token for simple_bootstrap_test
cfid_test.py uses class decoration where possible for @since
commitlog_test.py Switch references to version 3.0 to 2.2 for CASSANDRA-9352
compaction_test.py fix compaction_tests on 2.0
concurrent_schema_changes_test.py Start rpc wherever we use stress
configuration_test.py Clean up imports
consistency_test.py Correct consistency checks for CL.ONE writes and reads
consistent_bootstrap_test.py Wait for binary proto in consistent_bootstrap_test
counter_tests.py Remove all instances of the ignored arg 'version'
cql_prepared_test.py Remove all instances of the ignored arg 'version'
cql_tests.py Update mixed counter/non-counter error msg for 3.0
datahelp.py datahelp.py allow setting consistency level
delete_insert_test.py Clean up imports
deletion_test.py Adjust JVM options to fix Jolokia agent problems
dtest.py Put user arg back in ecc
global_indexes_test.py simplifies require wrapper
global_row_key_cache_test.py Slow down counter updates to avoid timeouts
incremental_repair_test.py Merge pull request #275 from beobal/9352
index_summary_upgrade_test.py Adjust JVM options to fix Jolokia agent problems
jmxutils.py Adjust JVM options to fix Jolokia agent problems
json_test.py Switch references to version 3.0 to 2.2 for CASSANDRA-9352
json_tools_test.py pyassertions.py, pytools.py --> assertions.py tools.py
license.txt permissions
metadata_tests.py Ignore Unknown ks/cf errors when resetting local schema
mixed_version_test.py Use cassandra-2.2 instead of trunk for upgrade
multidc_putget_test.py pyassertions.py, pytools.py --> assertions.py tools.py
paging_test.py Update test for 9299
paxos_tests.py Remove all instances of the ignored arg 'version'
prepared_statements_test.py 7875 test to 2.1+ only
pushed_notifications_test.py Fixed bug that caused unnecessary wait till timeout
putget_test.py Set start_rpc to True on all thrift tests
range_ghost_test.py Remove old Tester class, replace with PyTester
repair_test.py Switch references to version 3.0 to 2.2 for CASSANDRA-9352
replace_address_test.py Merge pull request #275 from beobal/9352
replication_test.py moves no_vnodes to classes where possible
schema_test.py Remove all instances of the ignored arg 'version'
scrub_test.py Merge pull request #275 from beobal/9352
secondary_indexes_test.py Use 2.1.x for max_version instead of 2.1.99
snapshot_test.py Add wait_for_binary_proto=True to node/cluster starts
sstable_generation_loading_test.py Start rpc wherever we use stress
sstablelist_test.py Start rpc wherever we use stress
sstablesplit_test.py Slightly more lenient sstablesplit test
super_column_cache_test.py Fix thrift_bindings imports
super_counter_test.py Set start_rpc to True on all thrift tests
thrift_hsha_test.py For CASSANDRA-9369, thrift_hsha test is not waiting for the cluster t…
thrift_tests.py Fix thrift_bindings imports
token_generator.py Remove @require('9300') - fix committed.
tools.py fixes kwarg passed to unittest.skip()
topology_test.py add test for CASSANDRA-8801
ttl_test.py Actually fix ttl_is_respected_on_delayed_replication_test
udtencoding_test.py uses class decoration where possible for @since
upgrade_supercolumns_test.py Use 2.1.x for max_version instead of 2.1.99
upgrade_through_versions_test.py Remove all instances of the ignored arg 'version'
user_functions_test.py Add tests to ensure keyspace isolation for UDA, UDF and UDT
user_types_test.py Add tests to ensure keyspace isolation for UDA, UDF and UDT
validation.py Switch references to version 3.0 to 2.2 for CASSANDRA-9352
wide_rows_test.py Make ccmlib api changes for setting install_dir and version

README.md

Cassandra Distributed Tests

Tests for Apache Cassandra clusters.

Prerequisites

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.

Usage

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 archives.apache.org:

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:

[main]
default_dir=~/path/to/cassandra

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).

Detailed Instructions

See more detailed instructions in the included INSTALL file.

Something went wrong with that request. Please try again.