commit | f8605b3c3dfdfdc5ef1b8327f4fd657efca8f9b7 | [log] [tgz] |
---|---|---|
author | Francisco Guerrero <frankgh@apache.org> | Sat Sep 02 12:35:54 2023 -0700 |
committer | Yifan Cai <ycai@apache.org> | Thu Sep 07 12:06:51 2023 -0700 |
tree | 4602a96ea058d9f8bded4d06b99820105a1e5bd8 | |
parent | 6b650d956ed9ca57b99065cdc3c2c81d2ef0c2d1 [diff] |
CASSANDRASC-72: Split unit tests and integration tests in CircleCI config As the number of integration tests continues to grow, it is desirable to split unit tests and integration tests. It is also desirable to parallelize integration tests, each integration test should be its own job. The goals of this improvement are: - Fail fast on checkstyle or minor errors - Speed up test runtime by running integration tests in parallel - Isolate failing tests to specific combinations of Cassandra In this commit, we run unit tests individually for both java 8 and java 11. We split integration tests into its own jobs, split per java version and cassandra version combination. Patch by Francisco Guerrero; Reviewed by Dinesh Joshi, Yifan Cai for CASSANDRASC-72
This is a Sidecar for the highly scalable Apache Cassandra database. For more information, see the Apache Cassandra web site and CIP-1.
This is project is still WIP.
We depend on the Cassandra in-jvm dtest framework for testing. Because these jars are not published, you must manually build the dtest jars before you can build the project.
./scripts/build-dtest-jars.sh
The build script supports two parameters:
REPO
- the Cassandra git repository to use for the source files. This is helpful if you need to test with a fork of the Cassandra codebase.git@github.com:apache/cassandra.git
BRANCHES
- a space-delimited list of branches to build. -default: "cassandra-4.1 trunk"
Remove any versions you may not want to test with. We recommend at least the latest (released) 4.X series and trunk
. See Testing for more details on how to choose which Cassandra versions to use while testing.
After you clone the git repo, you can use the gradle wrapper to build and run the project. Make sure you have Apache Cassandra running on the host & port specified in conf/sidecar.yaml
.
$ ./gradlew run
While setting up cassandra instance, make sure the data directories of cassandra are in the path stored in sidecar.yaml file, else modify data directories path to point to the correct directories for stream APIs to work.
The test framework is set up to run 4.1 and 5.1 (Trunk) tests (see TestVersionSupplier.java
) by default. You can change this via the Java property cassandra.sidecar.versions_to_test
by supplying a comma-delimited string. For example, -Dcassandra.sidecar.versions_to_test=4.0,4.1,5.1
.
You will need to use the “Add Projects” function of CircleCI to set up CircleCI on your fork. When promoted to create a branch, do not replace the CircleCI config, choose the option to do it manually. CircleCI will pick up the in project configuration.
We warmly welcome and appreciate contributions from the community. Please see CONTRIBUTING.md if you wish to submit pull requests.