forked from thepaul/cassandra-dtest
-
Notifications
You must be signed in to change notification settings - Fork 2
/
README
45 lines (33 loc) · 1.58 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Cassandra Distributed Tests
===========================
Prerequisite
------------
An up to date of ccm (https://github.com/pcmanus/ccm) should be installed.
The tests are run using nosetests (http://readthedocs.org/docs/nose/en/latest/)
which thus needs to be installed too. The python CQL driver also needs to be
available (http://code.google.com/a/apache-extras.org/p/cassandra-dbapi2/).
Usage
-----
Tests are ran by nostests, the only thing the framework needs to know is where
is the (compliled) sources for Cassandra to use. There is 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 have precedence if given though).
Existing tests are probably the best place to start to look at how write
tests.
Each test spawns a new fresh cluster and tears it down after the test. If a
test fails, the logs for the node are saved in a logs/<timestamp> directory
for analysis (it's not perfect but have been good enough so far, I'm open to
better suggestsions).
Detailed Instructions
---------------------
See more detailed instructions in the included INSTALL file
(https://github.com/riptano/cassandra-dtest/blob/master/INSTALL.md)