Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Cassandra Distributed Tests
Python

Use grep_logs_for_errors instead of grep_logs('ERROR')

This will include the full stacktrace in the returned errors, which
should make it easier to see why a test failed in Jenkins.
latest commit a486c31779
@thobbs thobbs authored
Failed to load latest commit information.
cassandra-thrift Restore thrift interface for slice test
conf Excluding manual_bootstrap_test in trunk, too..
lib Add utility class for interacting with JMX
thrift_bindings Use thrift bindings from C* trunk. Merge in fixes to test_thrfit_serv…
.gitignore Tests for CASSANDRA-7395
INSTALL.md Update instructions for 7163
README.md Minor formatting fixes
assertions.py Add tests for normal and compressed commitlogs
auth_roles_test.py Additional tests from review comments on CASSANDRA-7557
auth_test.py Add UDF permission tests for CASSANDRA-7557
batch_test.py pyassertions.py, pytools.py --> assertions.py tools.py
bootstrap_test.py Match distribution range to operation count
cfid_test.py uses class decoration where possible for @since
commitlog_test.py Fix failing compressed commitlog size test
compaction_test.py use ttl for dtcs_deletion_test
concurrent_schema_changes_test.py Update stress keyspace names in 2.1 for f0767fdf
configuration_test.py Clean up imports
consistency_test.py Correct consistency checks for CL.ONE writes and reads
consistent_bootstrap_test.py uses class decoration where possible for @since
counter_tests.py pyassertions.py, pytools.py --> assertions.py tools.py
cql_prepared_test.py uses class decoration where possible for @since
cql_tests.py Update cql_tests.create_alter_options_test for new system_distributed ks
cqlsh_tests.py Enable cqlsh COPY TO test
datahelp.py datahelp.py allow setting consistency level
delete_insert_test.py Clean up imports
deletion_test.py test that memtable size calc. includes tombstones
dtest.py Use grep_logs_for_errors instead of grep_logs('ERROR')
global_indexes_test.py simplifies require wrapper
global_row_key_cache_test.py Slow down counter updates to avoid timeouts
incremental_repair_test.py Remove noop cleanups and unlimit compaction throughput in subsequent …
index_summary_upgrade_test.py Remove require() decorator
jmxutils.py extends jmxutils.make_mbean interface
json_tools_test.py pyassertions.py, pytools.py --> assertions.py tools.py
license.txt permissions
multidc_putget_test.py pyassertions.py, pytools.py --> assertions.py tools.py
paging_test.py uses class decoration where possible for @since
paxos_tests.py uses class decoration where possible for @since
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 pyassertions.py, pytools.py --> assertions.py tools.py
range_ghost_test.py Remove old Tester class, replace with PyTester
repair_test.py repair_test should test both sequential and parallel repair
replace_address_test.py Remove unneeded stress runs
replication_test.py moves no_vnodes to classes where possible
schema_test.py uses class decoration where possible for @since
scrub_test.py Actually fix the sstable generation increment
secondary_indexes_test.py Test pre-2.1 index sstables are read after upgrade CASSANDRA-9116
snapshot_test.py Check sstableloader exit status, error if non-zero
sstable_generation_loading_test.py removes log-watching for binary proto
sstablesplit_test.py stop the node before using sstablesplit
super_column_cache_test.py Port super column cache test from CLI to Thrift API
super_counter_test.py Fix super_counter_test.py on trunk
thrift_hsha_test.py Set rpc_max_threads=20 for thrift_hsha_test test_6285
thrift_tests.py Update thrift_tests.test_describe_keyspace for new system KS
tools.py convert @require's argument to a string
topology_test.py moves no_vnodes to classes where possible
ttl_test.py Merge pull request #232 from mambocab/wait-for-binary-proto
udtencoding_test.py uses class decoration where possible for @since
upgrade_supercolumns_test.py Properly wait for RPC server to start, schema agreement
upgrade_through_versions_test.py upgrade test for murmur, remove 1.2+ check no longer needed
user_functions_test.py uses class decoration where possible for @since
user_types_test.py uses class decoration where possible for @since
validation.py Shorten class names
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.