Support for multiple Cassandra versions 14/head
authorJon Haddad <jon@jonhaddad.com>
Wed, 29 Apr 2020 23:48:12 +0000 (16:48 -0700)
committerJon Haddad <jon@jonhaddad.com>
Tue, 28 Jul 2020 19:36:47 +0000 (12:36 -0700)
commita4805a910904019698ae373ac33f88855cf67f3d
tree59ca38f00d0c3633e9c77fd8a757e83792a452c8
parentc9da4b213946fc6dbe8cdcbbc2445348f14a89af
Support for multiple Cassandra versions

This patch lays the groundwork to support multiple Cassandra versions.
New submodules were created for common libraries as well as specific
Cassandra versions.  Several dependencies are moved to the common
submodule due to their universal nature.

Most importantly, this patch introduces Junit Test Template for testing multiple
Cassandra versions.  Test should be annotated with a
@CassandraIntegrationTest.  These tests require Docker and Kubernetes be available.
A single version is currently supported, 4.0.  A dockerfile sets up the image
from the beta tarball and initializes the session.

Cassandra driver was upgraded to version 3.9, previous versions errored
with Java 11.

CircleCI tests are run using microk8s.

Patch by Jon Haddad; Reviewed by Dinesh Joshi for CASSANDRASC-23
51 files changed:
.circleci/config.yml
.circleci/setup-microk8.sh [new file with mode: 0755]
CHANGES.txt
README.md
build.gradle
cassandra-integration-tests/build.gradle [new file with mode: 0644]
cassandra-integration-tests/src/test/java/org/apache/cassandra/sidecar/common/StatusTest.java [new file with mode: 0644]
cassandra-integration-tests/src/test/java/org/apache/cassandra/sidecar/common/testing/CassandraIntegrationTest.java [new file with mode: 0644]
cassandra-integration-tests/src/test/java/org/apache/cassandra/sidecar/common/testing/CassandraPod.java [new file with mode: 0644]
cassandra-integration-tests/src/test/java/org/apache/cassandra/sidecar/common/testing/CassandraPodException.java [new file with mode: 0644]
cassandra-integration-tests/src/test/java/org/apache/cassandra/sidecar/common/testing/CassandraTestContext.java [new file with mode: 0644]
cassandra-integration-tests/src/test/java/org/apache/cassandra/sidecar/common/testing/CassandraTestTemplate.java [new file with mode: 0644]
cassandra-integration-tests/src/test/java/org/apache/cassandra/sidecar/common/testing/DelegateTest.java [new file with mode: 0644]
cassandra-integration-tests/src/test/java/org/apache/cassandra/sidecar/common/testing/TestVersion.java [new file with mode: 0644]
cassandra-integration-tests/src/test/java/org/apache/cassandra/sidecar/common/testing/TestVersionSupplier.java [new file with mode: 0644]
cassandra40/build.gradle [new file with mode: 0644]
cassandra40/src/main/java/org/apache/cassandra/sidecar/cassandra40/Cassandra40Factory.java [new file with mode: 0644]
common/build.gradle [new file with mode: 0644]
common/src/main/java/org/apache/cassandra/sidecar/common/CQLSession.java [moved from src/main/java/org/apache/cassandra/sidecar/CQLSession.java with 73% similarity]
common/src/main/java/org/apache/cassandra/sidecar/common/CassandraAdapterDelegate.java [new file with mode: 0644]
common/src/main/java/org/apache/cassandra/sidecar/common/CassandraVersionProvider.java [new file with mode: 0644]
common/src/main/java/org/apache/cassandra/sidecar/common/ICassandraAdapter.java [new file with mode: 0644]
common/src/main/java/org/apache/cassandra/sidecar/common/ICassandraFactory.java [new file with mode: 0644]
common/src/main/java/org/apache/cassandra/sidecar/common/MinimumVersion.java [new file with mode: 0644]
common/src/main/java/org/apache/cassandra/sidecar/common/MockCassandraFactory.java [new file with mode: 0644]
common/src/main/java/org/apache/cassandra/sidecar/common/NodeStatus.java [new file with mode: 0644]
common/src/main/java/org/apache/cassandra/sidecar/common/SimpleCassandraVersion.java [new file with mode: 0644]
common/src/main/java/org/apache/cassandra/sidecar/mocks/V30.java [moved from src/test/java/org/apache/cassandra/sidecar/mocks/MockHealthCheck.java with 67% similarity]
common/src/main/java/org/apache/cassandra/sidecar/mocks/V40.java [new file with mode: 0644]
common/src/main/java/org/apache/cassandra/sidecar/mocks/V41.java [new file with mode: 0644]
common/src/test/java/org/apache/cassandra/sidecar/common/SimpleCassandraVersionProviderTest.java [new file with mode: 0644]
common/src/test/java/org/apache/cassandra/sidecar/common/SimpleCassandraVersionTest.java [new file with mode: 0644]
containers/build.gradle [new file with mode: 0644]
containers/src/Cassandra40/Dockerfile [new file with mode: 0644]
containers/src/docker-entrypoint.sh [new file with mode: 0644]
containers/src/optimize-memory.sh [new file with mode: 0644]
docs/src/development.adoc
gradle.properties
gradle/wrapper/gradle-wrapper.properties
scripts/cleanup-pods.sh [new file with mode: 0755]
scripts/setup-minikube.sh [new file with mode: 0755]
settings.gradle
spotbugs-exclude.xml [moved from src/main/resources/spotbugs-exclude.xml with 100% similarity]
src/integration/java/org/apache/cassandra/sidecar/HealthServiceIntegrationTest.java [deleted file]
src/main/java/org/apache/cassandra/sidecar/CassandraSidecarDaemon.java
src/main/java/org/apache/cassandra/sidecar/MainModule.java
src/main/java/org/apache/cassandra/sidecar/routes/HealthCheck.java [deleted file]
src/main/java/org/apache/cassandra/sidecar/routes/HealthService.java
src/test/java/org/apache/cassandra/sidecar/AbstractHealthServiceTest.java
src/test/java/org/apache/cassandra/sidecar/TestModule.java
src/test/java/org/apache/cassandra/sidecar/TestSslModule.java