-
Notifications
You must be signed in to change notification settings - Fork 21
Testing
Run mvn test
to run the unit tests.
Run mvn verify
to run the integration tests.
NOTE: The integration test might complain about some missing SIGAR binaries, this can be safely ignored. If you wish, you can download the missing binaries and set java.library.path
parameter to point to the containing folder (e.g. mvn verify -Djava.library.path=lib
where lib
is the /lib
folder relative to the project root).
The following table outlines the different types of JVM version and Cassandra distributions the cassandra-migration
is being release-tested against:
Casandra Distribution | OpenJDK 1.7 | Oracle JDK 1.8 |
---|---|---|
Embedded Cassandra | YES |
|
Apache Cassandra 3.11 | YES |
|
DataStax Enterprise Community | YES |
Please refer to the .travis.yml file to view the exact Travis CI configuration.
It is possible to run local integration tests against other version or distribution not covered under Travis CI. There are two main steps involved:
- Use VirtualBox and Vagrant to provision the local machine, and
- Pass the cluster options (e.g. host and port) as part of the integration test run.
NOTE: Ensure the prerequisites are installed (VirtualBox v5.1.x
and Vagrant v1.9.x
), before running vagrant up
command.
The following Vagrant options are available, they can be set globally as part of the system's Environment Variables or passed-in as part of vagrant up
command, e.g. CASS_MEM=4096 CASS_CPU=4 vagrant up
.
By default, the guest VM will be setup using Azul Zulu JDK. OpenJDK can be installed by commenting and uncommenting the relevant lines within Vagrantfile.
-
CASS_MEM
: Total memory for each guest VM in MB. (default=2048
) -
CASS_CPU
: Total CPU core for each guest VM. (default=2
) -
CASS_IP
: Guest VM's host IP address. (default=192.168.10.10
) -
CASS_DIST
: Cassandra distribution type. (default=dsc30
) -
CASS_GPG
: Apache Cassandra release manager GPG key, this must be set corresponding to the relevant Apache Cassandra version (can be safely ignored for DataStax Cassandra).
Please refer to the following for Apache Cassandra distribution types: http://dl.bintray.com/apache/cassandra/dists/
Please refer to the following for DataStax Enterprise Community distribution types: http://debian.datastax.com/community/dists/