diff --git a/.travis.yml b/.travis.yml index a543d4f..2f0c1b3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,13 +6,39 @@ jdk: - oraclejdk7 - oraclejdk8 +env: + - CASSANDRA_VERSION=2.1 + - CASSANDRA_VERSION=2.2 + - CASSANDRA_VERSION=3.0 + - CASSANDRA_VERSION=3.1 + - CASSANDRA_VERSION=3.2 + - CASSANDRA_VERSION=3.3 + - CASSANDRA_VERSION=3.4 + - CASSANDRA_VERSION=3.7 + - CASSANDRA_VERSION=3.9 + - CASSANDRA_VERSION=3.10 + cache: directories: - - $HOME/.m2 + - $HOME/.m2 services: - docker +before_install: + - docker info + - docker pull cassandra:$CASSANDRA_VERSION + - docker run -d --name cassi -v $HOME/wait_cassandra.sh:/wait_cassandra.sh -p 9042:9042 cassandra:$CASSANDRA_VERSION + - docker ps -a + +script: + - docker exec -it cassi sh /wait_cassandra.sh + - mvn -Dgroups=base,server test + +after_script: + - docker stop cassi || true + - docker rm cassi || true + notifications: email: - zhicwu@gmail.com \ No newline at end of file diff --git a/NOTICE b/NOTICE index 7b2d139..5b42429 100644 --- a/NOTICE +++ b/NOTICE @@ -1,5 +1,5 @@ cassandra-jdbc-driver -Copyright 2015-2016, Zhichun Wu. +Copyright 2015-2017, Zhichun Wu. This project includes software developed by Zhichun Wu. https://github.com/zhicwu diff --git a/misc/NOTICE.template b/misc/NOTICE.template index 371ef42..056a8b3 100644 --- a/misc/NOTICE.template +++ b/misc/NOTICE.template @@ -1,5 +1,5 @@ cassandra-jdbc-driver -Copyright 2015-2016, Zhichun Wu. +Copyright 2015-2017, Zhichun Wu. This project includes software developed by Zhichun Wu. https://github.com/zhicwu diff --git a/src/main/java/com/github/cassandra/jdbc/provider/datastax/CassandraConnection.java b/src/main/java/com/github/cassandra/jdbc/provider/datastax/CassandraConnection.java index 7f2293e..2646b00 100644 --- a/src/main/java/com/github/cassandra/jdbc/provider/datastax/CassandraConnection.java +++ b/src/main/java/com/github/cassandra/jdbc/provider/datastax/CassandraConnection.java @@ -27,6 +27,7 @@ import java.sql.ResultSet; import java.sql.SQLException; +import java.sql.Types; import java.util.ArrayList; import java.util.List; import java.util.Properties; @@ -109,7 +110,7 @@ private Object[] populateColumnMetaData(KeyspaceMetadata ks, null, // SCOPE_CATALOG null, // SCOPE_SCHEMA null, // SCOPE_TABLE - null, // SOURCE_DATA_TYPE + Types.NULL, // SOURCE_DATA_TYPE "NO", // IS_AUTOINCREMENT "NO" // IS_GENERATEDCOLUMN }; diff --git a/src/test/resources/config.yaml b/src/test/resources/config.yaml index fbe5a01..f40194c 100644 --- a/src/test/resources/config.yaml +++ b/src/test/resources/config.yaml @@ -65,6 +65,6 @@ driver : # logging configuration for tinylog(http://www.tinylog.org/configuration) logger : - level : DEBUG + level : INFO stacktrace : -1 format : "{date:yyyy-MM-dd HH:mm:ss} [{thread}] {class_name}.{method}({line}) {level}: {message}" diff --git a/wait_cassandra.sh b/wait_cassandra.sh new file mode 100644 index 0000000..b1502c3 --- /dev/null +++ b/wait_cassandra.sh @@ -0,0 +1,15 @@ +#!/bin/sh +USERNAME=cassandra +PASSWORD=cassandra +KEYSPACE=system_traces +TESTCQL="desc keyspaces" + +echo "Wait until Cassandra is up and ready to use..." + +while ! cqlsh -u "$USERNAME" -p "$PASSWORD" -k "$KEYSPACE" -e "$TESTCQL" > /dev/null; do + sleep 3 + + echo " - Checking status..." +done + +echo "Great! It's ready now!" \ No newline at end of file