/ Cassandra

Using Travis CI with Cassandra 3.x

Tavis CI comes with an old version of cassandra by default. If you need to use a newer version of cassandra (3.x) in your project's continuous integration, then you will need to write your .travis.yml file to run cassandra manually before your project test cases begin to run.

To do that, your travis ci configuration should have the oracle-java-8 package and the necessary commands should be added to your before_install section like the following:

      - oracle-java8-installer

  - sudo update-java-alternatives -s java-8-oracle
  - export JAVA_HOME=/usr/lib/jvm/java-8-oracle
  - java -version
  - sudo rm -rf /var/lib/cassandra/*
  - wget http://www.us.apache.org/dist/cassandra/3.3/apache-cassandra-3.3-bin.tar.gz && tar -xvzf apache-cassandra-3.3-bin.tar.gz
  - sudo sh ./apache-cassandra-3.3/bin/cassandra -R
  - sleep 20