Using Travis CI with Cassandra 3.x

TurnKey Internet - Dedicated Server - Dual Hexa-Core - Best Value Deal

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:

addons:  
  apt:
    packages:
      - oracle-java8-installer

before_install:  
  - 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
TurnKey Internet - Cloud Servers - Best Value Deal