Skip to content

Commit

Permalink
[CASSANDRA-17950] Enable dtest-offheap in CircleCI
Browse files Browse the repository at this point in the history
The dtest-offheap test was only added to the Jenkins configuration, so
this commit adds it to the CircleCI build for parity.

Patch by Derek Chen-Becker; reviewed by Ekaterina Dimitrova, Derek Chen-Becker, Michael Semb Wever, and Andres de la Pena for CASSANDRA-17950

Co-authored-by: Ekaterina Dimitrova <ekaterina.dimitrova@datastax.com>
Co-authored-by: Derek Chen-Becker <dchenbec@amazon.com>
  • Loading branch information
dchenbec and ekaterinadimitrova2 committed Nov 8, 2022
1 parent 7b77628 commit e4672b6
Show file tree
Hide file tree
Showing 8 changed files with 1,031 additions and 20 deletions.
59 changes: 58 additions & 1 deletion .circleci/config-2_1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,19 @@ separate_jobs: &separate_jobs
requires:
- start_j8_repeated_ant_test
- build
# Java 8 off-heap dtests
- start_j8_dtests_offheap:
type: approval
- j8_dtests_offheap:
requires:
- start_j8_dtests_offheap
- build
- start_j8_dtests_offheap_repeat:
type: approval
- j8_dtests_offheap_repeat:
requires:
- start_j8_dtests_offheap_repeat
- build

pre-commit_jobs: &pre-commit_jobs
jobs:
Expand Down Expand Up @@ -412,6 +425,17 @@ pre-commit_jobs: &pre-commit_jobs
- j8_repeated_ant_test:
requires:
- build
# Java 8 off-heap ddtests
- start_j8_dtests_offheap:
type: approval
- j8_dtests_offheap:
requires:
- start_j8_dtests_offheap
- build
- j8_dtests_offheap_repeat:
requires:
- start_j8_dtests_offheap
- build

workflows:
version: 2
Expand Down Expand Up @@ -683,6 +707,36 @@ jobs:
stop_on_failure: ${REPEATED_TESTS_STOP_ON_FAILURE}
count: ${REPEATED_UPGRADE_DTESTS_COUNT}

j8_dtests_offheap:
<<: *j8_par_executor
steps:
- attach_workspace:
at: /home/cassandra
- log_environment
- clone_dtest
- create_venv
- create_dtest_containers:
file_tag: j8_dtests_offheap
run_dtests_extra_args: "--use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests"
- run_dtests:
file_tag: j8_dtests_offheap
pytest_extra_args: '--use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests'

j8_dtests_offheap_repeat:
<<: *j8_repeated_dtest_executor
steps:
- attach_workspace:
at: /home/cassandra
- clone_dtest
- create_venv
- run_repeated_dtest:
tests: ${REPEATED_DTESTS}
vnodes: "true"
upgrade: "false"
count: ${REPEATED_DTESTS_COUNT}
stop_on_failure: ${REPEATED_TESTS_STOP_ON_FAILURE}
extra_dtest_args: "--use-off-heap-memtables --skip-resource-intensive-tests"

commands:
log_environment:
steps:
Expand Down Expand Up @@ -1323,6 +1377,9 @@ commands:
type: string
stop_on_failure:
type: string
extra_dtest_args:
type: string
default: ""
steps:
- run:
name: Run repeated Python dtest
Expand Down Expand Up @@ -1377,7 +1434,7 @@ commands:
fi
# we need the "set -o pipefail" here so that the exit code that circleci will actually use is from pytest and not the exit code from tee
set -o pipefail && cd ~/cassandra-dtest && pytest $vnodes_args --count=$count $stop_on_failure_arg $upgrade_arg --log-cli-level=DEBUG --junit-xml=/tmp/results/dtests/pytest_result.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $tests_arg | tee /tmp/dtest/stdout.txt
set -o pipefail && cd ~/cassandra-dtest && pytest $vnodes_args --count=$count $stop_on_failure_arg $upgrade_arg --log-cli-level=DEBUG --junit-xml=/tmp/results/dtests/pytest_result.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir <<parameters.extra_dtest_args>> $tests_arg | tee /tmp/dtest/stdout.txt
fi
fi
- store_test_results:
Expand Down
4 changes: 2 additions & 2 deletions .circleci/config-2_1.yml.high_res.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- config-2_1.yml 2022-11-03 12:52:03.000000000 -0400
+++ config-2_1.yml.HIGHRES 2022-11-03 12:53:22.000000000 -0400
--- config-2_1.yml 2022-11-05 18:28:58.000000000 -0400
+++ config-2_1.yml.HIGHRES 2022-11-05 18:47:13.000000000 -0400
@@ -40,8 +40,8 @@
CASSANDRA_SKIP_SYNC: true
DTEST_REPO: https://github.com/apache/cassandra-dtest.git
Expand Down
19 changes: 14 additions & 5 deletions .circleci/config-2_1.yml.mid_res.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- config-2_1.yml 2022-11-03 12:52:03.000000000 -0400
+++ config-2_1.yml.MIDRES 2022-11-03 12:53:22.000000000 -0400
--- config-2_1.yml 2022-11-05 18:28:58.000000000 -0400
+++ config-2_1.yml.MIDRES 2022-11-05 18:47:13.000000000 -0400
@@ -126,45 +126,65 @@
executor:
name: java8-executor
Expand Down Expand Up @@ -73,7 +73,7 @@

separate_jobs: &separate_jobs
jobs:
@@ -531,7 +551,7 @@
@@ -555,7 +575,7 @@
target: stress-test

j8_dtests_vnode:
Expand All @@ -82,7 +82,7 @@
steps:
- attach_workspace:
at: /home/cassandra
@@ -545,7 +565,7 @@
@@ -569,7 +589,7 @@
pytest_extra_args: '--use-vnodes --num-tokens=32 --skip-resource-intensive-tests'

j8_dtests:
Expand All @@ -91,7 +91,7 @@
steps:
- attach_workspace:
at: /home/cassandra
@@ -559,7 +579,7 @@
@@ -583,7 +603,7 @@
pytest_extra_args: '--skip-resource-intensive-tests'

j8_upgrade_dtests:
Expand All @@ -100,3 +100,12 @@
steps:
- attach_workspace:
at: /home/cassandra
@@ -708,7 +728,7 @@
count: ${REPEATED_UPGRADE_DTESTS_COUNT}

j8_dtests_offheap:
- <<: *j8_par_executor
+ <<: *j8_large_par_executor
steps:
- attach_workspace:
at: /home/cassandra

0 comments on commit e4672b6

Please sign in to comment.