diff --git a/.build/build-checkstyle.xml b/.build/build-checkstyle.xml index 01a4b1ea0e..af5867e4aa 100644 --- a/.build/build-checkstyle.xml +++ b/.build/build-checkstyle.xml @@ -20,11 +20,13 @@ xmlns:rat="antlib:org.apache.rat.anttasks"> - + + + + classpathref="checkstyle.lib.path"/> diff --git a/.build/build-resolver.xml b/.build/build-resolver.xml index 708d716662..468adf76bf 100644 --- a/.build/build-resolver.xml +++ b/.build/build-resolver.xml @@ -128,12 +128,6 @@ - - - - - - diff --git a/.build/cassandra-build-deps-template.xml b/.build/cassandra-build-deps-template.xml index 6c6eb78fd2..f8f349f644 100644 --- a/.build/cassandra-build-deps-template.xml +++ b/.build/cassandra-build-deps-template.xml @@ -62,6 +62,10 @@ com.google.jimfs jimfs + + com.puppycrawl.tools + checkstyle + org.quicktheories quicktheories diff --git a/.build/docker/_set_java.sh b/.build/docker/_set_java.sh index 9d3d135546..6770803c6c 100755 --- a/.build/docker/_set_java.sh +++ b/.build/docker/_set_java.sh @@ -49,12 +49,6 @@ if [[ ! "$java_version" =~ $regx_java_version ]]; then exit 1 fi -# TODO – remove after CASSANDRA-18255 -if [ "$java_version" == "1.8" ]; then - echo "Error: Java 8 is not supported, ref CASSANDRA-18255" - exit 1 -fi - ################################ # # Main diff --git a/.build/parent-pom-template.xml b/.build/parent-pom-template.xml index a57739f963..53120c260d 100644 --- a/.build/parent-pom-template.xml +++ b/.build/parent-pom-template.xml @@ -494,6 +494,12 @@ 2.35.0 test + + com.puppycrawl.tools + checkstyle + 10.12.1 + test + net.java.dev.jna jna diff --git a/.circleci/config.yml b/.circleci/config.yml index e56628a52c..0c247fbc85 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,7 +20,7 @@ version: 2 jobs: j11_jvm_upgrade_dtests_repeat: docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -108,7 +108,7 @@ jobs: - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - CASSANDRA_USE_JDK11: true - j11_utests_fqltool_repeat: + j17_dtests: docker: - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium @@ -116,6 +116,373 @@ jobs: shell: /bin/bash -eo pipefail -l parallelism: 4 steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j17_without_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_without_vnodes_raw /tmp/all_dtest_tests_j17_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_without_vnodes_raw > /tmp/all_dtest_tests_j17_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_without_vnodes > /tmp/split_dtest_tests_j17_without_vnodes.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes_final.txt\n" + - run: + name: Run dtests (j17_without_vnodes) + no_output_timeout: 15m + command: "echo \"cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j17_without_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j17_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j17_without_vnodes + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j17_without_vnodes_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_cqlshlib_cython_tests: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 1 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Run cqlshlib Unit Tests + command: | + export PATH=$JAVA_HOME/bin:$PATH + export cython="yes" + time mv ~/cassandra /tmp + cd /tmp/cassandra/ + ant jar -Dno-checkstyle=true -Drat.skip=true -Dant.gen-doc.skip=true -Djavadoc.skip=true + ./pylib/cassandra-cqlsh-tests.sh $(pwd) + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/pylib + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_cqlsh_dtests_py311_offheap: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.11/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j17_dtests_offheap) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_dtests_offheap_raw /tmp/all_dtest_tests_j17_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j17_dtests_offheap_raw > /tmp/all_dtest_tests_j17_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_dtests_offheap > /tmp/split_dtest_tests_j17_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\n" + - run: + name: Run dtests (j17_dtests_offheap) + no_output_timeout: 15m + command: | + echo "cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt" + cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt + + source ~/env3.11/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then + export CQLSH_PYTHON=/usr/bin/python3.11 + fi + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + # 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 + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt` + if [ ! -z "$SPLIT_TESTS" ]; then + set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + else + echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" + (exit 1) + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j17_dtests_offheap + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j17_dtests_offheap_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_jvm_dtests_vnode_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_JVM_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_JVM_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_JVM_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=true\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-jvm-dtest-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-jvm-dtest-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + - store_test_results: + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_utests_fqltool_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: - attach_workspace: at: /home/cassandra - run: @@ -200,7 +567,7 @@ jobs: - CASSANDRA_USE_JDK11: true j11_cqlshlib_cython_tests: docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -263,9 +630,9 @@ jobs: - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - CASSANDRA_USE_JDK11: true - j8_cqlsh_dtests_py311_vnode: + j17_cqlsh_dtests_py3_offheap: docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -284,26 +651,26 @@ jobs: # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.11/bin/activate + source ~/env3.6/bin/activate export PATH=$JAVA_HOME/bin:$PATH pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt pip3 uninstall -y cqlsh pip3 freeze - run: - name: Determine Tests to Run (j8_with_vnodes) + name: Determine Tests to Run (j17_dtests_offheap) no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_with_vnodes_raw /tmp/all_dtest_tests_j8_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j8_with_vnodes_raw > /tmp/all_dtest_tests_j8_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_with_vnodes > /tmp/split_dtest_tests_j8_with_vnodes.txt\ncat /tmp/split_dtest_tests_j8_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j8_with_vnodes_final.txt\n" + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_dtests_offheap_raw /tmp/all_dtest_tests_j17_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j17_dtests_offheap_raw > /tmp/all_dtest_tests_j17_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_dtests_offheap > /tmp/split_dtest_tests_j17_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\n" - run: - name: Run dtests (j8_with_vnodes) + name: Run dtests (j17_dtests_offheap) no_output_timeout: 15m command: | - echo "cat /tmp/split_dtest_tests_j8_with_vnodes_final.txt" - cat /tmp/split_dtest_tests_j8_with_vnodes_final.txt + echo "cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt" + cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt - source ~/env3.11/bin/activate + source ~/env3.6/bin/activate export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then - export CQLSH_PYTHON=/usr/bin/python3.11 + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then + export CQLSH_PYTHON=/usr/bin/python3.6 fi java -version @@ -314,9 +681,9 @@ jobs: echo "** done env" mkdir -p /tmp/results/dtests # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_with_vnodes_final.txt` + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt` if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j8_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt else echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" (exit 1) @@ -325,10 +692,10 @@ jobs: path: /tmp/results - store_artifacts: path: /tmp/dtest - destination: dtest_j8_with_vnodes + destination: dtest_j17_dtests_offheap - store_artifacts: path: ~/cassandra-dtest/logs - destination: dtest_j8_with_vnodes_logs + destination: dtest_j17_dtests_offheap_logs environment: - ANT_HOME: /usr/share/ant - LANG: en_US.UTF-8 @@ -369,9 +736,234 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_dtests_vnode_repeat: + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_utests_compression: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Determine unit Tests to Run + command: | + # reminder: this code (along with all the steps) is independently executed on every circle container + # so the goal here is to get the circleci script to return the tests *this* container will run + # which we do via the `circleci` cli tool. + + rm -fr ~/cassandra-dtest/upgrade_tests + echo "***java tests***" + + # get all of our unit test filenames + set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt + + # split up the unit tests into groups based on the number of containers we have + set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt + set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" + cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + no_output_timeout: 15m + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Run Unit Tests (testclasslist-compression) + command: | + set -x + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) + if [ -z "$test_timeout" ]; then + test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') + fi + ant testclasslist-compression -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_cqlsh_dtests_py38_vnode: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.8/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j17_with_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_with_vnodes_raw /tmp/all_dtest_tests_j17_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_with_vnodes_raw > /tmp/all_dtest_tests_j17_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_with_vnodes > /tmp/split_dtest_tests_j17_with_vnodes.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes_final.txt\n" + - run: + name: Run dtests (j17_with_vnodes) + no_output_timeout: 15m + command: | + echo "cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt" + cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt + + source ~/env3.8/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then + export CQLSH_PYTHON=/usr/bin/python3.8 + fi + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + # 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 + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt` + if [ ! -z "$SPLIT_TESTS" ]; then + set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + else + echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" + (exit 1) + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j17_with_vnodes + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j17_with_vnodes_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_dtests_vnode_repeat: docker: - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium @@ -523,12 +1115,11 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_dtests_large_vnode: + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_dtests_offheap_repeat: docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -553,21 +1144,69 @@ jobs: pip3 uninstall -y cqlsh pip3 freeze - run: - name: Determine Tests to Run (j8_large_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_large_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --only-resource-intensive-tests --force-resource-intensive-tests --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_large_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_large_with_vnodes_raw /tmp/all_dtest_tests_j8_large_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j8_large_with_vnodes_raw > /tmp/all_dtest_tests_j8_large_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_large_with_vnodes > /tmp/split_dtest_tests_j8_large_with_vnodes.txt\ncat /tmp/split_dtest_tests_j8_large_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_large_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j8_large_with_vnodes_final.txt\n" - - run: - name: Run dtests (j8_large_with_vnodes) + name: Run repeated Python DTests no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j8_large_with_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j8_large_with_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_large_with_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --only-resource-intensive-tests --force-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j8_large_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" + command: | + if [ "${REPEATED_DTESTS}" == "" ]; then + echo "Repeated dtest name hasn't been defined, exiting without running any test" + elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then + echo "Repeated dtest count hasn't been defined, exiting without running any test" + elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then + echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" + else + + # Calculate the number of test iterations to be run by the current parallel runner. + # Since we are running the same test multiple times there is no need to use `circleci tests split`. + count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) + if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then + count=$((count+1)) + fi + + if (($count <= 0)); then + echo "No tests to run in this runner" + else + echo "Running ${REPEATED_DTESTS} $count times" + + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + + tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") + + stop_on_failure_arg="" + if ${REPEATED_TESTS_STOP_ON_FAILURE}; then + stop_on_failure_arg="-x" + fi + + vnodes_args="" + if true; then + vnodes_args="--use-vnodes --num-tokens=16" + fi + + upgrade_arg="" + if false; then + upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" + 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 --use-off-heap-memtables --skip-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt + fi + fi - store_test_results: path: /tmp/results - store_artifacts: path: /tmp/dtest - destination: dtest_j8_large_with_vnodes + destination: dtest - store_artifacts: path: ~/cassandra-dtest/logs - destination: dtest_j8_large_with_vnodes_logs + destination: dtest_logs environment: - ANT_HOME: /usr/share/ant - LANG: en_US.UTF-8 @@ -608,11 +1247,144 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_dtests_vnode_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Run repeated Python DTests + no_output_timeout: 15m + command: | + if [ "${REPEATED_DTESTS}" == "" ]; then + echo "Repeated dtest name hasn't been defined, exiting without running any test" + elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then + echo "Repeated dtest count hasn't been defined, exiting without running any test" + elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then + echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" + else + + # Calculate the number of test iterations to be run by the current parallel runner. + # Since we are running the same test multiple times there is no need to use `circleci tests split`. + count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) + if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then + count=$((count+1)) + fi + + if (($count <= 0)); then + echo "No tests to run in this runner" + else + echo "Running ${REPEATED_DTESTS} $count times" + + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + + tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") + + stop_on_failure_arg="" + if ${REPEATED_TESTS_STOP_ON_FAILURE}; then + stop_on_failure_arg="-x" + fi + + vnodes_args="" + if true; then + vnodes_args="--use-vnodes --num-tokens=16" + fi + + upgrade_arg="" + if false; then + upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" + 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 + fi + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true j11_utests_system_keyspace_directory: docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -728,35 +1500,72 @@ jobs: - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - CASSANDRA_USE_JDK11: true - j8_utests_stress: + j17_cqlsh_dtests_py3: docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 1 + parallelism: 4 steps: - attach_workspace: at: /home/cassandra - run: - name: Run Unit Tests (stress-test) + name: Clone Cassandra dtest Repository (via git) command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant stress-test -Dno-build-test=true + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j17_without_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_without_vnodes_raw /tmp/all_dtest_tests_j17_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_without_vnodes_raw > /tmp/all_dtest_tests_j17_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_without_vnodes > /tmp/split_dtest_tests_j17_without_vnodes.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes_final.txt\n" + - run: + name: Run dtests (j17_without_vnodes) no_output_timeout: 15m + command: | + echo "cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt" + cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt + + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then + export CQLSH_PYTHON=/usr/bin/python3.6 + fi + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + # 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 + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt` + if [ ! -z "$SPLIT_TESTS" ]; then + set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + else + echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" + (exit 1) + fi - store_test_results: - path: /tmp/cassandra/build/test/output/ + path: /tmp/results - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml + path: /tmp/dtest + destination: dtest_j17_without_vnodes - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs + path: ~/cassandra-dtest/logs + destination: dtest_j17_without_vnodes_logs environment: - ANT_HOME: /usr/share/ant - LANG: en_US.UTF-8 @@ -797,11 +1606,11 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 j11_utests_stress_repeat: docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -889,7 +1698,7 @@ jobs: - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - CASSANDRA_USE_JDK11: true - j11_cqlsh_dtests_py311: + j17_unit_tests: docker: - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium @@ -897,6 +1706,212 @@ jobs: shell: /bin/bash -eo pipefail -l parallelism: 4 steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Determine unit Tests to Run + command: | + # reminder: this code (along with all the steps) is independently executed on every circle container + # so the goal here is to get the circleci script to return the tests *this* container will run + # which we do via the `circleci` cli tool. + + rm -fr ~/cassandra-dtest/upgrade_tests + echo "***java tests***" + + # get all of our unit test filenames + set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt + + # split up the unit tests into groups based on the number of containers we have + set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt + set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" + cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + no_output_timeout: 15m + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Run Unit Tests (testclasslist) + command: | + set -x + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) + if [ -z "$test_timeout" ]; then + test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') + fi + ant testclasslist -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_utests_system_keyspace_directory_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-system-keyspace-directory\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-system-keyspace-directory $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + - store_test_results: + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_cqlsh_dtests_py311: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: - attach_workspace: at: /home/cassandra - run: @@ -998,302 +2013,7 @@ jobs: - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - CASSANDRA_USE_JDK11: true - j8_utests_trie_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-trie\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-trie $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_jvm_dtests_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine distributed Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/distributed/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/distributed/;;g" | grep "Test\.java$" | grep -v upgrade > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.distributed.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist -Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16' -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=distributed -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_utests_compression_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-compression\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-compression $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_unit_tests: + j17_dtests_large_vnode_repeat: docker: - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium @@ -1301,6 +2021,292 @@ jobs: shell: /bin/bash -eo pipefail -l parallelism: 4 steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Run repeated Python DTests + no_output_timeout: 15m + command: | + if [ "${REPEATED_LARGE_DTESTS}" == "" ]; then + echo "Repeated dtest name hasn't been defined, exiting without running any test" + elif [ "${REPEATED_LARGE_DTESTS_COUNT}" == "" ]; then + echo "Repeated dtest count hasn't been defined, exiting without running any test" + elif [ "${REPEATED_LARGE_DTESTS_COUNT}" -le 0 ]; then + echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" + else + + # Calculate the number of test iterations to be run by the current parallel runner. + # Since we are running the same test multiple times there is no need to use `circleci tests split`. + count=$((${REPEATED_LARGE_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) + if (($CIRCLE_NODE_INDEX < (${REPEATED_LARGE_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then + count=$((count+1)) + fi + + if (($count <= 0)); then + echo "No tests to run in this runner" + else + echo "Running ${REPEATED_LARGE_DTESTS} $count times" + + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + + tests_arg=$(echo ${REPEATED_LARGE_DTESTS} | sed -e "s/,/ /g") + + stop_on_failure_arg="" + if ${REPEATED_TESTS_STOP_ON_FAILURE}; then + stop_on_failure_arg="-x" + fi + + vnodes_args="" + if true; then + vnodes_args="--use-vnodes --num-tokens=16" + fi + + upgrade_arg="" + if false; then + upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" + 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 --only-resource-intensive-tests --force-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt + fi + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_dtests_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Run repeated Python DTests + no_output_timeout: 15m + command: | + if [ "${REPEATED_DTESTS}" == "" ]; then + echo "Repeated dtest name hasn't been defined, exiting without running any test" + elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then + echo "Repeated dtest count hasn't been defined, exiting without running any test" + elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then + echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" + else + + # Calculate the number of test iterations to be run by the current parallel runner. + # Since we are running the same test multiple times there is no need to use `circleci tests split`. + count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) + if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then + count=$((count+1)) + fi + + if (($count <= 0)); then + echo "No tests to run in this runner" + else + echo "Running ${REPEATED_DTESTS} $count times" + + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + + tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") + + stop_on_failure_arg="" + if ${REPEATED_TESTS_STOP_ON_FAILURE}; then + stop_on_failure_arg="-x" + fi + + vnodes_args="" + if false; then + vnodes_args="--use-vnodes --num-tokens=16" + fi + + upgrade_arg="" + if false; then + upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" + 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 + fi + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_unit_tests: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: - attach_workspace: at: /home/cassandra - run: @@ -1411,9 +2417,9 @@ jobs: - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - CASSANDRA_USE_JDK11: true - j8_cqlsh_dtests_py3: + j17_cqlsh_dtests_py311: docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -1432,26 +2438,26 @@ jobs: # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate + source ~/env3.11/bin/activate export PATH=$JAVA_HOME/bin:$PATH pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt pip3 uninstall -y cqlsh pip3 freeze - run: - name: Determine Tests to Run (j8_without_vnodes) + name: Determine Tests to Run (j17_without_vnodes) no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_without_vnodes_raw /tmp/all_dtest_tests_j8_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j8_without_vnodes_raw > /tmp/all_dtest_tests_j8_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_without_vnodes > /tmp/split_dtest_tests_j8_without_vnodes.txt\ncat /tmp/split_dtest_tests_j8_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j8_without_vnodes_final.txt\n" + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_without_vnodes_raw /tmp/all_dtest_tests_j17_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_without_vnodes_raw > /tmp/all_dtest_tests_j17_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_without_vnodes > /tmp/split_dtest_tests_j17_without_vnodes.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes_final.txt\n" - run: - name: Run dtests (j8_without_vnodes) + name: Run dtests (j17_without_vnodes) no_output_timeout: 15m command: | - echo "cat /tmp/split_dtest_tests_j8_without_vnodes_final.txt" - cat /tmp/split_dtest_tests_j8_without_vnodes_final.txt + echo "cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt" + cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt - source ~/env3.6/bin/activate + source ~/env3.11/bin/activate export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then - export CQLSH_PYTHON=/usr/bin/python3.6 + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then + export CQLSH_PYTHON=/usr/bin/python3.11 fi java -version @@ -1462,9 +2468,9 @@ jobs: echo "** done env" mkdir -p /tmp/results/dtests # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_without_vnodes_final.txt` + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt` if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j8_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt else echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" (exit 1) @@ -1473,10 +2479,10 @@ jobs: path: /tmp/results - store_artifacts: path: /tmp/dtest - destination: dtest_j8_without_vnodes + destination: dtest_j17_without_vnodes - store_artifacts: path: ~/cassandra-dtest/logs - destination: dtest_j8_without_vnodes_logs + destination: dtest_j17_without_vnodes_logs environment: - ANT_HOME: /usr/share/ant - LANG: en_US.UTF-8 @@ -1517,11 +2523,11 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 j11_cqlsh_dtests_py38: docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -1628,7 +2634,7 @@ jobs: - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - CASSANDRA_USE_JDK11: true - j11_utests_compression_repeat: + j17_utests_stress_repeat: docker: - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium @@ -1636,6 +2642,95 @@ jobs: shell: /bin/bash -eo pipefail -l parallelism: 4 steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_STRESS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_STRESS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS_STRESS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=stress-test-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant stress-test-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + - store_test_results: + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_utests_compression_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: - attach_workspace: at: /home/cassandra - run: @@ -1718,7 +2813,7 @@ jobs: - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - CASSANDRA_USE_JDK11: true - j11_repeated_ant_test: + j17_utests_oa: docker: - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium @@ -1726,6 +2821,123 @@ jobs: shell: /bin/bash -eo pipefail -l parallelism: 4 steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Determine unit Tests to Run + command: | + # reminder: this code (along with all the steps) is independently executed on every circle container + # so the goal here is to get the circleci script to return the tests *this* container will run + # which we do via the `circleci` cli tool. + + rm -fr ~/cassandra-dtest/upgrade_tests + echo "***java tests***" + + # get all of our unit test filenames + set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt + + # split up the unit tests into groups based on the number of containers we have + set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt + set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" + cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + no_output_timeout: 15m + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Run Unit Tests (testclasslist-oa) + command: | + set -x + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) + if [ -z "$test_timeout" ]; then + test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') + fi + ant testclasslist-oa -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_repeated_ant_test: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: - attach_workspace: at: /home/cassandra - run: @@ -1916,7 +3128,7 @@ jobs: - CASSANDRA_USE_JDK11: true j11_dtests_large_vnode: docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -2001,7 +3213,7 @@ jobs: - CASSANDRA_USE_JDK11: true j11_dtests_large_vnode_repeat: docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -2132,9 +3344,9 @@ jobs: - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - CASSANDRA_USE_JDK11: true - j8_cqlsh_dtests_py311: + j17_utests_trie: docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -2143,61 +3355,70 @@ jobs: - attach_workspace: at: /home/cassandra - run: - name: Clone Cassandra dtest Repository (via git) + name: Determine unit Tests to Run command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j8_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_without_vnodes_raw /tmp/all_dtest_tests_j8_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j8_without_vnodes_raw > /tmp/all_dtest_tests_j8_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_without_vnodes > /tmp/split_dtest_tests_j8_without_vnodes.txt\ncat /tmp/split_dtest_tests_j8_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j8_without_vnodes_final.txt\n" - - run: - name: Run dtests (j8_without_vnodes) + # reminder: this code (along with all the steps) is independently executed on every circle container + # so the goal here is to get the circleci script to return the tests *this* container will run + # which we do via the `circleci` cli tool. + + rm -fr ~/cassandra-dtest/upgrade_tests + echo "***java tests***" + + # get all of our unit test filenames + set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt + + # split up the unit tests into groups based on the number of containers we have + set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt + set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" + cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt no_output_timeout: 15m + - run: + name: Log Environment Information command: | - echo "cat /tmp/split_dtest_tests_j8_without_vnodes_final.txt" - cat /tmp/split_dtest_tests_j8_without_vnodes_final.txt - - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then - export CQLSH_PYTHON=/usr/bin/python3.11 - fi - + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_without_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j8_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) + - run: + name: Run Unit Tests (testclasslist-trie) + command: | + set -x + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ fi + test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) + if [ -z "$test_timeout" ]; then + test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') + fi + ant testclasslist-trie -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true + no_output_timeout: 15m - store_test_results: - path: /tmp/results + path: /tmp/cassandra/build/test/output/ - store_artifacts: - path: /tmp/dtest - destination: dtest_j8_without_vnodes + path: /tmp/cassandra/build/test/output + destination: junitxml - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j8_without_vnodes_logs + path: /tmp/cassandra/build/test/logs + destination: logs environment: - ANT_HOME: /usr/share/ant - LANG: en_US.UTF-8 @@ -2238,11 +3459,11 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 j11_cqlsh_dtests_py38_offheap: docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -2351,7 +3572,7 @@ jobs: - CASSANDRA_USE_JDK11: true j11_dtests_large: docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -2436,7 +3657,7 @@ jobs: - CASSANDRA_USE_JDK11: true j11_utests_system_keyspace_directory_repeat: docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -2526,7 +3747,7 @@ jobs: - CASSANDRA_USE_JDK11: true j11_utests_oa: docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -2644,7 +3865,7 @@ jobs: - CASSANDRA_USE_JDK11: true j11_upgrade_dtests_repeat: docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -2775,5039 +3996,7 @@ jobs: - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - CASSANDRA_USE_JDK11: true - j8_cqlsh_dtests_py3_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j8_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_with_vnodes_raw /tmp/all_dtest_tests_j8_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j8_with_vnodes_raw > /tmp/all_dtest_tests_j8_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_with_vnodes > /tmp/split_dtest_tests_j8_with_vnodes.txt\ncat /tmp/split_dtest_tests_j8_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j8_with_vnodes_final.txt\n" - - run: - name: Run dtests (j8_with_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j8_with_vnodes_final.txt" - cat /tmp/split_dtest_tests_j8_with_vnodes_final.txt - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then - export CQLSH_PYTHON=/usr/bin/python3.6 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_with_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j8_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j8_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j8_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_cqlsh_dtests_py3: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_without_vnodes_raw /tmp/all_dtest_tests_j11_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_without_vnodes_raw > /tmp/all_dtest_tests_j11_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_without_vnodes > /tmp/split_dtest_tests_j11_without_vnodes.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\n" - - run: - name: Run dtests (j11_without_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt" - cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then - export CQLSH_PYTHON=/usr/bin/python3.6 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_cqlshlib_cython_tests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run cqlshlib Unit Tests - command: | - export PATH=$JAVA_HOME/bin:$PATH - export cython="yes" - time mv ~/cassandra /tmp - cd /tmp/cassandra/ - ant jar -Dno-checkstyle=true -Drat.skip=true -Dant.gen-doc.skip=true -Djavadoc.skip=true - ./pylib/cassandra-cqlsh-tests.sh $(pwd) - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/pylib - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_utests_cdc: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-cdc) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-cdc -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_fqltool: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run Unit Tests (fqltool-test) - command: | - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant fqltool-test -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_utests_system_keyspace_directory: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-system-keyspace-directory) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-system-keyspace-directory -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_dtests_offheap_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if true; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 --use-off-heap-memtables --skip-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_dtests_offheap_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if true; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 --use-off-heap-memtables --skip-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_dtests_large_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_LARGE_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_LARGE_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_LARGE_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_LARGE_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_LARGE_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_LARGE_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_LARGE_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if false; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 --only-resource-intensive-tests --force-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_jvm_dtests_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine distributed Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/distributed/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/distributed/;;g" | grep "Test\.java$" | grep -v upgrade > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.distributed.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist -Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16' -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=distributed -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_simulator_dtests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Simulator Tests - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant test-simulator-dtest -Dno-build-test=true - no_output_timeout: 30m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_utests_compression: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-compression) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-compression -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_dtest_jars_build: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Build Cassandra DTest jars - command: | - export PATH=$JAVA_HOME/bin:$PATH - cd ~/cassandra - mkdir ~/dtest_jars - git remote add apache https://github.com/apache/cassandra.git - for branch in cassandra-4.0 cassandra-4.1 trunk; do - # check out the correct cassandra version: - git remote set-branches --add apache '$branch' - git fetch --depth 1 apache $branch - git checkout $branch - git clean -fd - # Loop to prevent failure due to maven-ant-tasks not downloading a jar.. - for x in $(seq 1 3); do - ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar -Dno-checkstyle=true -Drat.skip=true - RETURN="$?" - if [ "${RETURN}" -eq "0" ]; then - cp build/dtest*.jar ~/dtest_jars - break - fi - done - # Exit, if we didn't build successfully - if [ "${RETURN}" -ne "0" ]; then - echo "Build failed with exit code: ${RETURN}" - exit ${RETURN} - fi - done - # and build the dtest-jar for the branch under test - ${ANT_HOME}/bin/ant realclean - git checkout origin/$CIRCLE_BRANCH - git clean -fd - for x in $(seq 1 3); do - ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar -Dno-checkstyle=true -Drat.skip=true - RETURN="$?" - if [ "${RETURN}" -eq "0" ]; then - cp build/dtest*.jar ~/dtest_jars - break - fi - done - # Exit, if we didn't build successfully - if [ "${RETURN}" -ne "0" ]; then - echo "Build failed with exit code: ${RETURN}" - exit ${RETURN} - fi - ls -l ~/dtest_jars - no_output_timeout: 15m - - persist_to_workspace: - root: /home/cassandra - paths: - - dtest_jars - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_long: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run Unit Tests (long-test) - command: | - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant long-test -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_unit_tests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=testsome\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant testsome $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_dtests_large: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j8_large_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_large_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --only-resource-intensive-tests --force-resource-intensive-tests --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_large_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_large_without_vnodes_raw /tmp/all_dtest_tests_j8_large_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j8_large_without_vnodes_raw > /tmp/all_dtest_tests_j8_large_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_large_without_vnodes > /tmp/split_dtest_tests_j8_large_without_vnodes.txt\ncat /tmp/split_dtest_tests_j8_large_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_large_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j8_large_without_vnodes_final.txt\n" - - run: - name: Run dtests (j8_large_without_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j8_large_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j8_large_without_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_large_without_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --only-resource-intensive-tests --force-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j8_large_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j8_large_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j8_large_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_simulator_dtests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Simulator Tests - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant test-simulator-dtest -Dno-build-test=true - no_output_timeout: 30m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_jvm_upgrade_dtests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine distributed Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/distributed/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/distributed/;;g" | grep "Test\.java$" | grep upgrade > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.distributed.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=distributed -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_stress: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run Unit Tests (stress-test) - command: | - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant stress-test -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_cqlsh_dtests_py38_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j8_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_dtests_offheap_raw /tmp/all_dtest_tests_j8_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j8_dtests_offheap_raw > /tmp/all_dtest_tests_j8_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_dtests_offheap > /tmp/split_dtest_tests_j8_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j8_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j8_dtests_offheap) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt" - cat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt - - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then - export CQLSH_PYTHON=/usr/bin/python3.8 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j8_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j8_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j8_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_utests_cdc_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-cdc\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-cdc $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_dtests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if false; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_utests_fqltool_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_FQLTOOL_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_FQLTOOL_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS_FQLTOOL} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=fqltool-test\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant fqltool-test $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_jvm_dtests_vnode_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_JVM_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_JVM_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_JVM_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=true\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-jvm-dtest-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-jvm-dtest-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_utests_compression: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-compression) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-compression -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_cqlsh_dtests_py38: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j8_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_without_vnodes_raw /tmp/all_dtest_tests_j8_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j8_without_vnodes_raw > /tmp/all_dtest_tests_j8_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_without_vnodes > /tmp/split_dtest_tests_j8_without_vnodes.txt\ncat /tmp/split_dtest_tests_j8_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j8_without_vnodes_final.txt\n" - - run: - name: Run dtests (j8_without_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j8_without_vnodes_final.txt" - cat /tmp/split_dtest_tests_j8_without_vnodes_final.txt - - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then - export CQLSH_PYTHON=/usr/bin/python3.8 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_without_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j8_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j8_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j8_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_cqlsh_dtests_py3_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_dtests_offheap_raw /tmp/all_dtest_tests_j11_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j11_dtests_offheap_raw > /tmp/all_dtest_tests_j11_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_dtests_offheap > /tmp/split_dtest_tests_j11_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j11_dtests_offheap) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt" - cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then - export CQLSH_PYTHON=/usr/bin/python3.6 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_utests_oa: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-oa) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-oa -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_simulator_dtests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_SIMULATOR_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_SIMULATOR_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_SIMULATOR_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-simulator-dtest\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-simulator-dtest $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_cqlsh_dtests_py311_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_dtests_offheap_raw /tmp/all_dtest_tests_j11_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j11_dtests_offheap_raw > /tmp/all_dtest_tests_j11_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_dtests_offheap > /tmp/split_dtest_tests_j11_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j11_dtests_offheap) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt" - cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt - - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then - export CQLSH_PYTHON=/usr/bin/python3.11 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_utests_system_keyspace_directory_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-system-keyspace-directory\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-system-keyspace-directory $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_utests_trie: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-trie) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-trie -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_upgrade_dtests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_upgradetests_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_upgradetests_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --execute-upgrade-tests-only --upgrade-target-version-only --upgrade-version-selection all --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_upgradetests_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_upgradetests_without_vnodes_raw /tmp/all_dtest_tests_j11_upgradetests_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_upgradetests_without_vnodes_raw > /tmp/all_dtest_tests_j11_upgradetests_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_upgradetests_without_vnodes > /tmp/split_dtest_tests_j11_upgradetests_without_vnodes.txt\ncat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt\n" - - run: - name: Run dtests (j11_upgradetests_without_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --execute-upgrade-tests-only --upgrade-target-version-only --upgrade-version-selection all --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j11_upgradetests_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_upgradetests_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_upgradetests_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_dtests_large_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_LARGE_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_LARGE_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_LARGE_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_LARGE_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_LARGE_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_LARGE_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_LARGE_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if false; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 --only-resource-intensive-tests --force-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_utests_trie: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-trie) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-trie -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_cqlsh_dtests_py3_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j8_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_dtests_offheap_raw /tmp/all_dtest_tests_j8_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j8_dtests_offheap_raw > /tmp/all_dtest_tests_j8_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_dtests_offheap > /tmp/split_dtest_tests_j8_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j8_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j8_dtests_offheap) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt" - cat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then - export CQLSH_PYTHON=/usr/bin/python3.6 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j8_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j8_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j8_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_utests_stress_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_STRESS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_STRESS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS_STRESS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=stress-test-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant stress-test-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_dtests_vnode_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if true; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_cqlsh_dtests_py3_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_with_vnodes_raw /tmp/all_dtest_tests_j11_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_with_vnodes_raw > /tmp/all_dtest_tests_j11_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_with_vnodes > /tmp/split_dtest_tests_j11_with_vnodes.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n" - - run: - name: Run dtests (j11_with_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt" - cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then - export CQLSH_PYTHON=/usr/bin/python3.6 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_dtests_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_dtests_offheap_raw /tmp/all_dtest_tests_j11_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j11_dtests_offheap_raw > /tmp/all_dtest_tests_j11_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_dtests_offheap > /tmp/split_dtest_tests_j11_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j11_dtests_offheap) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\"\ncat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j11_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_cqlsh_dtests_py38_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_with_vnodes_raw /tmp/all_dtest_tests_j11_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_with_vnodes_raw > /tmp/all_dtest_tests_j11_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_with_vnodes > /tmp/split_dtest_tests_j11_with_vnodes.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n" - - run: - name: Run dtests (j11_with_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt" - cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt - - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then - export CQLSH_PYTHON=/usr/bin/python3.8 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_trie_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-trie\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-trie $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_simulator_dtests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_SIMULATOR_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_SIMULATOR_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_SIMULATOR_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-simulator-dtest\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-simulator-dtest $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_jvm_dtests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_JVM_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_JVM_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_JVM_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-jvm-dtest-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-jvm-dtest-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_cqlsh_dtests_py311_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_with_vnodes_raw /tmp/all_dtest_tests_j11_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_with_vnodes_raw > /tmp/all_dtest_tests_j11_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_with_vnodes > /tmp/split_dtest_tests_j11_with_vnodes.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n" - - run: - name: Run dtests (j11_with_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt" - cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt - - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then - export CQLSH_PYTHON=/usr/bin/python3.11 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_utests_long_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_LONG_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_LONG_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS_LONG} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=long-testsome\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant long-testsome $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_dtests_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j8_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_dtests_offheap_raw /tmp/all_dtest_tests_j8_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j8_dtests_offheap_raw > /tmp/all_dtest_tests_j8_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_dtests_offheap > /tmp/split_dtest_tests_j8_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j8_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j8_dtests_offheap) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt\"\ncat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j8_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j8_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j8_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_unit_tests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_jvm_dtests: + j17_jvm_dtests: docker: - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium @@ -7922,10 +4111,9 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_jvm_dtests_vnode_repeat: + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_repeated_ant_test: docker: - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium @@ -7933,810 +4121,6 @@ jobs: shell: /bin/bash -eo pipefail -l parallelism: 4 steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_JVM_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_JVM_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_JVM_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=true\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-jvm-dtest-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-jvm-dtest-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_build: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Clone Cassandra Repository (via git) - command: | - git clone --single-branch --depth 1 --branch $CIRCLE_BRANCH https://github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME.git ~/cassandra - - run: - name: Build Cassandra - command: | - export PATH=$JAVA_HOME/bin:$PATH - cd ~/cassandra - # Loop to prevent failure due to maven-ant-tasks not downloading a jar.. - for x in $(seq 1 3); do - ${ANT_HOME}/bin/ant clean realclean jar - RETURN="$?" - if [ "${RETURN}" -eq "0" ]; then - break - fi - done - # Exit, if we didn't build successfully - if [ "${RETURN}" -ne "0" ]; then - echo "Build failed with exit code: ${RETURN}" - exit ${RETURN} - fi - no_output_timeout: 15m - - run: - name: Run static code analysis - command: | - export PATH=$JAVA_HOME/bin:$PATH - cd ~/cassandra - ant check - - persist_to_workspace: - root: /home/cassandra - paths: - - cassandra - - .m2 - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_utests_oa_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-oa\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-oa $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_dtests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j8_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_without_vnodes_raw /tmp/all_dtest_tests_j8_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j8_without_vnodes_raw > /tmp/all_dtest_tests_j8_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_without_vnodes > /tmp/split_dtest_tests_j8_without_vnodes.txt\ncat /tmp/split_dtest_tests_j8_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j8_without_vnodes_final.txt\n" - - run: - name: Run dtests (j8_without_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j8_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j8_without_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_without_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j8_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j8_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j8_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_utests_oa_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-oa\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-oa $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_dtests_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j8_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_with_vnodes_raw /tmp/all_dtest_tests_j8_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j8_with_vnodes_raw > /tmp/all_dtest_tests_j8_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_with_vnodes > /tmp/split_dtest_tests_j8_with_vnodes.txt\ncat /tmp/split_dtest_tests_j8_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j8_with_vnodes_final.txt\n" - - run: - name: Run dtests (j8_with_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j8_with_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j8_with_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_with_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j8_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j8_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j8_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_cqlshlib_tests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run cqlshlib Unit Tests - command: | - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra/ - ant jar -Dno-checkstyle=true -Drat.skip=true -Dant.gen-doc.skip=true -Djavadoc.skip=true - ./pylib/cassandra-cqlsh-tests.sh $(pwd) - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/pylib - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_jvm_dtests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_JVM_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_JVM_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_JVM_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-jvm-dtest-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-jvm-dtest-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_dtests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_without_vnodes_raw /tmp/all_dtest_tests_j11_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_without_vnodes_raw > /tmp/all_dtest_tests_j11_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_without_vnodes > /tmp/split_dtest_tests_j11_without_vnodes.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\n" - - run: - name: Run dtests (j11_without_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j11_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_repeated_ant_test: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - attach_workspace: at: /home/cassandra - run: @@ -8922,37 +4306,74 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_utests_long: + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_cqlsh_dtests_py3: docker: - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 1 + parallelism: 4 steps: - attach_workspace: at: /home/cassandra - run: - name: Run Unit Tests (long-test) + name: Clone Cassandra dtest Repository (via git) command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant long-test -Dno-build-test=true + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j11_without_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_without_vnodes_raw /tmp/all_dtest_tests_j11_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_without_vnodes_raw > /tmp/all_dtest_tests_j11_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_without_vnodes > /tmp/split_dtest_tests_j11_without_vnodes.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\n" + - run: + name: Run dtests (j11_without_vnodes) no_output_timeout: 15m + command: | + echo "cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt" + cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt + + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then + export CQLSH_PYTHON=/usr/bin/python3.6 + fi + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + # 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 + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt` + if [ ! -z "$SPLIT_TESTS" ]; then + set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + else + echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" + (exit 1) + fi - store_test_results: - path: /tmp/cassandra/build/test/output/ + path: /tmp/results - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml + path: /tmp/dtest + destination: dtest_j11_without_vnodes - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs + path: ~/cassandra-dtest/logs + destination: dtest_j11_without_vnodes_logs environment: - ANT_HOME: /usr/share/ant - LANG: en_US.UTF-8 @@ -8993,9 +4414,116 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_utests_cdc: + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j17_build: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 1 + steps: + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Clone Cassandra Repository (via git) + command: | + git clone --single-branch --depth 1 --branch $CIRCLE_BRANCH https://github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME.git ~/cassandra + - run: + name: Build Cassandra + command: | + export PATH=$JAVA_HOME/bin:$PATH + cd ~/cassandra + # Loop to prevent failure due to maven-ant-tasks not downloading a jar.. + for x in $(seq 1 3); do + ${ANT_HOME}/bin/ant clean realclean jar + RETURN="$?" + if [ "${RETURN}" -eq "0" ]; then + break + fi + done + # Exit, if we didn't build successfully + if [ "${RETURN}" -ne "0" ]; then + echo "Build failed with exit code: ${RETURN}" + exit ${RETURN} + fi + no_output_timeout: 15m + - run: + name: Run static code analysis + command: | + export PATH=$JAVA_HOME/bin:$PATH + cd ~/cassandra + ant check + - persist_to_workspace: + root: /home/cassandra + paths: + - cassandra + - .m2 + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_utests_cdc: docker: - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium @@ -9110,11 +4638,12 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_cqlsh_dtests_py311_offheap: + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j17_utests_cdc_repeat: docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -9123,61 +4652,42 @@ jobs: - attach_workspace: at: /home/cassandra - run: - name: Clone Cassandra dtest Repository (via git) + name: Log Environment Information command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j8_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_dtests_offheap_raw /tmp/all_dtest_tests_j8_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j8_dtests_offheap_raw > /tmp/all_dtest_tests_j8_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_dtests_offheap > /tmp/split_dtest_tests_j8_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j8_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j8_dtests_offheap) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt" - cat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt - - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then - export CQLSH_PYTHON=/usr/bin/python3.11 - fi - + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j8_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-cdc\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-cdc $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - store_test_results: - path: /tmp/results + path: /tmp/results/repeated_utests/output - store_artifacts: - path: /tmp/dtest - destination: dtest_j8_dtests_offheap + path: /tmp/results/repeated_utests/stdout + destination: stdout - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j8_dtests_offheap_logs + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs environment: - ANT_HOME: /usr/share/ant - LANG: en_US.UTF-8 @@ -9218,9 +4728,1097 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_dtests_repeat: + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_utests_fqltool: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 1 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Run Unit Tests (fqltool-test) + command: | + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + ant fqltool-test -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_dtests_offheap_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Run repeated Python DTests + no_output_timeout: 15m + command: | + if [ "${REPEATED_DTESTS}" == "" ]; then + echo "Repeated dtest name hasn't been defined, exiting without running any test" + elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then + echo "Repeated dtest count hasn't been defined, exiting without running any test" + elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then + echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" + else + + # Calculate the number of test iterations to be run by the current parallel runner. + # Since we are running the same test multiple times there is no need to use `circleci tests split`. + count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) + if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then + count=$((count+1)) + fi + + if (($count <= 0)); then + echo "No tests to run in this runner" + else + echo "Running ${REPEATED_DTESTS} $count times" + + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + + tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") + + stop_on_failure_arg="" + if ${REPEATED_TESTS_STOP_ON_FAILURE}; then + stop_on_failure_arg="-x" + fi + + vnodes_args="" + if true; then + vnodes_args="--use-vnodes --num-tokens=16" + fi + + upgrade_arg="" + if false; then + upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" + 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 --use-off-heap-memtables --skip-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt + fi + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_jvm_dtests_vnode: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 1 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Determine distributed Tests to Run + command: | + # reminder: this code (along with all the steps) is independently executed on every circle container + # so the goal here is to get the circleci script to return the tests *this* container will run + # which we do via the `circleci` cli tool. + + rm -fr ~/cassandra-dtest/upgrade_tests + echo "***java tests***" + + # get all of our unit test filenames + set -eo pipefail && circleci tests glob "$HOME/cassandra/test/distributed/**/*.java" > /tmp/all_java_unit_tests.txt + + # split up the unit tests into groups based on the number of containers we have + set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt + set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/distributed/;;g" | grep "Test\.java$" | grep -v upgrade > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" + cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + no_output_timeout: 15m + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Run Unit Tests (testclasslist) + command: | + set -x + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + test_timeout=$(grep 'name="test.distributed.timeout"' build.xml | awk -F'"' '{print $4}' || true) + if [ -z "$test_timeout" ]; then + test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') + fi + ant testclasslist -Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16' -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=distributed -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_dtest_jars_build: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 1 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Build Cassandra DTest jars + command: | + export PATH=$JAVA_HOME/bin:$PATH + cd ~/cassandra + mkdir ~/dtest_jars + git remote add apache https://github.com/apache/cassandra.git + for branch in cassandra-4.0 cassandra-4.1 trunk; do + # check out the correct cassandra version: + git remote set-branches --add apache '$branch' + git fetch --depth 1 apache $branch + git checkout $branch + git clean -fd + # Loop to prevent failure due to maven-ant-tasks not downloading a jar.. + for x in $(seq 1 3); do + ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar -Dno-checkstyle=true -Drat.skip=true + RETURN="$?" + if [ "${RETURN}" -eq "0" ]; then + cp build/dtest*.jar ~/dtest_jars + break + fi + done + # Exit, if we didn't build successfully + if [ "${RETURN}" -ne "0" ]; then + echo "Build failed with exit code: ${RETURN}" + exit ${RETURN} + fi + done + # and build the dtest-jar for the branch under test + ${ANT_HOME}/bin/ant realclean + git checkout origin/$CIRCLE_BRANCH + git clean -fd + for x in $(seq 1 3); do + ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar -Dno-checkstyle=true -Drat.skip=true + RETURN="$?" + if [ "${RETURN}" -eq "0" ]; then + cp build/dtest*.jar ~/dtest_jars + break + fi + done + # Exit, if we didn't build successfully + if [ "${RETURN}" -ne "0" ]; then + echo "Build failed with exit code: ${RETURN}" + exit ${RETURN} + fi + ls -l ~/dtest_jars + no_output_timeout: 15m + - persist_to_workspace: + root: /home/cassandra + paths: + - dtest_jars + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_utests_long: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 1 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Run Unit Tests (long-test) + command: | + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + ant long-test -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j17_unit_tests_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=testsome\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant testsome $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + - store_test_results: + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_simulator_dtests: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 1 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Determine unit Tests to Run + command: | + # reminder: this code (along with all the steps) is independently executed on every circle container + # so the goal here is to get the circleci script to return the tests *this* container will run + # which we do via the `circleci` cli tool. + + rm -fr ~/cassandra-dtest/upgrade_tests + echo "***java tests***" + + # get all of our unit test filenames + set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt + + # split up the unit tests into groups based on the number of containers we have + set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt + set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" + cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + no_output_timeout: 15m + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Run Simulator Tests + command: | + set -x + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + ant test-simulator-dtest -Dno-build-test=true + no_output_timeout: 30m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_jvm_upgrade_dtests: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 1 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Determine distributed Tests to Run + command: | + # reminder: this code (along with all the steps) is independently executed on every circle container + # so the goal here is to get the circleci script to return the tests *this* container will run + # which we do via the `circleci` cli tool. + + rm -fr ~/cassandra-dtest/upgrade_tests + echo "***java tests***" + + # get all of our unit test filenames + set -eo pipefail && circleci tests glob "$HOME/cassandra/test/distributed/**/*.java" > /tmp/all_java_unit_tests.txt + + # split up the unit tests into groups based on the number of containers we have + set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt + set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/distributed/;;g" | grep "Test\.java$" | grep upgrade > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" + cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + no_output_timeout: 15m + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Run Unit Tests (testclasslist) + command: | + set -x + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + test_timeout=$(grep 'name="test.distributed.timeout"' build.xml | awk -F'"' '{print $4}' || true) + if [ -z "$test_timeout" ]; then + test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') + fi + ant testclasslist -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=distributed -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_utests_stress: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 1 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Run Unit Tests (stress-test) + command: | + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + ant stress-test -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_utests_cdc_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-cdc\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-cdc $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + - store_test_results: + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j17_dtests_vnode: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j17_with_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_with_vnodes_raw /tmp/all_dtest_tests_j17_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_with_vnodes_raw > /tmp/all_dtest_tests_j17_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_with_vnodes > /tmp/split_dtest_tests_j17_with_vnodes.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes_final.txt\n" + - run: + name: Run dtests (j17_with_vnodes) + no_output_timeout: 15m + command: "echo \"cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j17_with_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j17_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j17_with_vnodes + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j17_with_vnodes_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_dtests_repeat: docker: - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium @@ -9350,9 +5948,2201 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_jvm_dtests: + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_utests_compression: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Determine unit Tests to Run + command: | + # reminder: this code (along with all the steps) is independently executed on every circle container + # so the goal here is to get the circleci script to return the tests *this* container will run + # which we do via the `circleci` cli tool. + + rm -fr ~/cassandra-dtest/upgrade_tests + echo "***java tests***" + + # get all of our unit test filenames + set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt + + # split up the unit tests into groups based on the number of containers we have + set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt + set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" + cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + no_output_timeout: 15m + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Run Unit Tests (testclasslist-compression) + command: | + set -x + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) + if [ -z "$test_timeout" ]; then + test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') + fi + ant testclasslist-compression -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j17_utests_trie_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-trie\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-trie $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + - store_test_results: + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_cqlsh_dtests_py3_offheap: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j11_dtests_offheap) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_dtests_offheap_raw /tmp/all_dtest_tests_j11_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j11_dtests_offheap_raw > /tmp/all_dtest_tests_j11_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_dtests_offheap > /tmp/split_dtest_tests_j11_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\n" + - run: + name: Run dtests (j11_dtests_offheap) + no_output_timeout: 15m + command: | + echo "cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt" + cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt + + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then + export CQLSH_PYTHON=/usr/bin/python3.6 + fi + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + # 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 + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt` + if [ ! -z "$SPLIT_TESTS" ]; then + set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + else + echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" + (exit 1) + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j11_dtests_offheap + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j11_dtests_offheap_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_cqlsh_dtests_py311_offheap: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.11/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j11_dtests_offheap) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_dtests_offheap_raw /tmp/all_dtest_tests_j11_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j11_dtests_offheap_raw > /tmp/all_dtest_tests_j11_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_dtests_offheap > /tmp/split_dtest_tests_j11_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\n" + - run: + name: Run dtests (j11_dtests_offheap) + no_output_timeout: 15m + command: | + echo "cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt" + cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt + + source ~/env3.11/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then + export CQLSH_PYTHON=/usr/bin/python3.11 + fi + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + # 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 + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt` + if [ ! -z "$SPLIT_TESTS" ]; then + set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + else + echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" + (exit 1) + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j11_dtests_offheap + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j11_dtests_offheap_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_utests_trie: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Determine unit Tests to Run + command: | + # reminder: this code (along with all the steps) is independently executed on every circle container + # so the goal here is to get the circleci script to return the tests *this* container will run + # which we do via the `circleci` cli tool. + + rm -fr ~/cassandra-dtest/upgrade_tests + echo "***java tests***" + + # get all of our unit test filenames + set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt + + # split up the unit tests into groups based on the number of containers we have + set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt + set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" + cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + no_output_timeout: 15m + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Run Unit Tests (testclasslist-trie) + command: | + set -x + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) + if [ -z "$test_timeout" ]; then + test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') + fi + ant testclasslist-trie -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_upgrade_dtests: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j11_upgradetests_without_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_upgradetests_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --execute-upgrade-tests-only --upgrade-target-version-only --upgrade-version-selection all --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_upgradetests_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_upgradetests_without_vnodes_raw /tmp/all_dtest_tests_j11_upgradetests_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_upgradetests_without_vnodes_raw > /tmp/all_dtest_tests_j11_upgradetests_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_upgradetests_without_vnodes > /tmp/split_dtest_tests_j11_upgradetests_without_vnodes.txt\ncat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt\n" + - run: + name: Run dtests (j11_upgradetests_without_vnodes) + no_output_timeout: 15m + command: "echo \"cat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --execute-upgrade-tests-only --upgrade-target-version-only --upgrade-version-selection all --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j11_upgradetests_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j11_upgradetests_without_vnodes + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j11_upgradetests_without_vnodes_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_dtests_large_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Run repeated Python DTests + no_output_timeout: 15m + command: | + if [ "${REPEATED_LARGE_DTESTS}" == "" ]; then + echo "Repeated dtest name hasn't been defined, exiting without running any test" + elif [ "${REPEATED_LARGE_DTESTS_COUNT}" == "" ]; then + echo "Repeated dtest count hasn't been defined, exiting without running any test" + elif [ "${REPEATED_LARGE_DTESTS_COUNT}" -le 0 ]; then + echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" + else + + # Calculate the number of test iterations to be run by the current parallel runner. + # Since we are running the same test multiple times there is no need to use `circleci tests split`. + count=$((${REPEATED_LARGE_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) + if (($CIRCLE_NODE_INDEX < (${REPEATED_LARGE_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then + count=$((count+1)) + fi + + if (($count <= 0)); then + echo "No tests to run in this runner" + else + echo "Running ${REPEATED_LARGE_DTESTS} $count times" + + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + + tests_arg=$(echo ${REPEATED_LARGE_DTESTS} | sed -e "s/,/ /g") + + stop_on_failure_arg="" + if ${REPEATED_TESTS_STOP_ON_FAILURE}; then + stop_on_failure_arg="-x" + fi + + vnodes_args="" + if false; then + vnodes_args="--use-vnodes --num-tokens=16" + fi + + upgrade_arg="" + if false; then + upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" + 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 --only-resource-intensive-tests --force-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt + fi + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j17_utests_compression_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-compression\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-compression $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + - store_test_results: + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_cqlsh_dtests_py3_vnode: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j11_with_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_with_vnodes_raw /tmp/all_dtest_tests_j11_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_with_vnodes_raw > /tmp/all_dtest_tests_j11_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_with_vnodes > /tmp/split_dtest_tests_j11_with_vnodes.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n" + - run: + name: Run dtests (j11_with_vnodes) + no_output_timeout: 15m + command: | + echo "cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt" + cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt + + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then + export CQLSH_PYTHON=/usr/bin/python3.6 + fi + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + # 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 + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt` + if [ ! -z "$SPLIT_TESTS" ]; then + set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + else + echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" + (exit 1) + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j11_with_vnodes + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j11_with_vnodes_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j17_utests_fqltool: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 1 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Run Unit Tests (fqltool-test) + command: | + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + ant fqltool-test -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_dtests_large_vnode: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j17_large_with_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_large_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --only-resource-intensive-tests --force-resource-intensive-tests --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_large_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_large_with_vnodes_raw /tmp/all_dtest_tests_j17_large_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_large_with_vnodes_raw > /tmp/all_dtest_tests_j17_large_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_large_with_vnodes > /tmp/split_dtest_tests_j17_large_with_vnodes.txt\ncat /tmp/split_dtest_tests_j17_large_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_large_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_large_with_vnodes_final.txt\n" + - run: + name: Run dtests (j17_large_with_vnodes) + no_output_timeout: 15m + command: "echo \"cat /tmp/split_dtest_tests_j17_large_with_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j17_large_with_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_large_with_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --only-resource-intensive-tests --force-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j17_large_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j17_large_with_vnodes + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j17_large_with_vnodes_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_dtests_offheap: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j11_dtests_offheap) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_dtests_offheap_raw /tmp/all_dtest_tests_j11_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j11_dtests_offheap_raw > /tmp/all_dtest_tests_j11_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_dtests_offheap > /tmp/split_dtest_tests_j11_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\n" + - run: + name: Run dtests (j11_dtests_offheap) + no_output_timeout: 15m + command: "echo \"cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\"\ncat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j11_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j11_dtests_offheap + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j11_dtests_offheap_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_cqlsh_dtests_py38_vnode: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.8/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j11_with_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_with_vnodes_raw /tmp/all_dtest_tests_j11_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_with_vnodes_raw > /tmp/all_dtest_tests_j11_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_with_vnodes > /tmp/split_dtest_tests_j11_with_vnodes.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n" + - run: + name: Run dtests (j11_with_vnodes) + no_output_timeout: 15m + command: | + echo "cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt" + cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt + + source ~/env3.8/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then + export CQLSH_PYTHON=/usr/bin/python3.8 + fi + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + # 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 + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt` + if [ ! -z "$SPLIT_TESTS" ]; then + set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + else + echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" + (exit 1) + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j11_with_vnodes + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j11_with_vnodes_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_utests_trie_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-trie\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-trie $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + - store_test_results: + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_simulator_dtests_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_SIMULATOR_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_SIMULATOR_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_SIMULATOR_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-simulator-dtest\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-simulator-dtest $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + - store_test_results: + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_jvm_dtests_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_JVM_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_JVM_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_JVM_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-jvm-dtest-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-jvm-dtest-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + - store_test_results: + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j17_cqlsh_dtests_py38_offheap: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.8/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j17_dtests_offheap) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_dtests_offheap_raw /tmp/all_dtest_tests_j17_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j17_dtests_offheap_raw > /tmp/all_dtest_tests_j17_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_dtests_offheap > /tmp/split_dtest_tests_j17_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\n" + - run: + name: Run dtests (j17_dtests_offheap) + no_output_timeout: 15m + command: | + echo "cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt" + cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt + + source ~/env3.8/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then + export CQLSH_PYTHON=/usr/bin/python3.8 + fi + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + # 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 + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt` + if [ ! -z "$SPLIT_TESTS" ]; then + set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + else + echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" + (exit 1) + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j17_dtests_offheap + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j17_dtests_offheap_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_cqlshlib_tests: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 1 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Run cqlshlib Unit Tests + command: | + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra/ + ant jar -Dno-checkstyle=true -Drat.skip=true -Dant.gen-doc.skip=true -Djavadoc.skip=true + ./pylib/cassandra-cqlsh-tests.sh $(pwd) + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/pylib + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_cqlsh_dtests_py311_vnode: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.11/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j11_with_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_with_vnodes_raw /tmp/all_dtest_tests_j11_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_with_vnodes_raw > /tmp/all_dtest_tests_j11_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_with_vnodes > /tmp/split_dtest_tests_j11_with_vnodes.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n" + - run: + name: Run dtests (j11_with_vnodes) + no_output_timeout: 15m + command: | + echo "cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt" + cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt + + source ~/env3.11/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then + export CQLSH_PYTHON=/usr/bin/python3.11 + fi + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + # 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 + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt` + if [ ! -z "$SPLIT_TESTS" ]; then + set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + else + echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" + (exit 1) + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j11_with_vnodes + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j11_with_vnodes_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j17_utests_system_keyspace_directory: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Determine unit Tests to Run + command: | + # reminder: this code (along with all the steps) is independently executed on every circle container + # so the goal here is to get the circleci script to return the tests *this* container will run + # which we do via the `circleci` cli tool. + + rm -fr ~/cassandra-dtest/upgrade_tests + echo "***java tests***" + + # get all of our unit test filenames + set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt + + # split up the unit tests into groups based on the number of containers we have + set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt + set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" + cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + no_output_timeout: 15m + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Run Unit Tests (testclasslist-system-keyspace-directory) + command: | + set -x + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) + if [ -z "$test_timeout" ]; then + test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') + fi + ant testclasslist-system-keyspace-directory -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_cqlsh_dtests_py3_vnode: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j17_with_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_with_vnodes_raw /tmp/all_dtest_tests_j17_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_with_vnodes_raw > /tmp/all_dtest_tests_j17_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_with_vnodes > /tmp/split_dtest_tests_j17_with_vnodes.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes_final.txt\n" + - run: + name: Run dtests (j17_with_vnodes) + no_output_timeout: 15m + command: | + echo "cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt" + cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt + + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then + export CQLSH_PYTHON=/usr/bin/python3.6 + fi + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + # 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 + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt` + if [ ! -z "$SPLIT_TESTS" ]; then + set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + else + echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" + (exit 1) + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j17_with_vnodes + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j17_with_vnodes_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_cqlsh_dtests_py311_vnode: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.11/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j17_with_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_with_vnodes_raw /tmp/all_dtest_tests_j17_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_with_vnodes_raw > /tmp/all_dtest_tests_j17_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_with_vnodes > /tmp/split_dtest_tests_j17_with_vnodes.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes_final.txt\n" + - run: + name: Run dtests (j17_with_vnodes) + no_output_timeout: 15m + command: | + echo "cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt" + cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt + + source ~/env3.11/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then + export CQLSH_PYTHON=/usr/bin/python3.11 + fi + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + # 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 + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt` + if [ ! -z "$SPLIT_TESTS" ]; then + set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + else + echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" + (exit 1) + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j17_with_vnodes + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j17_with_vnodes_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_jvm_dtests: docker: - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium @@ -9467,9 +8257,171 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_build: + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j17_utests_stress: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 1 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Run Unit Tests (stress-test) + command: | + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + ant stress-test -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_jvm_dtests_vnode_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_JVM_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_JVM_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_JVM_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=true\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-jvm-dtest-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-jvm-dtest-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + - store_test_results: + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_build: docker: - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium @@ -9573,9 +8525,10 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_cqlsh_dtests_py38_vnode: + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_utests_oa_repeat: docker: - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium @@ -9586,61 +8539,42 @@ jobs: - attach_workspace: at: /home/cassandra - run: - name: Clone Cassandra dtest Repository (via git) + name: Log Environment Information command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j8_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_with_vnodes_raw /tmp/all_dtest_tests_j8_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j8_with_vnodes_raw > /tmp/all_dtest_tests_j8_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_with_vnodes > /tmp/split_dtest_tests_j8_with_vnodes.txt\ncat /tmp/split_dtest_tests_j8_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j8_with_vnodes_final.txt\n" - - run: - name: Run dtests (j8_with_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j8_with_vnodes_final.txt" - cat /tmp/split_dtest_tests_j8_with_vnodes_final.txt - - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then - export CQLSH_PYTHON=/usr/bin/python3.8 - fi - + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_with_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j8_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-oa\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-oa $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - store_test_results: - path: /tmp/results + path: /tmp/results/repeated_utests/output - store_artifacts: - path: /tmp/dtest - destination: dtest_j8_with_vnodes + path: /tmp/results/repeated_utests/stdout + destination: stdout - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j8_with_vnodes_logs + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs environment: - ANT_HOME: /usr/share/ant - LANG: en_US.UTF-8 @@ -9681,14 +8615,679 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_unit_tests_repeat: + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_cqlshlib_tests: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 1 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Run cqlshlib Unit Tests + command: | + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra/ + ant jar -Dno-checkstyle=true -Drat.skip=true -Dant.gen-doc.skip=true -Djavadoc.skip=true + ./pylib/cassandra-cqlsh-tests.sh $(pwd) + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/pylib + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_dtests: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j11_without_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_without_vnodes_raw /tmp/all_dtest_tests_j11_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_without_vnodes_raw > /tmp/all_dtest_tests_j11_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_without_vnodes > /tmp/split_dtest_tests_j11_without_vnodes.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\n" + - run: + name: Run dtests (j11_without_vnodes) + no_output_timeout: 15m + command: "echo \"cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j11_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j11_without_vnodes + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j11_without_vnodes_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j17_jvm_dtests_vnode: docker: - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l + parallelism: 1 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Determine distributed Tests to Run + command: | + # reminder: this code (along with all the steps) is independently executed on every circle container + # so the goal here is to get the circleci script to return the tests *this* container will run + # which we do via the `circleci` cli tool. + + rm -fr ~/cassandra-dtest/upgrade_tests + echo "***java tests***" + + # get all of our unit test filenames + set -eo pipefail && circleci tests glob "$HOME/cassandra/test/distributed/**/*.java" > /tmp/all_java_unit_tests.txt + + # split up the unit tests into groups based on the number of containers we have + set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt + set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/distributed/;;g" | grep "Test\.java$" | grep -v upgrade > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" + cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + no_output_timeout: 15m + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Run Unit Tests (testclasslist) + command: | + set -x + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + test_timeout=$(grep 'name="test.distributed.timeout"' build.xml | awk -F'"' '{print $4}' || true) + if [ -z "$test_timeout" ]; then + test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') + fi + ant testclasslist -Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16' -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=distributed -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_cqlsh_dtests_py38: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.8/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j17_without_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_without_vnodes_raw /tmp/all_dtest_tests_j17_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_without_vnodes_raw > /tmp/all_dtest_tests_j17_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_without_vnodes > /tmp/split_dtest_tests_j17_without_vnodes.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes_final.txt\n" + - run: + name: Run dtests (j17_without_vnodes) + no_output_timeout: 15m + command: | + echo "cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt" + cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt + + source ~/env3.8/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then + export CQLSH_PYTHON=/usr/bin/python3.8 + fi + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + # 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 + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt` + if [ ! -z "$SPLIT_TESTS" ]; then + set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + else + echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" + (exit 1) + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j17_without_vnodes + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j17_without_vnodes_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_utests_cdc: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Determine unit Tests to Run + command: | + # reminder: this code (along with all the steps) is independently executed on every circle container + # so the goal here is to get the circleci script to return the tests *this* container will run + # which we do via the `circleci` cli tool. + + rm -fr ~/cassandra-dtest/upgrade_tests + echo "***java tests***" + + # get all of our unit test filenames + set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt + + # split up the unit tests into groups based on the number of containers we have + set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt + set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" + cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + no_output_timeout: 15m + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Run Unit Tests (testclasslist-cdc) + command: | + set -x + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) + if [ -z "$test_timeout" ]; then + test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') + fi + ant testclasslist-cdc -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_utests_fqltool_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_FQLTOOL_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_FQLTOOL_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS_FQLTOOL} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=fqltool-test\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant fqltool-test $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + - store_test_results: + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_dtests_large: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j17_large_without_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_large_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --only-resource-intensive-tests --force-resource-intensive-tests --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_large_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_large_without_vnodes_raw /tmp/all_dtest_tests_j17_large_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_large_without_vnodes_raw > /tmp/all_dtest_tests_j17_large_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_large_without_vnodes > /tmp/split_dtest_tests_j17_large_without_vnodes.txt\ncat /tmp/split_dtest_tests_j17_large_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_large_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_large_without_vnodes_final.txt\n" + - run: + name: Run dtests (j17_large_without_vnodes) + no_output_timeout: 15m + command: "echo \"cat /tmp/split_dtest_tests_j17_large_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j17_large_without_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_large_without_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --only-resource-intensive-tests --force-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j17_large_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j17_large_without_vnodes + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j17_large_without_vnodes_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_unit_tests_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l parallelism: 4 steps: - attach_workspace: @@ -9773,9 +9372,9 @@ jobs: - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - CASSANDRA_USE_JDK11: true - j8_utests_fqltool: + j17_utests_long: docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -9784,7 +9383,7 @@ jobs: - attach_workspace: at: /home/cassandra - run: - name: Run Unit Tests (fqltool-test) + name: Run Unit Tests (long-test) command: | export PATH=$JAVA_HOME/bin:$PATH time mv ~/cassandra /tmp @@ -9792,7 +9391,7 @@ jobs: if [ -d ~/dtest_jars ]; then cp ~/dtest_jars/dtest* /tmp/cassandra/build/ fi - ant fqltool-test -Dno-build-test=true + ant long-test -Dno-build-test=true no_output_timeout: 15m - store_test_results: path: /tmp/cassandra/build/test/output/ @@ -9842,29 +9441,55 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_cqlshlib_tests: + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_utests_oa_repeat: docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 1 + parallelism: 4 steps: - attach_workspace: at: /home/cassandra - run: - name: Run cqlshlib Unit Tests + name: Log Environment Information command: | - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra/ - ant jar -Dno-checkstyle=true -Drat.skip=true -Dant.gen-doc.skip=true -Djavadoc.skip=true - ./pylib/cassandra-cqlsh-tests.sh $(pwd) + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-oa\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-oa $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - store_test_results: - path: /tmp/cassandra/pylib + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs environment: - ANT_HOME: /usr/share/ant - LANG: en_US.UTF-8 @@ -9905,11 +9530,11 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 j11_dtests_vnode: docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -9917,28 +9542,6 @@ jobs: steps: - attach_workspace: at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - run: name: Clone Cassandra dtest Repository (via git) command: | @@ -10014,9 +9617,9 @@ jobs: - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - CASSANDRA_USE_JDK11: true - j8_utests_cdc_repeat: + j17_jvm_dtests_repeat: docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -10049,7 +9652,7 @@ jobs: - run: name: Repeatedly run new or modifed JUnit tests no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-cdc\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-cdc $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_JVM_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_JVM_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_JVM_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-jvm-dtest-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-jvm-dtest-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - store_test_results: path: /tmp/results/repeated_utests/output - store_artifacts: @@ -10101,11 +9704,117 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_dtests_large_vnode_repeat: + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_dtests_offheap: docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j17_dtests_offheap) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_dtests_offheap_raw /tmp/all_dtest_tests_j17_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j17_dtests_offheap_raw > /tmp/all_dtest_tests_j17_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_dtests_offheap > /tmp/split_dtest_tests_j17_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\n" + - run: + name: Run dtests (j17_dtests_offheap) + no_output_timeout: 15m + command: "echo \"cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\"\ncat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j17_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j17_dtests_offheap + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j17_dtests_offheap_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_dtests_large_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -10172,7 +9881,7 @@ jobs: fi vnodes_args="" - if true; then + if false; then vnodes_args="--use-vnodes --num-tokens=16" fi @@ -10233,9 +9942,9 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_utests_long_repeat: + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_utests_long_repeat: docker: - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium @@ -10322,543 +10031,100 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_utests_long_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_LONG_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_LONG_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS_LONG} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=long-testsome\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant long-testsome $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + - store_test_results: + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - CASSANDRA_USE_JDK11: true workflows: version: 2 - java8_separate_tests: - jobs: - - start_j8_build: - type: approval - - j8_build: - requires: - - start_j8_build - - start_j8_unit_tests: - type: approval - - j8_unit_tests: - requires: - - start_j8_unit_tests - - j8_build - - start_j8_jvm_dtests: - type: approval - - j8_jvm_dtests: - requires: - - start_j8_jvm_dtests - - j8_build - - start_j8_jvm_dtests_vnode: - type: approval - - j8_jvm_dtests_vnode: - requires: - - start_j8_jvm_dtests_vnode - - j8_build - - start_j11_jvm_dtests: - type: approval - - j11_jvm_dtests: - requires: - - start_j11_jvm_dtests - - j8_build - - start_j11_jvm_dtests_vnode: - type: approval - - j11_jvm_dtests_vnode: - requires: - - start_j11_jvm_dtests_vnode - - j8_build - - start_j8_simulator_dtests: - type: approval - - j8_simulator_dtests: - requires: - - start_j8_simulator_dtests - - j8_build - - start_j8_cqlshlib_tests: - type: approval - - j8_cqlshlib_tests: - requires: - - start_j8_cqlshlib_tests - - j8_build - - start_j8_cqlshlib_cython_tests: - type: approval - - j8_cqlshlib_cython_tests: - requires: - - start_j8_cqlshlib_cython_tests - - j8_build - - start_j11_cqlshlib_tests: - type: approval - - j11_cqlshlib_tests: - requires: - - start_j11_cqlshlib_tests - - j8_build - - start_j11_cqlshlib_cython_tests: - type: approval - - j11_cqlshlib_cython_tests: - requires: - - start_j11_cqlshlib_cython_tests - - j8_build - - start_j11_unit_tests: - type: approval - - j11_unit_tests: - requires: - - start_j11_unit_tests - - j8_build - - start_j8_utests_oa: - type: approval - - j8_utests_oa: - requires: - - start_j8_utests_oa - - j8_build - - start_j11_utests_oa: - type: approval - - j11_utests_oa: - requires: - - start_j11_utests_oa - - j8_build - - start_j8_utests_long: - type: approval - - j8_utests_long: - requires: - - start_j8_utests_long - - j8_build - - start_j11_utests_long: - type: approval - - j11_utests_long: - requires: - - start_j11_utests_long - - j8_build - - start_j8_utests_cdc: - type: approval - - j8_utests_cdc: - requires: - - start_j8_utests_cdc - - j8_build - - start_j11_utests_cdc: - type: approval - - j11_utests_cdc: - requires: - - start_j11_utests_cdc - - j8_build - - start_j8_utests_compression: - type: approval - - j8_utests_compression: - requires: - - start_j8_utests_compression - - j8_build - - start_j11_utests_compression: - type: approval - - j11_utests_compression: - requires: - - start_j11_utests_compression - - j8_build - - start_j8_utests_trie: - type: approval - - j8_utests_trie: - requires: - - start_j8_utests_trie - - j8_build - - start_j11_utests_trie: - type: approval - - j11_utests_trie: - requires: - - start_j11_utests_trie - - j8_build - - start_j8_utests_stress: - type: approval - - j8_utests_stress: - requires: - - start_j8_utests_stress - - j8_build - - start_j11_utests_stress: - type: approval - - j11_utests_stress: - requires: - - start_j11_utests_stress - - j8_build - - start_j8_utests_fqltool: - type: approval - - j8_utests_fqltool: - requires: - - start_j8_utests_fqltool - - j8_build - - start_j11_utests_fqltool: - type: approval - - j11_utests_fqltool: - requires: - - start_j11_utests_fqltool - - j8_build - - start_j8_utests_system_keyspace_directory: - type: approval - - j8_utests_system_keyspace_directory: - requires: - - start_j8_utests_system_keyspace_directory - - j8_build - - start_j11_utests_system_keyspace_directory: - type: approval - - j11_utests_system_keyspace_directory: - requires: - - start_j11_utests_system_keyspace_directory - - j8_build - - start_j8_dtests: - type: approval - - j8_dtests: - requires: - - start_j8_dtests - - j8_build - - start_j8_dtests_vnode: - type: approval - - j8_dtests_vnode: - requires: - - start_j8_dtests_vnode - - j8_build - - start_j8_dtests_offheap: - type: approval - - j8_dtests_offheap: - requires: - - start_j8_dtests_offheap - - j8_build - - start_j11_dtests: - type: approval - - j11_dtests: - requires: - - start_j11_dtests - - j8_build - - start_j11_dtests_vnode: - type: approval - - j11_dtests_vnode: - requires: - - start_j11_dtests_vnode - - j8_build - - start_j11_dtests_offheap: - type: approval - - j11_dtests_offheap: - requires: - - start_j11_dtests_offheap - - j8_build - - start_j8_dtests_large: - type: approval - - j8_dtests_large: - requires: - - start_j8_dtests_large - - j8_build - - start_j8_dtests_large_vnode: - type: approval - - j8_dtests_large_vnode: - requires: - - start_j8_dtests_large_vnode - - j8_build - - start_j11_dtests_large: - type: approval - - j11_dtests_large: - requires: - - start_j11_dtests_large - - j8_build - - start_j11_dtests_large_vnode: - type: approval - - j11_dtests_large_vnode: - requires: - - start_j11_dtests_large_vnode - - j8_build - - start_j8_cqlsh_tests: - type: approval - - j8_cqlsh_dtests_py3: - requires: - - start_j8_cqlsh_tests - - j8_build - - j8_cqlsh_dtests_py3_vnode: - requires: - - start_j8_cqlsh_tests - - j8_build - - j8_cqlsh_dtests_py38: - requires: - - start_j8_cqlsh_tests - - j8_build - - j8_cqlsh_dtests_py311: - requires: - - start_j8_cqlsh_tests - - j8_build - - j8_cqlsh_dtests_py38_vnode: - requires: - - start_j8_cqlsh_tests - - j8_build - - j8_cqlsh_dtests_py311_vnode: - requires: - - start_j8_cqlsh_tests - - j8_build - - start_j8_cqlsh_tests_offheap: - type: approval - - j8_cqlsh_dtests_py3_offheap: - requires: - - start_j8_cqlsh_tests_offheap - - j8_build - - j8_cqlsh_dtests_py38_offheap: - requires: - - start_j8_cqlsh_tests_offheap - - j8_build - - j8_cqlsh_dtests_py311_offheap: - requires: - - start_j8_cqlsh_tests_offheap - - j8_build - - start_j11_cqlsh_tests: - type: approval - - j11_cqlsh_dtests_py3: - requires: - - start_j11_cqlsh_tests - - j8_build - - j11_cqlsh_dtests_py3_vnode: - requires: - - start_j11_cqlsh_tests - - j8_build - - j11_cqlsh_dtests_py38: - requires: - - start_j11_cqlsh_tests - - j8_build - - j11_cqlsh_dtests_py311: - requires: - - start_j11_cqlsh_tests - - j8_build - - j11_cqlsh_dtests_py38_vnode: - requires: - - start_j11_cqlsh_tests - - j8_build - - j11_cqlsh_dtests_py311_vnode: - requires: - - start_j11_cqlsh_tests - - j8_build - - start_j11_cqlsh_tests_offheap: - type: approval - - j11_cqlsh_dtests_py3_offheap: - requires: - - start_j11_cqlsh_tests_offheap - - j8_build - - j11_cqlsh_dtests_py38_offheap: - requires: - - start_j11_cqlsh_tests_offheap - - j8_build - - j11_cqlsh_dtests_py311_offheap: - requires: - - start_j11_cqlsh_tests_offheap - - j8_build - java8_pre-commit_tests: - jobs: - - start_pre-commit_tests: - type: approval - - j8_build: - requires: - - start_pre-commit_tests - - j8_unit_tests: - requires: - - j8_build - - j8_utests_oa: - requires: - - j8_build - - j8_simulator_dtests: - requires: - - j8_build - - j8_jvm_dtests: - requires: - - j8_build - - j8_jvm_dtests_vnode: - requires: - - j8_build - - j11_jvm_dtests: - requires: - - j8_build - - j11_jvm_dtests_vnode: - requires: - - j8_build - - j8_cqlshlib_tests: - requires: - - j8_build - - j8_cqlshlib_cython_tests: - requires: - - j8_build - - j11_cqlshlib_tests: - requires: - - j8_build - - j11_cqlshlib_cython_tests: - requires: - - j8_build - - j11_unit_tests: - requires: - - j8_build - - j11_utests_oa: - requires: - - j8_build - - start_utests_long: - type: approval - - j8_utests_long: - requires: - - start_utests_long - - j8_build - - j11_utests_long: - requires: - - start_utests_long - - j8_build - - start_utests_cdc: - type: approval - - j8_utests_cdc: - requires: - - start_utests_cdc - - j8_build - - j11_utests_cdc: - requires: - - start_utests_cdc - - j8_build - - start_utests_compression: - type: approval - - j8_utests_compression: - requires: - - start_utests_compression - - j8_build - - j11_utests_compression: - requires: - - start_utests_compression - - j8_build - - start_utests_trie: - type: approval - - j8_utests_trie: - requires: - - start_utests_trie - - j8_build - - j11_utests_trie: - requires: - - start_utests_trie - - j8_build - - start_utests_stress: - type: approval - - j8_utests_stress: - requires: - - start_utests_stress - - j8_build - - j11_utests_stress: - requires: - - start_utests_stress - - j8_build - - start_utests_fqltool: - type: approval - - j8_utests_fqltool: - requires: - - start_utests_fqltool - - j8_build - - j11_utests_fqltool: - requires: - - start_utests_fqltool - - j8_build - - start_utests_system_keyspace_directory: - type: approval - - j8_utests_system_keyspace_directory: - requires: - - j8_build - - j11_utests_system_keyspace_directory: - requires: - - start_utests_system_keyspace_directory - - j8_build - - j8_dtests: - requires: - - j8_build - - j8_dtests_vnode: - requires: - - j8_build - - start_j8_dtests_offheap: - type: approval - - j8_dtests_offheap: - requires: - - start_j8_dtests_offheap - - j8_build - - j11_dtests: - requires: - - j8_build - - j11_dtests_vnode: - requires: - - j8_build - - start_j11_dtests_offheap: - type: approval - - j11_dtests_offheap: - requires: - - start_j11_dtests_offheap - - j8_build - - start_j8_dtests_large: - type: approval - - j8_dtests_large: - requires: - - start_j8_dtests_large - - j8_build - - j8_dtests_large_vnode: - requires: - - start_j8_dtests_large - - j8_build - - start_j11_dtests_large: - type: approval - - j11_dtests_large: - requires: - - start_j11_dtests_large - - j8_build - - j11_dtests_large_vnode: - requires: - - start_j11_dtests_large - - j8_build - - j8_cqlsh_dtests_py3: - requires: - - j8_build - - j8_cqlsh_dtests_py3_vnode: - requires: - - j8_build - - j8_cqlsh_dtests_py38: - requires: - - j8_build - - j8_cqlsh_dtests_py311: - requires: - - j8_build - - j8_cqlsh_dtests_py38_vnode: - requires: - - j8_build - - j8_cqlsh_dtests_py311_vnode: - requires: - - j8_build - - start_j8_cqlsh_dtests_offheap: - type: approval - - j8_cqlsh_dtests_py3_offheap: - requires: - - start_j8_cqlsh_dtests_offheap - - j8_build - - j8_cqlsh_dtests_py38_offheap: - requires: - - start_j8_cqlsh_dtests_offheap - - j8_build - - j8_cqlsh_dtests_py311_offheap: - requires: - - start_j8_cqlsh_dtests_offheap - - j8_build - - j11_cqlsh_dtests_py3: - requires: - - j8_build - - j11_cqlsh_dtests_py3_vnode: - requires: - - j8_build - - j11_cqlsh_dtests_py38: - requires: - - j8_build - - j11_cqlsh_dtests_py311: - requires: - - j8_build - - j11_cqlsh_dtests_py38_vnode: - requires: - - j8_build - - j11_cqlsh_dtests_py311_vnode: - requires: - - j8_build - - start_j11_cqlsh-dtests-offheap: - type: approval - - j11_cqlsh_dtests_py3_offheap: - requires: - - start_j11_cqlsh-dtests-offheap - - j8_build - - j11_cqlsh_dtests_py38_offheap: - requires: - - start_j11_cqlsh-dtests-offheap - - j8_build - - j11_cqlsh_dtests_py311_offheap: - requires: - - start_j11_cqlsh-dtests-offheap - - j8_build java11_separate_tests: jobs: - start_j11_build: @@ -10884,6 +10150,18 @@ workflows: requires: - start_j11_jvm_dtests_vnode - j11_build + - start_j17_jvm_dtests: + type: approval + - j17_jvm_dtests: + requires: + - start_j17_jvm_dtests + - j11_build + - start_j17_jvm_dtests_vnode: + type: approval + - j17_jvm_dtests_vnode: + requires: + - start_j17_jvm_dtests_vnode + - j11_build - start_j11_simulator_dtests: type: approval - j11_simulator_dtests: @@ -10902,6 +10180,132 @@ workflows: requires: - start_j11_cqlshlib_cython_tests - j11_build + - start_j17_cqlshlib_tests: + type: approval + - j17_cqlshlib_tests: + requires: + - start_j17_cqlshlib_tests + - j11_build + - start_j17_cqlshlib_cython_tests: + type: approval + - j17_cqlshlib_cython_tests: + requires: + - start_j17_cqlshlib_cython_tests + - j11_build + - start_j17_unit_tests: + type: approval + - j17_unit_tests: + requires: + - start_j17_unit_tests + - j11_build + - start_j11_utests_oa: + type: approval + - j11_utests_oa: + requires: + - start_j11_utests_oa + - j11_build + - start_j17_utests_oa: + type: approval + - j17_utests_oa: + requires: + - start_j17_utests_oa + - j11_build + - start_j11_utests_long: + type: approval + - j11_utests_long: + requires: + - start_j11_utests_long + - j11_build + - start_j17_utests_long: + type: approval + - j17_utests_long: + requires: + - start_j17_utests_long + - j11_build + - start_j11_utests_cdc: + type: approval + - j11_utests_cdc: + requires: + - start_j11_utests_cdc + - j11_build + - start_j17_utests_cdc: + type: approval + - j17_utests_cdc: + requires: + - start_j17_utests_cdc + - j11_build + - start_j11_utests_compression: + type: approval + - j11_utests_compression: + requires: + - start_j11_utests_compression + - j11_build + - start_j17_utests_compression: + type: approval + - j17_utests_compression: + requires: + - start_j17_utests_compression + - j11_build + - start_j11_utests_trie: + type: approval + - j11_utests_trie: + requires: + - start_j11_utests_trie + - j11_build + - start_j17_utests_trie: + type: approval + - j17_utests_trie: + requires: + - start_j17_utests_trie + - j11_build + - start_j11_utests_stress: + type: approval + - j11_utests_stress: + requires: + - start_j11_utests_stress + - j11_build + - start_j17_utests_stress: + type: approval + - j17_utests_stress: + requires: + - start_j17_utests_stress + - j11_build + - start_j11_utests_fqltool: + type: approval + - j11_utests_fqltool: + requires: + - start_j11_utests_fqltool + - j11_build + - start_j17_utests_fqltool: + type: approval + - j17_utests_fqltool: + requires: + - start_j17_utests_fqltool + - j11_build + - start_j11_utests_system_keyspace_directory: + type: approval + - j11_utests_system_keyspace_directory: + requires: + - start_j11_utests_system_keyspace_directory + - j11_build + - start_j17_utests_system_keyspace_directory: + type: approval + - j17_utests_system_keyspace_directory: + requires: + - start_j17_utests_system_keyspace_directory + - j11_build + - start_j11_dtest_jars_build: + type: approval + - j11_dtest_jars_build: + requires: + - j11_build + - start_j11_dtest_jars_build + - start_jvm_upgrade_dtests: + type: approval + - j11_jvm_upgrade_dtests: + requires: + - start_jvm_upgrade_dtests + - j11_dtest_jars_build - start_j11_dtests: type: approval - j11_dtests: @@ -10920,6 +10324,24 @@ workflows: requires: - start_j11_dtests_offheap - j11_build + - start_j17_dtests: + type: approval + - j17_dtests: + requires: + - start_j17_dtests + - j11_build + - start_j17_dtests_vnode: + type: approval + - j17_dtests_vnode: + requires: + - start_j17_dtests_vnode + - j11_build + - start_j17_dtests_offheap: + type: approval + - j17_dtests_offheap: + requires: + - start_j17_dtests_offheap + - j11_build - start_j11_dtests_large: type: approval - j11_dtests_large: @@ -10932,6 +10354,18 @@ workflows: requires: - start_j11_dtests_large_vnode - j11_build + - start_j17_dtests_large: + type: approval + - j17_dtests_large: + requires: + - start_j17_dtests_large + - j11_build + - start_j17_dtests_large_vnode: + type: approval + - j17_dtests_large_vnode: + requires: + - start_j17_dtests_large_vnode + - j11_build - start_j11_cqlsh_tests: type: approval - j11_cqlsh_dtests_py3: @@ -10958,80 +10392,60 @@ workflows: requires: - start_j11_cqlsh_tests - j11_build - - start_j11_cqlsh-dtests-offheap: + - start_j11_cqlsh_tests_offheap: type: approval - j11_cqlsh_dtests_py3_offheap: requires: - - start_j11_cqlsh-dtests-offheap + - start_j11_cqlsh_tests_offheap - j11_build - j11_cqlsh_dtests_py38_offheap: requires: - - start_j11_cqlsh-dtests-offheap + - start_j11_cqlsh_tests_offheap - j11_build - j11_cqlsh_dtests_py311_offheap: requires: - - start_j11_cqlsh-dtests-offheap + - start_j11_cqlsh_tests_offheap - j11_build - - start_j11_utests_oa: + - start_j17_cqlsh_tests: type: approval - - j11_utests_oa: + - j17_cqlsh_dtests_py3: requires: - - start_j11_utests_oa + - start_j17_cqlsh_tests - j11_build - - start_j11_utests_long: - type: approval - - j11_utests_long: + - j17_cqlsh_dtests_py3_vnode: requires: - - start_j11_utests_long + - start_j17_cqlsh_tests - j11_build - - start_j11_utests_cdc: - type: approval - - j11_utests_cdc: + - j17_cqlsh_dtests_py38: requires: - - start_j11_utests_cdc + - start_j17_cqlsh_tests - j11_build - - start_j11_utests_compression: - type: approval - - j11_utests_compression: + - j17_cqlsh_dtests_py311: requires: - - start_j11_utests_compression + - start_j17_cqlsh_tests - j11_build - - start_j11_utests_trie: - type: approval - - j11_utests_trie: + - j17_cqlsh_dtests_py38_vnode: requires: - - start_j11_utests_trie + - start_j17_cqlsh_tests - j11_build - - start_j11_utests_stress: - type: approval - - j11_utests_stress: + - j17_cqlsh_dtests_py311_vnode: requires: - - start_j11_utests_stress + - start_j17_cqlsh_tests - j11_build - - start_j11_utests_fqltool: + - start_j17_cqlsh_tests_offheap: type: approval - - j11_utests_fqltool: + - j17_cqlsh_dtests_py3_offheap: requires: - - start_j11_utests_fqltool + - start_j17_cqlsh_tests_offheap - j11_build - - start_j11_utests_system_keyspace_directory: - type: approval - - j11_utests_system_keyspace_directory: + - j17_cqlsh_dtests_py38_offheap: requires: - - start_j11_utests_system_keyspace_directory + - start_j17_cqlsh_tests_offheap - j11_build - - start_j11_dtest_jars_build: - type: approval - - j11_dtest_jars_build: + - j17_cqlsh_dtests_py311_offheap: requires: + - start_j17_cqlsh_tests_offheap - j11_build - - start_j11_dtest_jars_build - - start_jvm_upgrade_dtests: - type: approval - - j11_jvm_upgrade_dtests: - requires: - - start_jvm_upgrade_dtests - - j11_dtest_jars_build - start_j11_upgrade_dtests: type: approval - j11_upgrade_dtests: @@ -11051,13 +10465,19 @@ workflows: - j11_utests_oa: requires: - j11_build + - j11_simulator_dtests: + requires: + - j11_build - j11_jvm_dtests: requires: - j11_build - j11_jvm_dtests_vnode: requires: - j11_build - - j11_simulator_dtests: + - j17_jvm_dtests: + requires: + - j11_build + - j17_jvm_dtests_vnode: requires: - j11_build - j11_cqlshlib_tests: @@ -11066,6 +10486,96 @@ workflows: - j11_cqlshlib_cython_tests: requires: - j11_build + - j17_cqlshlib_tests: + requires: + - j11_build + - j17_cqlshlib_cython_tests: + requires: + - j11_build + - j17_unit_tests: + requires: + - j11_build + - j17_utests_oa: + requires: + - j11_build + - start_utests_long: + type: approval + - j11_utests_long: + requires: + - start_utests_long + - j11_build + - j17_utests_long: + requires: + - start_utests_long + - j11_build + - start_utests_cdc: + type: approval + - j11_utests_cdc: + requires: + - start_utests_cdc + - j11_build + - j17_utests_cdc: + requires: + - start_utests_cdc + - j11_build + - start_utests_compression: + type: approval + - j11_utests_compression: + requires: + - start_utests_compression + - j11_build + - j17_utests_compression: + requires: + - start_utests_compression + - j11_build + - start_utests_trie: + type: approval + - j11_utests_trie: + requires: + - start_utests_trie + - j11_build + - j17_utests_trie: + requires: + - start_utests_trie + - j11_build + - start_utests_stress: + type: approval + - j11_utests_stress: + requires: + - start_utests_stress + - j11_build + - j17_utests_stress: + requires: + - start_utests_stress + - j11_build + - start_utests_fqltool: + type: approval + - j11_utests_fqltool: + requires: + - start_utests_fqltool + - j11_build + - j17_utests_fqltool: + requires: + - start_utests_fqltool + - j11_build + - start_utests_system_keyspace_directory: + type: approval + - j11_utests_system_keyspace_directory: + requires: + - j11_build + - j17_utests_system_keyspace_directory: + requires: + - start_utests_system_keyspace_directory + - j11_build + - start_jvm_upgrade_dtests: + type: approval + - j11_dtest_jars_build: + requires: + - j11_build + - start_jvm_upgrade_dtests + - j11_jvm_upgrade_dtests: + requires: + - j11_dtest_jars_build - j11_dtests: requires: - j11_build @@ -11078,6 +10588,18 @@ workflows: requires: - start_j11_dtests_offheap - j11_build + - j17_dtests: + requires: + - j11_build + - j17_dtests_vnode: + requires: + - j11_build + - start_j17_dtests_offheap: + type: approval + - j17_dtests_offheap: + requires: + - start_j17_dtests_offheap + - j11_build - start_j11_dtests_large: type: approval - j11_dtests_large: @@ -11088,6 +10610,16 @@ workflows: requires: - start_j11_dtests_large - j11_build + - start_j17_dtests_large: + type: approval + - j17_dtests_large: + requires: + - start_j17_dtests_large + - j11_build + - j17_dtests_large_vnode: + requires: + - start_j17_dtests_large + - j11_build - j11_cqlsh_dtests_py3: requires: - j11_build @@ -11106,74 +10638,331 @@ workflows: - j11_cqlsh_dtests_py311_vnode: requires: - j11_build - - start_j11_cqlsh-dtests-offheap: + - start_j11_cqlsh_dtests_offheap: type: approval - j11_cqlsh_dtests_py3_offheap: requires: - - start_j11_cqlsh-dtests-offheap + - start_j11_cqlsh_dtests_offheap - j11_build - j11_cqlsh_dtests_py38_offheap: requires: - - start_j11_cqlsh-dtests-offheap + - start_j11_cqlsh_dtests_offheap - j11_build - j11_cqlsh_dtests_py311_offheap: requires: - - start_j11_cqlsh-dtests-offheap + - start_j11_cqlsh_dtests_offheap - j11_build - - start_utests_long: + - j17_cqlsh_dtests_py3: + requires: + - j11_build + - j17_cqlsh_dtests_py3_vnode: + requires: + - j11_build + - j17_cqlsh_dtests_py38: + requires: + - j11_build + - j17_cqlsh_dtests_py311: + requires: + - j11_build + - j17_cqlsh_dtests_py38_vnode: + requires: + - j11_build + - j17_cqlsh_dtests_py311_vnode: + requires: + - j11_build + - start_j17_cqlsh-dtests-offheap: type: approval - - j11_utests_long: + - j17_cqlsh_dtests_py3_offheap: requires: - - start_utests_long + - start_j17_cqlsh-dtests-offheap - j11_build - - start_utests_cdc: - type: approval - - j11_utests_cdc: + - j17_cqlsh_dtests_py38_offheap: requires: - - start_utests_cdc + - start_j17_cqlsh-dtests-offheap - j11_build - - start_utests_compression: - type: approval - - j11_utests_compression: + - j17_cqlsh_dtests_py311_offheap: requires: - - start_utests_compression + - start_j17_cqlsh-dtests-offheap - j11_build - - start_utests_trie: - type: approval - - j11_utests_trie: - requires: - - start_utests_trie - - j11_build - - start_utests_stress: - type: approval - - j11_utests_stress: - requires: - - start_utests_stress - - j11_build - - start_utests_fqltool: - type: approval - - j11_utests_fqltool: - requires: - - start_utests_fqltool - - j11_build - - start_utests_system_keyspace_directory: - type: approval - - j11_utests_system_keyspace_directory: - requires: - - start_utests_system_keyspace_directory - - j11_build - - start_jvm_upgrade_dtests: - type: approval - - j11_dtest_jars_build: - requires: - - j11_build - - start_jvm_upgrade_dtests - - j11_jvm_upgrade_dtests: - requires: - - j11_dtest_jars_build - start_j11_upgrade_dtests: type: approval - j11_upgrade_dtests: requires: - j11_build - start_j11_upgrade_dtests + java17_separate_tests: + jobs: + - start_j17_build: + type: approval + - j17_build: + requires: + - start_j17_build + - start_j17_unit_tests: + type: approval + - j17_unit_tests: + requires: + - start_j17_unit_tests + - j17_build + - start_j17_jvm_dtests: + type: approval + - j17_jvm_dtests: + requires: + - start_j17_jvm_dtests + - j17_build + - start_j17_jvm_dtests_vnode: + type: approval + - j17_jvm_dtests_vnode: + requires: + - start_j17_jvm_dtests_vnode + - j17_build + - start_j17_cqlshlib_tests: + type: approval + - j17_cqlshlib_tests: + requires: + - start_j17_cqlshlib_tests + - j17_build + - start_j17_cqlshlib_cython_tests: + type: approval + - j17_cqlshlib_cython_tests: + requires: + - start_j17_cqlshlib_cython_tests + - j17_build + - start_j17_dtests: + type: approval + - j17_dtests: + requires: + - start_j17_dtests + - j17_build + - start_j17_dtests_vnode: + type: approval + - j17_dtests_vnode: + requires: + - start_j17_dtests_vnode + - j17_build + - start_j17_dtests_offheap: + type: approval + - j17_dtests_offheap: + requires: + - start_j17_dtests_offheap + - j17_build + - start_j17_dtests_large: + type: approval + - j17_dtests_large: + requires: + - start_j17_dtests_large + - j17_build + - start_j17_dtests_large_vnode: + type: approval + - j17_dtests_large_vnode: + requires: + - start_j17_dtests_large_vnode + - j17_build + - start_j17_cqlsh_tests: + type: approval + - j17_cqlsh_dtests_py3: + requires: + - start_j17_cqlsh_tests + - j17_build + - j17_cqlsh_dtests_py3_vnode: + requires: + - start_j17_cqlsh_tests + - j17_build + - j17_cqlsh_dtests_py38: + requires: + - start_j17_cqlsh_tests + - j17_build + - j17_cqlsh_dtests_py311: + requires: + - start_j17_cqlsh_tests + - j17_build + - j17_cqlsh_dtests_py38_vnode: + requires: + - start_j17_cqlsh_tests + - j17_build + - j17_cqlsh_dtests_py311_vnode: + requires: + - start_j17_cqlsh_tests + - j17_build + - start_j17_cqlsh-dtests-offheap: + type: approval + - j17_cqlsh_dtests_py3_offheap: + requires: + - start_j17_cqlsh-dtests-offheap + - j17_build + - j17_cqlsh_dtests_py38_offheap: + requires: + - start_j17_cqlsh-dtests-offheap + - j17_build + - j17_cqlsh_dtests_py311_offheap: + requires: + - start_j17_cqlsh-dtests-offheap + - j17_build + - start_j17_utests_oa: + type: approval + - j17_utests_oa: + requires: + - start_j17_utests_oa + - j17_build + - start_j17_utests_long: + type: approval + - j17_utests_long: + requires: + - start_j17_utests_long + - j17_build + - start_j17_utests_cdc: + type: approval + - j17_utests_cdc: + requires: + - start_j17_utests_cdc + - j17_build + - start_j17_utests_compression: + type: approval + - j17_utests_compression: + requires: + - start_j17_utests_compression + - j17_build + - start_j17_utests_trie: + type: approval + - j17_utests_trie: + requires: + - start_j17_utests_trie + - j17_build + - start_j17_utests_stress: + type: approval + - j17_utests_stress: + requires: + - start_j17_utests_stress + - j17_build + - start_j17_utests_fqltool: + type: approval + - j17_utests_fqltool: + requires: + - start_j17_utests_fqltool + - j17_build + - start_j17_utests_system_keyspace_directory: + type: approval + - j17_utests_system_keyspace_directory: + requires: + - start_j17_utests_system_keyspace_directory + - j17_build + java17_pre-commit_tests: + jobs: + - start_pre-commit_tests: + type: approval + - j17_build: + requires: + - start_pre-commit_tests + - j17_unit_tests: + requires: + - j17_build + - j17_utests_oa: + requires: + - j17_build + - j17_jvm_dtests: + requires: + - j17_build + - j17_jvm_dtests_vnode: + requires: + - j17_build + - j17_cqlshlib_tests: + requires: + - j17_build + - j17_cqlshlib_cython_tests: + requires: + - j17_build + - j17_dtests: + requires: + - j17_build + - j17_dtests_vnode: + requires: + - j17_build + - start_j17_dtests_offheap: + type: approval + - j17_dtests_offheap: + requires: + - start_j17_dtests_offheap + - j17_build + - start_j17_dtests_large: + type: approval + - j17_dtests_large: + requires: + - start_j17_dtests_large + - j17_build + - j17_dtests_large_vnode: + requires: + - start_j17_dtests_large + - j17_build + - j17_cqlsh_dtests_py3: + requires: + - j17_build + - j17_cqlsh_dtests_py3_vnode: + requires: + - j17_build + - j17_cqlsh_dtests_py38: + requires: + - j17_build + - j17_cqlsh_dtests_py311: + requires: + - j17_build + - j17_cqlsh_dtests_py38_vnode: + requires: + - j17_build + - j17_cqlsh_dtests_py311_vnode: + requires: + - j17_build + - start_j17_cqlsh-dtests-offheap: + type: approval + - j17_cqlsh_dtests_py3_offheap: + requires: + - start_j17_cqlsh-dtests-offheap + - j17_build + - j17_cqlsh_dtests_py38_offheap: + requires: + - start_j17_cqlsh-dtests-offheap + - j17_build + - j17_cqlsh_dtests_py311_offheap: + requires: + - start_j17_cqlsh-dtests-offheap + - j17_build + - start_utests_long: + type: approval + - j17_utests_long: + requires: + - start_utests_long + - j17_build + - start_utests_cdc: + type: approval + - j17_utests_cdc: + requires: + - start_utests_cdc + - j17_build + - start_utests_compression: + type: approval + - j17_utests_compression: + requires: + - start_utests_compression + - j17_build + - start_utests_trie: + type: approval + - j17_utests_trie: + requires: + - start_utests_trie + - j17_build + - start_utests_stress: + type: approval + - j17_utests_stress: + requires: + - start_utests_stress + - j17_build + - start_utests_fqltool: + type: approval + - j17_utests_fqltool: + requires: + - start_utests_fqltool + - j17_build + - start_utests_system_keyspace_directory: + type: approval + - j17_utests_system_keyspace_directory: + requires: + - start_utests_system_keyspace_directory + - j17_build diff --git a/.circleci/config.yml.FREE b/.circleci/config.yml.FREE index e56628a52c..0c247fbc85 100644 --- a/.circleci/config.yml.FREE +++ b/.circleci/config.yml.FREE @@ -20,7 +20,7 @@ version: 2 jobs: j11_jvm_upgrade_dtests_repeat: docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -108,7 +108,7 @@ jobs: - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - CASSANDRA_USE_JDK11: true - j11_utests_fqltool_repeat: + j17_dtests: docker: - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium @@ -116,6 +116,373 @@ jobs: shell: /bin/bash -eo pipefail -l parallelism: 4 steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j17_without_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_without_vnodes_raw /tmp/all_dtest_tests_j17_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_without_vnodes_raw > /tmp/all_dtest_tests_j17_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_without_vnodes > /tmp/split_dtest_tests_j17_without_vnodes.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes_final.txt\n" + - run: + name: Run dtests (j17_without_vnodes) + no_output_timeout: 15m + command: "echo \"cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j17_without_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j17_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j17_without_vnodes + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j17_without_vnodes_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_cqlshlib_cython_tests: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 1 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Run cqlshlib Unit Tests + command: | + export PATH=$JAVA_HOME/bin:$PATH + export cython="yes" + time mv ~/cassandra /tmp + cd /tmp/cassandra/ + ant jar -Dno-checkstyle=true -Drat.skip=true -Dant.gen-doc.skip=true -Djavadoc.skip=true + ./pylib/cassandra-cqlsh-tests.sh $(pwd) + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/pylib + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_cqlsh_dtests_py311_offheap: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.11/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j17_dtests_offheap) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_dtests_offheap_raw /tmp/all_dtest_tests_j17_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j17_dtests_offheap_raw > /tmp/all_dtest_tests_j17_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_dtests_offheap > /tmp/split_dtest_tests_j17_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\n" + - run: + name: Run dtests (j17_dtests_offheap) + no_output_timeout: 15m + command: | + echo "cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt" + cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt + + source ~/env3.11/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then + export CQLSH_PYTHON=/usr/bin/python3.11 + fi + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + # 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 + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt` + if [ ! -z "$SPLIT_TESTS" ]; then + set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + else + echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" + (exit 1) + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j17_dtests_offheap + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j17_dtests_offheap_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_jvm_dtests_vnode_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_JVM_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_JVM_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_JVM_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=true\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-jvm-dtest-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-jvm-dtest-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + - store_test_results: + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_utests_fqltool_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: - attach_workspace: at: /home/cassandra - run: @@ -200,7 +567,7 @@ jobs: - CASSANDRA_USE_JDK11: true j11_cqlshlib_cython_tests: docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -263,9 +630,9 @@ jobs: - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - CASSANDRA_USE_JDK11: true - j8_cqlsh_dtests_py311_vnode: + j17_cqlsh_dtests_py3_offheap: docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -284,26 +651,26 @@ jobs: # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.11/bin/activate + source ~/env3.6/bin/activate export PATH=$JAVA_HOME/bin:$PATH pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt pip3 uninstall -y cqlsh pip3 freeze - run: - name: Determine Tests to Run (j8_with_vnodes) + name: Determine Tests to Run (j17_dtests_offheap) no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_with_vnodes_raw /tmp/all_dtest_tests_j8_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j8_with_vnodes_raw > /tmp/all_dtest_tests_j8_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_with_vnodes > /tmp/split_dtest_tests_j8_with_vnodes.txt\ncat /tmp/split_dtest_tests_j8_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j8_with_vnodes_final.txt\n" + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_dtests_offheap_raw /tmp/all_dtest_tests_j17_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j17_dtests_offheap_raw > /tmp/all_dtest_tests_j17_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_dtests_offheap > /tmp/split_dtest_tests_j17_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\n" - run: - name: Run dtests (j8_with_vnodes) + name: Run dtests (j17_dtests_offheap) no_output_timeout: 15m command: | - echo "cat /tmp/split_dtest_tests_j8_with_vnodes_final.txt" - cat /tmp/split_dtest_tests_j8_with_vnodes_final.txt + echo "cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt" + cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt - source ~/env3.11/bin/activate + source ~/env3.6/bin/activate export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then - export CQLSH_PYTHON=/usr/bin/python3.11 + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then + export CQLSH_PYTHON=/usr/bin/python3.6 fi java -version @@ -314,9 +681,9 @@ jobs: echo "** done env" mkdir -p /tmp/results/dtests # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_with_vnodes_final.txt` + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt` if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j8_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt else echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" (exit 1) @@ -325,10 +692,10 @@ jobs: path: /tmp/results - store_artifacts: path: /tmp/dtest - destination: dtest_j8_with_vnodes + destination: dtest_j17_dtests_offheap - store_artifacts: path: ~/cassandra-dtest/logs - destination: dtest_j8_with_vnodes_logs + destination: dtest_j17_dtests_offheap_logs environment: - ANT_HOME: /usr/share/ant - LANG: en_US.UTF-8 @@ -369,9 +736,234 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_dtests_vnode_repeat: + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_utests_compression: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Determine unit Tests to Run + command: | + # reminder: this code (along with all the steps) is independently executed on every circle container + # so the goal here is to get the circleci script to return the tests *this* container will run + # which we do via the `circleci` cli tool. + + rm -fr ~/cassandra-dtest/upgrade_tests + echo "***java tests***" + + # get all of our unit test filenames + set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt + + # split up the unit tests into groups based on the number of containers we have + set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt + set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" + cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + no_output_timeout: 15m + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Run Unit Tests (testclasslist-compression) + command: | + set -x + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) + if [ -z "$test_timeout" ]; then + test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') + fi + ant testclasslist-compression -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_cqlsh_dtests_py38_vnode: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.8/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j17_with_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_with_vnodes_raw /tmp/all_dtest_tests_j17_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_with_vnodes_raw > /tmp/all_dtest_tests_j17_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_with_vnodes > /tmp/split_dtest_tests_j17_with_vnodes.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes_final.txt\n" + - run: + name: Run dtests (j17_with_vnodes) + no_output_timeout: 15m + command: | + echo "cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt" + cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt + + source ~/env3.8/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then + export CQLSH_PYTHON=/usr/bin/python3.8 + fi + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + # 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 + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt` + if [ ! -z "$SPLIT_TESTS" ]; then + set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + else + echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" + (exit 1) + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j17_with_vnodes + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j17_with_vnodes_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_dtests_vnode_repeat: docker: - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium @@ -523,12 +1115,11 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_dtests_large_vnode: + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_dtests_offheap_repeat: docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -553,21 +1144,69 @@ jobs: pip3 uninstall -y cqlsh pip3 freeze - run: - name: Determine Tests to Run (j8_large_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_large_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --only-resource-intensive-tests --force-resource-intensive-tests --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_large_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_large_with_vnodes_raw /tmp/all_dtest_tests_j8_large_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j8_large_with_vnodes_raw > /tmp/all_dtest_tests_j8_large_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_large_with_vnodes > /tmp/split_dtest_tests_j8_large_with_vnodes.txt\ncat /tmp/split_dtest_tests_j8_large_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_large_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j8_large_with_vnodes_final.txt\n" - - run: - name: Run dtests (j8_large_with_vnodes) + name: Run repeated Python DTests no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j8_large_with_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j8_large_with_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_large_with_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --only-resource-intensive-tests --force-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j8_large_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" + command: | + if [ "${REPEATED_DTESTS}" == "" ]; then + echo "Repeated dtest name hasn't been defined, exiting without running any test" + elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then + echo "Repeated dtest count hasn't been defined, exiting without running any test" + elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then + echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" + else + + # Calculate the number of test iterations to be run by the current parallel runner. + # Since we are running the same test multiple times there is no need to use `circleci tests split`. + count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) + if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then + count=$((count+1)) + fi + + if (($count <= 0)); then + echo "No tests to run in this runner" + else + echo "Running ${REPEATED_DTESTS} $count times" + + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + + tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") + + stop_on_failure_arg="" + if ${REPEATED_TESTS_STOP_ON_FAILURE}; then + stop_on_failure_arg="-x" + fi + + vnodes_args="" + if true; then + vnodes_args="--use-vnodes --num-tokens=16" + fi + + upgrade_arg="" + if false; then + upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" + 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 --use-off-heap-memtables --skip-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt + fi + fi - store_test_results: path: /tmp/results - store_artifacts: path: /tmp/dtest - destination: dtest_j8_large_with_vnodes + destination: dtest - store_artifacts: path: ~/cassandra-dtest/logs - destination: dtest_j8_large_with_vnodes_logs + destination: dtest_logs environment: - ANT_HOME: /usr/share/ant - LANG: en_US.UTF-8 @@ -608,11 +1247,144 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_dtests_vnode_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Run repeated Python DTests + no_output_timeout: 15m + command: | + if [ "${REPEATED_DTESTS}" == "" ]; then + echo "Repeated dtest name hasn't been defined, exiting without running any test" + elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then + echo "Repeated dtest count hasn't been defined, exiting without running any test" + elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then + echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" + else + + # Calculate the number of test iterations to be run by the current parallel runner. + # Since we are running the same test multiple times there is no need to use `circleci tests split`. + count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) + if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then + count=$((count+1)) + fi + + if (($count <= 0)); then + echo "No tests to run in this runner" + else + echo "Running ${REPEATED_DTESTS} $count times" + + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + + tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") + + stop_on_failure_arg="" + if ${REPEATED_TESTS_STOP_ON_FAILURE}; then + stop_on_failure_arg="-x" + fi + + vnodes_args="" + if true; then + vnodes_args="--use-vnodes --num-tokens=16" + fi + + upgrade_arg="" + if false; then + upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" + 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 + fi + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true j11_utests_system_keyspace_directory: docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -728,35 +1500,72 @@ jobs: - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - CASSANDRA_USE_JDK11: true - j8_utests_stress: + j17_cqlsh_dtests_py3: docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 1 + parallelism: 4 steps: - attach_workspace: at: /home/cassandra - run: - name: Run Unit Tests (stress-test) + name: Clone Cassandra dtest Repository (via git) command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant stress-test -Dno-build-test=true + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j17_without_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_without_vnodes_raw /tmp/all_dtest_tests_j17_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_without_vnodes_raw > /tmp/all_dtest_tests_j17_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_without_vnodes > /tmp/split_dtest_tests_j17_without_vnodes.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes_final.txt\n" + - run: + name: Run dtests (j17_without_vnodes) no_output_timeout: 15m + command: | + echo "cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt" + cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt + + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then + export CQLSH_PYTHON=/usr/bin/python3.6 + fi + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + # 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 + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt` + if [ ! -z "$SPLIT_TESTS" ]; then + set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + else + echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" + (exit 1) + fi - store_test_results: - path: /tmp/cassandra/build/test/output/ + path: /tmp/results - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml + path: /tmp/dtest + destination: dtest_j17_without_vnodes - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs + path: ~/cassandra-dtest/logs + destination: dtest_j17_without_vnodes_logs environment: - ANT_HOME: /usr/share/ant - LANG: en_US.UTF-8 @@ -797,11 +1606,11 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 j11_utests_stress_repeat: docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -889,7 +1698,7 @@ jobs: - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - CASSANDRA_USE_JDK11: true - j11_cqlsh_dtests_py311: + j17_unit_tests: docker: - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium @@ -897,6 +1706,212 @@ jobs: shell: /bin/bash -eo pipefail -l parallelism: 4 steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Determine unit Tests to Run + command: | + # reminder: this code (along with all the steps) is independently executed on every circle container + # so the goal here is to get the circleci script to return the tests *this* container will run + # which we do via the `circleci` cli tool. + + rm -fr ~/cassandra-dtest/upgrade_tests + echo "***java tests***" + + # get all of our unit test filenames + set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt + + # split up the unit tests into groups based on the number of containers we have + set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt + set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" + cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + no_output_timeout: 15m + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Run Unit Tests (testclasslist) + command: | + set -x + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) + if [ -z "$test_timeout" ]; then + test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') + fi + ant testclasslist -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_utests_system_keyspace_directory_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-system-keyspace-directory\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-system-keyspace-directory $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + - store_test_results: + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_cqlsh_dtests_py311: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: - attach_workspace: at: /home/cassandra - run: @@ -998,302 +2013,7 @@ jobs: - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - CASSANDRA_USE_JDK11: true - j8_utests_trie_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-trie\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-trie $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_jvm_dtests_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine distributed Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/distributed/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/distributed/;;g" | grep "Test\.java$" | grep -v upgrade > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.distributed.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist -Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16' -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=distributed -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_utests_compression_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-compression\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-compression $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_unit_tests: + j17_dtests_large_vnode_repeat: docker: - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium @@ -1301,6 +2021,292 @@ jobs: shell: /bin/bash -eo pipefail -l parallelism: 4 steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Run repeated Python DTests + no_output_timeout: 15m + command: | + if [ "${REPEATED_LARGE_DTESTS}" == "" ]; then + echo "Repeated dtest name hasn't been defined, exiting without running any test" + elif [ "${REPEATED_LARGE_DTESTS_COUNT}" == "" ]; then + echo "Repeated dtest count hasn't been defined, exiting without running any test" + elif [ "${REPEATED_LARGE_DTESTS_COUNT}" -le 0 ]; then + echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" + else + + # Calculate the number of test iterations to be run by the current parallel runner. + # Since we are running the same test multiple times there is no need to use `circleci tests split`. + count=$((${REPEATED_LARGE_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) + if (($CIRCLE_NODE_INDEX < (${REPEATED_LARGE_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then + count=$((count+1)) + fi + + if (($count <= 0)); then + echo "No tests to run in this runner" + else + echo "Running ${REPEATED_LARGE_DTESTS} $count times" + + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + + tests_arg=$(echo ${REPEATED_LARGE_DTESTS} | sed -e "s/,/ /g") + + stop_on_failure_arg="" + if ${REPEATED_TESTS_STOP_ON_FAILURE}; then + stop_on_failure_arg="-x" + fi + + vnodes_args="" + if true; then + vnodes_args="--use-vnodes --num-tokens=16" + fi + + upgrade_arg="" + if false; then + upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" + 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 --only-resource-intensive-tests --force-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt + fi + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_dtests_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Run repeated Python DTests + no_output_timeout: 15m + command: | + if [ "${REPEATED_DTESTS}" == "" ]; then + echo "Repeated dtest name hasn't been defined, exiting without running any test" + elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then + echo "Repeated dtest count hasn't been defined, exiting without running any test" + elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then + echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" + else + + # Calculate the number of test iterations to be run by the current parallel runner. + # Since we are running the same test multiple times there is no need to use `circleci tests split`. + count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) + if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then + count=$((count+1)) + fi + + if (($count <= 0)); then + echo "No tests to run in this runner" + else + echo "Running ${REPEATED_DTESTS} $count times" + + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + + tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") + + stop_on_failure_arg="" + if ${REPEATED_TESTS_STOP_ON_FAILURE}; then + stop_on_failure_arg="-x" + fi + + vnodes_args="" + if false; then + vnodes_args="--use-vnodes --num-tokens=16" + fi + + upgrade_arg="" + if false; then + upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" + 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 + fi + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_unit_tests: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: - attach_workspace: at: /home/cassandra - run: @@ -1411,9 +2417,9 @@ jobs: - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - CASSANDRA_USE_JDK11: true - j8_cqlsh_dtests_py3: + j17_cqlsh_dtests_py311: docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -1432,26 +2438,26 @@ jobs: # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate + source ~/env3.11/bin/activate export PATH=$JAVA_HOME/bin:$PATH pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt pip3 uninstall -y cqlsh pip3 freeze - run: - name: Determine Tests to Run (j8_without_vnodes) + name: Determine Tests to Run (j17_without_vnodes) no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_without_vnodes_raw /tmp/all_dtest_tests_j8_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j8_without_vnodes_raw > /tmp/all_dtest_tests_j8_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_without_vnodes > /tmp/split_dtest_tests_j8_without_vnodes.txt\ncat /tmp/split_dtest_tests_j8_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j8_without_vnodes_final.txt\n" + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_without_vnodes_raw /tmp/all_dtest_tests_j17_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_without_vnodes_raw > /tmp/all_dtest_tests_j17_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_without_vnodes > /tmp/split_dtest_tests_j17_without_vnodes.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes_final.txt\n" - run: - name: Run dtests (j8_without_vnodes) + name: Run dtests (j17_without_vnodes) no_output_timeout: 15m command: | - echo "cat /tmp/split_dtest_tests_j8_without_vnodes_final.txt" - cat /tmp/split_dtest_tests_j8_without_vnodes_final.txt + echo "cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt" + cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt - source ~/env3.6/bin/activate + source ~/env3.11/bin/activate export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then - export CQLSH_PYTHON=/usr/bin/python3.6 + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then + export CQLSH_PYTHON=/usr/bin/python3.11 fi java -version @@ -1462,9 +2468,9 @@ jobs: echo "** done env" mkdir -p /tmp/results/dtests # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_without_vnodes_final.txt` + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt` if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j8_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt else echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" (exit 1) @@ -1473,10 +2479,10 @@ jobs: path: /tmp/results - store_artifacts: path: /tmp/dtest - destination: dtest_j8_without_vnodes + destination: dtest_j17_without_vnodes - store_artifacts: path: ~/cassandra-dtest/logs - destination: dtest_j8_without_vnodes_logs + destination: dtest_j17_without_vnodes_logs environment: - ANT_HOME: /usr/share/ant - LANG: en_US.UTF-8 @@ -1517,11 +2523,11 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 j11_cqlsh_dtests_py38: docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -1628,7 +2634,7 @@ jobs: - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - CASSANDRA_USE_JDK11: true - j11_utests_compression_repeat: + j17_utests_stress_repeat: docker: - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium @@ -1636,6 +2642,95 @@ jobs: shell: /bin/bash -eo pipefail -l parallelism: 4 steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_STRESS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_STRESS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS_STRESS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=stress-test-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant stress-test-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + - store_test_results: + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_utests_compression_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: - attach_workspace: at: /home/cassandra - run: @@ -1718,7 +2813,7 @@ jobs: - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - CASSANDRA_USE_JDK11: true - j11_repeated_ant_test: + j17_utests_oa: docker: - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium @@ -1726,6 +2821,123 @@ jobs: shell: /bin/bash -eo pipefail -l parallelism: 4 steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Determine unit Tests to Run + command: | + # reminder: this code (along with all the steps) is independently executed on every circle container + # so the goal here is to get the circleci script to return the tests *this* container will run + # which we do via the `circleci` cli tool. + + rm -fr ~/cassandra-dtest/upgrade_tests + echo "***java tests***" + + # get all of our unit test filenames + set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt + + # split up the unit tests into groups based on the number of containers we have + set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt + set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" + cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + no_output_timeout: 15m + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Run Unit Tests (testclasslist-oa) + command: | + set -x + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) + if [ -z "$test_timeout" ]; then + test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') + fi + ant testclasslist-oa -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_repeated_ant_test: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: - attach_workspace: at: /home/cassandra - run: @@ -1916,7 +3128,7 @@ jobs: - CASSANDRA_USE_JDK11: true j11_dtests_large_vnode: docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -2001,7 +3213,7 @@ jobs: - CASSANDRA_USE_JDK11: true j11_dtests_large_vnode_repeat: docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -2132,9 +3344,9 @@ jobs: - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - CASSANDRA_USE_JDK11: true - j8_cqlsh_dtests_py311: + j17_utests_trie: docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -2143,61 +3355,70 @@ jobs: - attach_workspace: at: /home/cassandra - run: - name: Clone Cassandra dtest Repository (via git) + name: Determine unit Tests to Run command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j8_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_without_vnodes_raw /tmp/all_dtest_tests_j8_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j8_without_vnodes_raw > /tmp/all_dtest_tests_j8_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_without_vnodes > /tmp/split_dtest_tests_j8_without_vnodes.txt\ncat /tmp/split_dtest_tests_j8_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j8_without_vnodes_final.txt\n" - - run: - name: Run dtests (j8_without_vnodes) + # reminder: this code (along with all the steps) is independently executed on every circle container + # so the goal here is to get the circleci script to return the tests *this* container will run + # which we do via the `circleci` cli tool. + + rm -fr ~/cassandra-dtest/upgrade_tests + echo "***java tests***" + + # get all of our unit test filenames + set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt + + # split up the unit tests into groups based on the number of containers we have + set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt + set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" + cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt no_output_timeout: 15m + - run: + name: Log Environment Information command: | - echo "cat /tmp/split_dtest_tests_j8_without_vnodes_final.txt" - cat /tmp/split_dtest_tests_j8_without_vnodes_final.txt - - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then - export CQLSH_PYTHON=/usr/bin/python3.11 - fi - + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_without_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j8_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) + - run: + name: Run Unit Tests (testclasslist-trie) + command: | + set -x + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ fi + test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) + if [ -z "$test_timeout" ]; then + test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') + fi + ant testclasslist-trie -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true + no_output_timeout: 15m - store_test_results: - path: /tmp/results + path: /tmp/cassandra/build/test/output/ - store_artifacts: - path: /tmp/dtest - destination: dtest_j8_without_vnodes + path: /tmp/cassandra/build/test/output + destination: junitxml - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j8_without_vnodes_logs + path: /tmp/cassandra/build/test/logs + destination: logs environment: - ANT_HOME: /usr/share/ant - LANG: en_US.UTF-8 @@ -2238,11 +3459,11 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 j11_cqlsh_dtests_py38_offheap: docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -2351,7 +3572,7 @@ jobs: - CASSANDRA_USE_JDK11: true j11_dtests_large: docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -2436,7 +3657,7 @@ jobs: - CASSANDRA_USE_JDK11: true j11_utests_system_keyspace_directory_repeat: docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -2526,7 +3747,7 @@ jobs: - CASSANDRA_USE_JDK11: true j11_utests_oa: docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -2644,7 +3865,7 @@ jobs: - CASSANDRA_USE_JDK11: true j11_upgrade_dtests_repeat: docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -2775,5039 +3996,7 @@ jobs: - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - CASSANDRA_USE_JDK11: true - j8_cqlsh_dtests_py3_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j8_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_with_vnodes_raw /tmp/all_dtest_tests_j8_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j8_with_vnodes_raw > /tmp/all_dtest_tests_j8_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_with_vnodes > /tmp/split_dtest_tests_j8_with_vnodes.txt\ncat /tmp/split_dtest_tests_j8_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j8_with_vnodes_final.txt\n" - - run: - name: Run dtests (j8_with_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j8_with_vnodes_final.txt" - cat /tmp/split_dtest_tests_j8_with_vnodes_final.txt - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then - export CQLSH_PYTHON=/usr/bin/python3.6 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_with_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j8_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j8_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j8_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_cqlsh_dtests_py3: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_without_vnodes_raw /tmp/all_dtest_tests_j11_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_without_vnodes_raw > /tmp/all_dtest_tests_j11_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_without_vnodes > /tmp/split_dtest_tests_j11_without_vnodes.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\n" - - run: - name: Run dtests (j11_without_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt" - cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then - export CQLSH_PYTHON=/usr/bin/python3.6 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_cqlshlib_cython_tests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run cqlshlib Unit Tests - command: | - export PATH=$JAVA_HOME/bin:$PATH - export cython="yes" - time mv ~/cassandra /tmp - cd /tmp/cassandra/ - ant jar -Dno-checkstyle=true -Drat.skip=true -Dant.gen-doc.skip=true -Djavadoc.skip=true - ./pylib/cassandra-cqlsh-tests.sh $(pwd) - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/pylib - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_utests_cdc: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-cdc) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-cdc -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_fqltool: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run Unit Tests (fqltool-test) - command: | - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant fqltool-test -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_utests_system_keyspace_directory: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-system-keyspace-directory) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-system-keyspace-directory -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_dtests_offheap_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if true; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 --use-off-heap-memtables --skip-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_dtests_offheap_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if true; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 --use-off-heap-memtables --skip-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_dtests_large_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_LARGE_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_LARGE_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_LARGE_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_LARGE_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_LARGE_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_LARGE_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_LARGE_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if false; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 --only-resource-intensive-tests --force-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_jvm_dtests_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine distributed Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/distributed/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/distributed/;;g" | grep "Test\.java$" | grep -v upgrade > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.distributed.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist -Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16' -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=distributed -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_simulator_dtests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Simulator Tests - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant test-simulator-dtest -Dno-build-test=true - no_output_timeout: 30m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_utests_compression: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-compression) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-compression -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_dtest_jars_build: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Build Cassandra DTest jars - command: | - export PATH=$JAVA_HOME/bin:$PATH - cd ~/cassandra - mkdir ~/dtest_jars - git remote add apache https://github.com/apache/cassandra.git - for branch in cassandra-4.0 cassandra-4.1 trunk; do - # check out the correct cassandra version: - git remote set-branches --add apache '$branch' - git fetch --depth 1 apache $branch - git checkout $branch - git clean -fd - # Loop to prevent failure due to maven-ant-tasks not downloading a jar.. - for x in $(seq 1 3); do - ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar -Dno-checkstyle=true -Drat.skip=true - RETURN="$?" - if [ "${RETURN}" -eq "0" ]; then - cp build/dtest*.jar ~/dtest_jars - break - fi - done - # Exit, if we didn't build successfully - if [ "${RETURN}" -ne "0" ]; then - echo "Build failed with exit code: ${RETURN}" - exit ${RETURN} - fi - done - # and build the dtest-jar for the branch under test - ${ANT_HOME}/bin/ant realclean - git checkout origin/$CIRCLE_BRANCH - git clean -fd - for x in $(seq 1 3); do - ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar -Dno-checkstyle=true -Drat.skip=true - RETURN="$?" - if [ "${RETURN}" -eq "0" ]; then - cp build/dtest*.jar ~/dtest_jars - break - fi - done - # Exit, if we didn't build successfully - if [ "${RETURN}" -ne "0" ]; then - echo "Build failed with exit code: ${RETURN}" - exit ${RETURN} - fi - ls -l ~/dtest_jars - no_output_timeout: 15m - - persist_to_workspace: - root: /home/cassandra - paths: - - dtest_jars - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_long: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run Unit Tests (long-test) - command: | - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant long-test -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_unit_tests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=testsome\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant testsome $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_dtests_large: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j8_large_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_large_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --only-resource-intensive-tests --force-resource-intensive-tests --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_large_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_large_without_vnodes_raw /tmp/all_dtest_tests_j8_large_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j8_large_without_vnodes_raw > /tmp/all_dtest_tests_j8_large_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_large_without_vnodes > /tmp/split_dtest_tests_j8_large_without_vnodes.txt\ncat /tmp/split_dtest_tests_j8_large_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_large_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j8_large_without_vnodes_final.txt\n" - - run: - name: Run dtests (j8_large_without_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j8_large_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j8_large_without_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_large_without_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --only-resource-intensive-tests --force-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j8_large_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j8_large_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j8_large_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_simulator_dtests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Simulator Tests - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant test-simulator-dtest -Dno-build-test=true - no_output_timeout: 30m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_jvm_upgrade_dtests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine distributed Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/distributed/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/distributed/;;g" | grep "Test\.java$" | grep upgrade > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.distributed.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=distributed -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_stress: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run Unit Tests (stress-test) - command: | - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant stress-test -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_cqlsh_dtests_py38_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j8_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_dtests_offheap_raw /tmp/all_dtest_tests_j8_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j8_dtests_offheap_raw > /tmp/all_dtest_tests_j8_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_dtests_offheap > /tmp/split_dtest_tests_j8_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j8_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j8_dtests_offheap) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt" - cat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt - - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then - export CQLSH_PYTHON=/usr/bin/python3.8 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j8_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j8_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j8_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_utests_cdc_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-cdc\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-cdc $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_dtests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if false; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_utests_fqltool_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_FQLTOOL_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_FQLTOOL_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS_FQLTOOL} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=fqltool-test\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant fqltool-test $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_jvm_dtests_vnode_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_JVM_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_JVM_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_JVM_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=true\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-jvm-dtest-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-jvm-dtest-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_utests_compression: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-compression) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-compression -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_cqlsh_dtests_py38: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j8_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_without_vnodes_raw /tmp/all_dtest_tests_j8_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j8_without_vnodes_raw > /tmp/all_dtest_tests_j8_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_without_vnodes > /tmp/split_dtest_tests_j8_without_vnodes.txt\ncat /tmp/split_dtest_tests_j8_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j8_without_vnodes_final.txt\n" - - run: - name: Run dtests (j8_without_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j8_without_vnodes_final.txt" - cat /tmp/split_dtest_tests_j8_without_vnodes_final.txt - - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then - export CQLSH_PYTHON=/usr/bin/python3.8 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_without_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j8_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j8_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j8_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_cqlsh_dtests_py3_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_dtests_offheap_raw /tmp/all_dtest_tests_j11_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j11_dtests_offheap_raw > /tmp/all_dtest_tests_j11_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_dtests_offheap > /tmp/split_dtest_tests_j11_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j11_dtests_offheap) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt" - cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then - export CQLSH_PYTHON=/usr/bin/python3.6 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_utests_oa: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-oa) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-oa -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_simulator_dtests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_SIMULATOR_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_SIMULATOR_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_SIMULATOR_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-simulator-dtest\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-simulator-dtest $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_cqlsh_dtests_py311_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_dtests_offheap_raw /tmp/all_dtest_tests_j11_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j11_dtests_offheap_raw > /tmp/all_dtest_tests_j11_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_dtests_offheap > /tmp/split_dtest_tests_j11_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j11_dtests_offheap) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt" - cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt - - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then - export CQLSH_PYTHON=/usr/bin/python3.11 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_utests_system_keyspace_directory_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-system-keyspace-directory\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-system-keyspace-directory $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_utests_trie: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-trie) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-trie -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_upgrade_dtests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_upgradetests_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_upgradetests_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --execute-upgrade-tests-only --upgrade-target-version-only --upgrade-version-selection all --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_upgradetests_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_upgradetests_without_vnodes_raw /tmp/all_dtest_tests_j11_upgradetests_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_upgradetests_without_vnodes_raw > /tmp/all_dtest_tests_j11_upgradetests_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_upgradetests_without_vnodes > /tmp/split_dtest_tests_j11_upgradetests_without_vnodes.txt\ncat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt\n" - - run: - name: Run dtests (j11_upgradetests_without_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --execute-upgrade-tests-only --upgrade-target-version-only --upgrade-version-selection all --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j11_upgradetests_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_upgradetests_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_upgradetests_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_dtests_large_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_LARGE_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_LARGE_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_LARGE_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_LARGE_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_LARGE_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_LARGE_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_LARGE_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if false; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 --only-resource-intensive-tests --force-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_utests_trie: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-trie) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-trie -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_cqlsh_dtests_py3_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j8_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_dtests_offheap_raw /tmp/all_dtest_tests_j8_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j8_dtests_offheap_raw > /tmp/all_dtest_tests_j8_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_dtests_offheap > /tmp/split_dtest_tests_j8_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j8_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j8_dtests_offheap) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt" - cat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then - export CQLSH_PYTHON=/usr/bin/python3.6 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j8_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j8_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j8_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_utests_stress_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_STRESS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_STRESS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS_STRESS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=stress-test-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant stress-test-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_dtests_vnode_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if true; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_cqlsh_dtests_py3_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_with_vnodes_raw /tmp/all_dtest_tests_j11_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_with_vnodes_raw > /tmp/all_dtest_tests_j11_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_with_vnodes > /tmp/split_dtest_tests_j11_with_vnodes.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n" - - run: - name: Run dtests (j11_with_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt" - cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then - export CQLSH_PYTHON=/usr/bin/python3.6 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_dtests_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_dtests_offheap_raw /tmp/all_dtest_tests_j11_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j11_dtests_offheap_raw > /tmp/all_dtest_tests_j11_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_dtests_offheap > /tmp/split_dtest_tests_j11_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j11_dtests_offheap) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\"\ncat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j11_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_cqlsh_dtests_py38_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_with_vnodes_raw /tmp/all_dtest_tests_j11_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_with_vnodes_raw > /tmp/all_dtest_tests_j11_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_with_vnodes > /tmp/split_dtest_tests_j11_with_vnodes.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n" - - run: - name: Run dtests (j11_with_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt" - cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt - - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then - export CQLSH_PYTHON=/usr/bin/python3.8 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_trie_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-trie\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-trie $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_simulator_dtests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_SIMULATOR_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_SIMULATOR_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_SIMULATOR_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-simulator-dtest\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-simulator-dtest $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_jvm_dtests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_JVM_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_JVM_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_JVM_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-jvm-dtest-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-jvm-dtest-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_cqlsh_dtests_py311_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_with_vnodes_raw /tmp/all_dtest_tests_j11_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_with_vnodes_raw > /tmp/all_dtest_tests_j11_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_with_vnodes > /tmp/split_dtest_tests_j11_with_vnodes.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n" - - run: - name: Run dtests (j11_with_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt" - cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt - - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then - export CQLSH_PYTHON=/usr/bin/python3.11 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_utests_long_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_LONG_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_LONG_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS_LONG} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=long-testsome\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant long-testsome $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_dtests_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j8_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_dtests_offheap_raw /tmp/all_dtest_tests_j8_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j8_dtests_offheap_raw > /tmp/all_dtest_tests_j8_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_dtests_offheap > /tmp/split_dtest_tests_j8_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j8_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j8_dtests_offheap) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt\"\ncat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j8_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j8_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j8_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_unit_tests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_jvm_dtests: + j17_jvm_dtests: docker: - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium @@ -7922,10 +4111,9 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_jvm_dtests_vnode_repeat: + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_repeated_ant_test: docker: - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium @@ -7933,810 +4121,6 @@ jobs: shell: /bin/bash -eo pipefail -l parallelism: 4 steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_JVM_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_JVM_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_JVM_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=true\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-jvm-dtest-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-jvm-dtest-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_build: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Clone Cassandra Repository (via git) - command: | - git clone --single-branch --depth 1 --branch $CIRCLE_BRANCH https://github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME.git ~/cassandra - - run: - name: Build Cassandra - command: | - export PATH=$JAVA_HOME/bin:$PATH - cd ~/cassandra - # Loop to prevent failure due to maven-ant-tasks not downloading a jar.. - for x in $(seq 1 3); do - ${ANT_HOME}/bin/ant clean realclean jar - RETURN="$?" - if [ "${RETURN}" -eq "0" ]; then - break - fi - done - # Exit, if we didn't build successfully - if [ "${RETURN}" -ne "0" ]; then - echo "Build failed with exit code: ${RETURN}" - exit ${RETURN} - fi - no_output_timeout: 15m - - run: - name: Run static code analysis - command: | - export PATH=$JAVA_HOME/bin:$PATH - cd ~/cassandra - ant check - - persist_to_workspace: - root: /home/cassandra - paths: - - cassandra - - .m2 - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_utests_oa_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-oa\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-oa $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_dtests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j8_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_without_vnodes_raw /tmp/all_dtest_tests_j8_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j8_without_vnodes_raw > /tmp/all_dtest_tests_j8_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_without_vnodes > /tmp/split_dtest_tests_j8_without_vnodes.txt\ncat /tmp/split_dtest_tests_j8_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j8_without_vnodes_final.txt\n" - - run: - name: Run dtests (j8_without_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j8_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j8_without_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_without_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j8_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j8_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j8_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_utests_oa_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-oa\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-oa $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_dtests_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j8_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_with_vnodes_raw /tmp/all_dtest_tests_j8_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j8_with_vnodes_raw > /tmp/all_dtest_tests_j8_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_with_vnodes > /tmp/split_dtest_tests_j8_with_vnodes.txt\ncat /tmp/split_dtest_tests_j8_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j8_with_vnodes_final.txt\n" - - run: - name: Run dtests (j8_with_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j8_with_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j8_with_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_with_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j8_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j8_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j8_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_cqlshlib_tests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run cqlshlib Unit Tests - command: | - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra/ - ant jar -Dno-checkstyle=true -Drat.skip=true -Dant.gen-doc.skip=true -Djavadoc.skip=true - ./pylib/cassandra-cqlsh-tests.sh $(pwd) - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/pylib - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_jvm_dtests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_JVM_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_JVM_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_JVM_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-jvm-dtest-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-jvm-dtest-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_dtests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_without_vnodes_raw /tmp/all_dtest_tests_j11_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_without_vnodes_raw > /tmp/all_dtest_tests_j11_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_without_vnodes > /tmp/split_dtest_tests_j11_without_vnodes.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\n" - - run: - name: Run dtests (j11_without_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j11_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_repeated_ant_test: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - attach_workspace: at: /home/cassandra - run: @@ -8922,37 +4306,74 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_utests_long: + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_cqlsh_dtests_py3: docker: - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 1 + parallelism: 4 steps: - attach_workspace: at: /home/cassandra - run: - name: Run Unit Tests (long-test) + name: Clone Cassandra dtest Repository (via git) command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant long-test -Dno-build-test=true + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j11_without_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_without_vnodes_raw /tmp/all_dtest_tests_j11_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_without_vnodes_raw > /tmp/all_dtest_tests_j11_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_without_vnodes > /tmp/split_dtest_tests_j11_without_vnodes.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\n" + - run: + name: Run dtests (j11_without_vnodes) no_output_timeout: 15m + command: | + echo "cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt" + cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt + + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then + export CQLSH_PYTHON=/usr/bin/python3.6 + fi + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + # 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 + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt` + if [ ! -z "$SPLIT_TESTS" ]; then + set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + else + echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" + (exit 1) + fi - store_test_results: - path: /tmp/cassandra/build/test/output/ + path: /tmp/results - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml + path: /tmp/dtest + destination: dtest_j11_without_vnodes - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs + path: ~/cassandra-dtest/logs + destination: dtest_j11_without_vnodes_logs environment: - ANT_HOME: /usr/share/ant - LANG: en_US.UTF-8 @@ -8993,9 +4414,116 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_utests_cdc: + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j17_build: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 1 + steps: + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Clone Cassandra Repository (via git) + command: | + git clone --single-branch --depth 1 --branch $CIRCLE_BRANCH https://github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME.git ~/cassandra + - run: + name: Build Cassandra + command: | + export PATH=$JAVA_HOME/bin:$PATH + cd ~/cassandra + # Loop to prevent failure due to maven-ant-tasks not downloading a jar.. + for x in $(seq 1 3); do + ${ANT_HOME}/bin/ant clean realclean jar + RETURN="$?" + if [ "${RETURN}" -eq "0" ]; then + break + fi + done + # Exit, if we didn't build successfully + if [ "${RETURN}" -ne "0" ]; then + echo "Build failed with exit code: ${RETURN}" + exit ${RETURN} + fi + no_output_timeout: 15m + - run: + name: Run static code analysis + command: | + export PATH=$JAVA_HOME/bin:$PATH + cd ~/cassandra + ant check + - persist_to_workspace: + root: /home/cassandra + paths: + - cassandra + - .m2 + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_utests_cdc: docker: - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium @@ -9110,11 +4638,12 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_cqlsh_dtests_py311_offheap: + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j17_utests_cdc_repeat: docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -9123,61 +4652,42 @@ jobs: - attach_workspace: at: /home/cassandra - run: - name: Clone Cassandra dtest Repository (via git) + name: Log Environment Information command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j8_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_dtests_offheap_raw /tmp/all_dtest_tests_j8_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j8_dtests_offheap_raw > /tmp/all_dtest_tests_j8_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_dtests_offheap > /tmp/split_dtest_tests_j8_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j8_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j8_dtests_offheap) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt" - cat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt - - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then - export CQLSH_PYTHON=/usr/bin/python3.11 - fi - + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j8_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-cdc\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-cdc $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - store_test_results: - path: /tmp/results + path: /tmp/results/repeated_utests/output - store_artifacts: - path: /tmp/dtest - destination: dtest_j8_dtests_offheap + path: /tmp/results/repeated_utests/stdout + destination: stdout - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j8_dtests_offheap_logs + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs environment: - ANT_HOME: /usr/share/ant - LANG: en_US.UTF-8 @@ -9218,9 +4728,1097 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_dtests_repeat: + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_utests_fqltool: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 1 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Run Unit Tests (fqltool-test) + command: | + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + ant fqltool-test -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_dtests_offheap_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Run repeated Python DTests + no_output_timeout: 15m + command: | + if [ "${REPEATED_DTESTS}" == "" ]; then + echo "Repeated dtest name hasn't been defined, exiting without running any test" + elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then + echo "Repeated dtest count hasn't been defined, exiting without running any test" + elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then + echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" + else + + # Calculate the number of test iterations to be run by the current parallel runner. + # Since we are running the same test multiple times there is no need to use `circleci tests split`. + count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) + if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then + count=$((count+1)) + fi + + if (($count <= 0)); then + echo "No tests to run in this runner" + else + echo "Running ${REPEATED_DTESTS} $count times" + + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + + tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") + + stop_on_failure_arg="" + if ${REPEATED_TESTS_STOP_ON_FAILURE}; then + stop_on_failure_arg="-x" + fi + + vnodes_args="" + if true; then + vnodes_args="--use-vnodes --num-tokens=16" + fi + + upgrade_arg="" + if false; then + upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" + 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 --use-off-heap-memtables --skip-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt + fi + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_jvm_dtests_vnode: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 1 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Determine distributed Tests to Run + command: | + # reminder: this code (along with all the steps) is independently executed on every circle container + # so the goal here is to get the circleci script to return the tests *this* container will run + # which we do via the `circleci` cli tool. + + rm -fr ~/cassandra-dtest/upgrade_tests + echo "***java tests***" + + # get all of our unit test filenames + set -eo pipefail && circleci tests glob "$HOME/cassandra/test/distributed/**/*.java" > /tmp/all_java_unit_tests.txt + + # split up the unit tests into groups based on the number of containers we have + set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt + set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/distributed/;;g" | grep "Test\.java$" | grep -v upgrade > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" + cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + no_output_timeout: 15m + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Run Unit Tests (testclasslist) + command: | + set -x + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + test_timeout=$(grep 'name="test.distributed.timeout"' build.xml | awk -F'"' '{print $4}' || true) + if [ -z "$test_timeout" ]; then + test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') + fi + ant testclasslist -Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16' -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=distributed -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_dtest_jars_build: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 1 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Build Cassandra DTest jars + command: | + export PATH=$JAVA_HOME/bin:$PATH + cd ~/cassandra + mkdir ~/dtest_jars + git remote add apache https://github.com/apache/cassandra.git + for branch in cassandra-4.0 cassandra-4.1 trunk; do + # check out the correct cassandra version: + git remote set-branches --add apache '$branch' + git fetch --depth 1 apache $branch + git checkout $branch + git clean -fd + # Loop to prevent failure due to maven-ant-tasks not downloading a jar.. + for x in $(seq 1 3); do + ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar -Dno-checkstyle=true -Drat.skip=true + RETURN="$?" + if [ "${RETURN}" -eq "0" ]; then + cp build/dtest*.jar ~/dtest_jars + break + fi + done + # Exit, if we didn't build successfully + if [ "${RETURN}" -ne "0" ]; then + echo "Build failed with exit code: ${RETURN}" + exit ${RETURN} + fi + done + # and build the dtest-jar for the branch under test + ${ANT_HOME}/bin/ant realclean + git checkout origin/$CIRCLE_BRANCH + git clean -fd + for x in $(seq 1 3); do + ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar -Dno-checkstyle=true -Drat.skip=true + RETURN="$?" + if [ "${RETURN}" -eq "0" ]; then + cp build/dtest*.jar ~/dtest_jars + break + fi + done + # Exit, if we didn't build successfully + if [ "${RETURN}" -ne "0" ]; then + echo "Build failed with exit code: ${RETURN}" + exit ${RETURN} + fi + ls -l ~/dtest_jars + no_output_timeout: 15m + - persist_to_workspace: + root: /home/cassandra + paths: + - dtest_jars + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_utests_long: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 1 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Run Unit Tests (long-test) + command: | + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + ant long-test -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j17_unit_tests_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=testsome\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant testsome $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + - store_test_results: + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_simulator_dtests: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 1 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Determine unit Tests to Run + command: | + # reminder: this code (along with all the steps) is independently executed on every circle container + # so the goal here is to get the circleci script to return the tests *this* container will run + # which we do via the `circleci` cli tool. + + rm -fr ~/cassandra-dtest/upgrade_tests + echo "***java tests***" + + # get all of our unit test filenames + set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt + + # split up the unit tests into groups based on the number of containers we have + set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt + set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" + cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + no_output_timeout: 15m + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Run Simulator Tests + command: | + set -x + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + ant test-simulator-dtest -Dno-build-test=true + no_output_timeout: 30m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_jvm_upgrade_dtests: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 1 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Determine distributed Tests to Run + command: | + # reminder: this code (along with all the steps) is independently executed on every circle container + # so the goal here is to get the circleci script to return the tests *this* container will run + # which we do via the `circleci` cli tool. + + rm -fr ~/cassandra-dtest/upgrade_tests + echo "***java tests***" + + # get all of our unit test filenames + set -eo pipefail && circleci tests glob "$HOME/cassandra/test/distributed/**/*.java" > /tmp/all_java_unit_tests.txt + + # split up the unit tests into groups based on the number of containers we have + set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt + set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/distributed/;;g" | grep "Test\.java$" | grep upgrade > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" + cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + no_output_timeout: 15m + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Run Unit Tests (testclasslist) + command: | + set -x + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + test_timeout=$(grep 'name="test.distributed.timeout"' build.xml | awk -F'"' '{print $4}' || true) + if [ -z "$test_timeout" ]; then + test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') + fi + ant testclasslist -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=distributed -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_utests_stress: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 1 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Run Unit Tests (stress-test) + command: | + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + ant stress-test -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_utests_cdc_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-cdc\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-cdc $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + - store_test_results: + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j17_dtests_vnode: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j17_with_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_with_vnodes_raw /tmp/all_dtest_tests_j17_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_with_vnodes_raw > /tmp/all_dtest_tests_j17_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_with_vnodes > /tmp/split_dtest_tests_j17_with_vnodes.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes_final.txt\n" + - run: + name: Run dtests (j17_with_vnodes) + no_output_timeout: 15m + command: "echo \"cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j17_with_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j17_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j17_with_vnodes + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j17_with_vnodes_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_dtests_repeat: docker: - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium @@ -9350,9 +5948,2201 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_jvm_dtests: + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_utests_compression: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Determine unit Tests to Run + command: | + # reminder: this code (along with all the steps) is independently executed on every circle container + # so the goal here is to get the circleci script to return the tests *this* container will run + # which we do via the `circleci` cli tool. + + rm -fr ~/cassandra-dtest/upgrade_tests + echo "***java tests***" + + # get all of our unit test filenames + set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt + + # split up the unit tests into groups based on the number of containers we have + set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt + set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" + cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + no_output_timeout: 15m + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Run Unit Tests (testclasslist-compression) + command: | + set -x + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) + if [ -z "$test_timeout" ]; then + test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') + fi + ant testclasslist-compression -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j17_utests_trie_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-trie\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-trie $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + - store_test_results: + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_cqlsh_dtests_py3_offheap: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j11_dtests_offheap) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_dtests_offheap_raw /tmp/all_dtest_tests_j11_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j11_dtests_offheap_raw > /tmp/all_dtest_tests_j11_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_dtests_offheap > /tmp/split_dtest_tests_j11_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\n" + - run: + name: Run dtests (j11_dtests_offheap) + no_output_timeout: 15m + command: | + echo "cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt" + cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt + + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then + export CQLSH_PYTHON=/usr/bin/python3.6 + fi + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + # 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 + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt` + if [ ! -z "$SPLIT_TESTS" ]; then + set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + else + echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" + (exit 1) + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j11_dtests_offheap + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j11_dtests_offheap_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_cqlsh_dtests_py311_offheap: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.11/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j11_dtests_offheap) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_dtests_offheap_raw /tmp/all_dtest_tests_j11_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j11_dtests_offheap_raw > /tmp/all_dtest_tests_j11_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_dtests_offheap > /tmp/split_dtest_tests_j11_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\n" + - run: + name: Run dtests (j11_dtests_offheap) + no_output_timeout: 15m + command: | + echo "cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt" + cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt + + source ~/env3.11/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then + export CQLSH_PYTHON=/usr/bin/python3.11 + fi + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + # 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 + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt` + if [ ! -z "$SPLIT_TESTS" ]; then + set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + else + echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" + (exit 1) + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j11_dtests_offheap + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j11_dtests_offheap_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_utests_trie: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Determine unit Tests to Run + command: | + # reminder: this code (along with all the steps) is independently executed on every circle container + # so the goal here is to get the circleci script to return the tests *this* container will run + # which we do via the `circleci` cli tool. + + rm -fr ~/cassandra-dtest/upgrade_tests + echo "***java tests***" + + # get all of our unit test filenames + set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt + + # split up the unit tests into groups based on the number of containers we have + set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt + set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" + cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + no_output_timeout: 15m + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Run Unit Tests (testclasslist-trie) + command: | + set -x + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) + if [ -z "$test_timeout" ]; then + test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') + fi + ant testclasslist-trie -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_upgrade_dtests: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j11_upgradetests_without_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_upgradetests_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --execute-upgrade-tests-only --upgrade-target-version-only --upgrade-version-selection all --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_upgradetests_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_upgradetests_without_vnodes_raw /tmp/all_dtest_tests_j11_upgradetests_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_upgradetests_without_vnodes_raw > /tmp/all_dtest_tests_j11_upgradetests_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_upgradetests_without_vnodes > /tmp/split_dtest_tests_j11_upgradetests_without_vnodes.txt\ncat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt\n" + - run: + name: Run dtests (j11_upgradetests_without_vnodes) + no_output_timeout: 15m + command: "echo \"cat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --execute-upgrade-tests-only --upgrade-target-version-only --upgrade-version-selection all --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j11_upgradetests_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j11_upgradetests_without_vnodes + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j11_upgradetests_without_vnodes_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_dtests_large_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Run repeated Python DTests + no_output_timeout: 15m + command: | + if [ "${REPEATED_LARGE_DTESTS}" == "" ]; then + echo "Repeated dtest name hasn't been defined, exiting without running any test" + elif [ "${REPEATED_LARGE_DTESTS_COUNT}" == "" ]; then + echo "Repeated dtest count hasn't been defined, exiting without running any test" + elif [ "${REPEATED_LARGE_DTESTS_COUNT}" -le 0 ]; then + echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" + else + + # Calculate the number of test iterations to be run by the current parallel runner. + # Since we are running the same test multiple times there is no need to use `circleci tests split`. + count=$((${REPEATED_LARGE_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) + if (($CIRCLE_NODE_INDEX < (${REPEATED_LARGE_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then + count=$((count+1)) + fi + + if (($count <= 0)); then + echo "No tests to run in this runner" + else + echo "Running ${REPEATED_LARGE_DTESTS} $count times" + + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + + tests_arg=$(echo ${REPEATED_LARGE_DTESTS} | sed -e "s/,/ /g") + + stop_on_failure_arg="" + if ${REPEATED_TESTS_STOP_ON_FAILURE}; then + stop_on_failure_arg="-x" + fi + + vnodes_args="" + if false; then + vnodes_args="--use-vnodes --num-tokens=16" + fi + + upgrade_arg="" + if false; then + upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" + 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 --only-resource-intensive-tests --force-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt + fi + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j17_utests_compression_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-compression\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-compression $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + - store_test_results: + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_cqlsh_dtests_py3_vnode: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j11_with_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_with_vnodes_raw /tmp/all_dtest_tests_j11_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_with_vnodes_raw > /tmp/all_dtest_tests_j11_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_with_vnodes > /tmp/split_dtest_tests_j11_with_vnodes.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n" + - run: + name: Run dtests (j11_with_vnodes) + no_output_timeout: 15m + command: | + echo "cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt" + cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt + + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then + export CQLSH_PYTHON=/usr/bin/python3.6 + fi + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + # 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 + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt` + if [ ! -z "$SPLIT_TESTS" ]; then + set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + else + echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" + (exit 1) + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j11_with_vnodes + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j11_with_vnodes_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j17_utests_fqltool: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 1 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Run Unit Tests (fqltool-test) + command: | + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + ant fqltool-test -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_dtests_large_vnode: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j17_large_with_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_large_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --only-resource-intensive-tests --force-resource-intensive-tests --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_large_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_large_with_vnodes_raw /tmp/all_dtest_tests_j17_large_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_large_with_vnodes_raw > /tmp/all_dtest_tests_j17_large_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_large_with_vnodes > /tmp/split_dtest_tests_j17_large_with_vnodes.txt\ncat /tmp/split_dtest_tests_j17_large_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_large_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_large_with_vnodes_final.txt\n" + - run: + name: Run dtests (j17_large_with_vnodes) + no_output_timeout: 15m + command: "echo \"cat /tmp/split_dtest_tests_j17_large_with_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j17_large_with_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_large_with_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --only-resource-intensive-tests --force-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j17_large_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j17_large_with_vnodes + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j17_large_with_vnodes_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_dtests_offheap: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j11_dtests_offheap) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_dtests_offheap_raw /tmp/all_dtest_tests_j11_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j11_dtests_offheap_raw > /tmp/all_dtest_tests_j11_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_dtests_offheap > /tmp/split_dtest_tests_j11_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\n" + - run: + name: Run dtests (j11_dtests_offheap) + no_output_timeout: 15m + command: "echo \"cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\"\ncat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j11_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j11_dtests_offheap + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j11_dtests_offheap_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_cqlsh_dtests_py38_vnode: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.8/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j11_with_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_with_vnodes_raw /tmp/all_dtest_tests_j11_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_with_vnodes_raw > /tmp/all_dtest_tests_j11_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_with_vnodes > /tmp/split_dtest_tests_j11_with_vnodes.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n" + - run: + name: Run dtests (j11_with_vnodes) + no_output_timeout: 15m + command: | + echo "cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt" + cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt + + source ~/env3.8/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then + export CQLSH_PYTHON=/usr/bin/python3.8 + fi + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + # 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 + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt` + if [ ! -z "$SPLIT_TESTS" ]; then + set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + else + echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" + (exit 1) + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j11_with_vnodes + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j11_with_vnodes_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_utests_trie_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-trie\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-trie $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + - store_test_results: + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_simulator_dtests_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_SIMULATOR_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_SIMULATOR_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_SIMULATOR_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-simulator-dtest\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-simulator-dtest $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + - store_test_results: + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_jvm_dtests_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_JVM_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_JVM_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_JVM_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-jvm-dtest-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-jvm-dtest-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + - store_test_results: + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j17_cqlsh_dtests_py38_offheap: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.8/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j17_dtests_offheap) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_dtests_offheap_raw /tmp/all_dtest_tests_j17_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j17_dtests_offheap_raw > /tmp/all_dtest_tests_j17_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_dtests_offheap > /tmp/split_dtest_tests_j17_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\n" + - run: + name: Run dtests (j17_dtests_offheap) + no_output_timeout: 15m + command: | + echo "cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt" + cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt + + source ~/env3.8/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then + export CQLSH_PYTHON=/usr/bin/python3.8 + fi + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + # 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 + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt` + if [ ! -z "$SPLIT_TESTS" ]; then + set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + else + echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" + (exit 1) + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j17_dtests_offheap + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j17_dtests_offheap_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_cqlshlib_tests: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 1 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Run cqlshlib Unit Tests + command: | + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra/ + ant jar -Dno-checkstyle=true -Drat.skip=true -Dant.gen-doc.skip=true -Djavadoc.skip=true + ./pylib/cassandra-cqlsh-tests.sh $(pwd) + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/pylib + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_cqlsh_dtests_py311_vnode: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.11/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j11_with_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_with_vnodes_raw /tmp/all_dtest_tests_j11_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_with_vnodes_raw > /tmp/all_dtest_tests_j11_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_with_vnodes > /tmp/split_dtest_tests_j11_with_vnodes.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n" + - run: + name: Run dtests (j11_with_vnodes) + no_output_timeout: 15m + command: | + echo "cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt" + cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt + + source ~/env3.11/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then + export CQLSH_PYTHON=/usr/bin/python3.11 + fi + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + # 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 + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt` + if [ ! -z "$SPLIT_TESTS" ]; then + set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + else + echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" + (exit 1) + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j11_with_vnodes + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j11_with_vnodes_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j17_utests_system_keyspace_directory: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Determine unit Tests to Run + command: | + # reminder: this code (along with all the steps) is independently executed on every circle container + # so the goal here is to get the circleci script to return the tests *this* container will run + # which we do via the `circleci` cli tool. + + rm -fr ~/cassandra-dtest/upgrade_tests + echo "***java tests***" + + # get all of our unit test filenames + set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt + + # split up the unit tests into groups based on the number of containers we have + set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt + set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" + cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + no_output_timeout: 15m + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Run Unit Tests (testclasslist-system-keyspace-directory) + command: | + set -x + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) + if [ -z "$test_timeout" ]; then + test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') + fi + ant testclasslist-system-keyspace-directory -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_cqlsh_dtests_py3_vnode: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j17_with_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_with_vnodes_raw /tmp/all_dtest_tests_j17_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_with_vnodes_raw > /tmp/all_dtest_tests_j17_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_with_vnodes > /tmp/split_dtest_tests_j17_with_vnodes.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes_final.txt\n" + - run: + name: Run dtests (j17_with_vnodes) + no_output_timeout: 15m + command: | + echo "cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt" + cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt + + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then + export CQLSH_PYTHON=/usr/bin/python3.6 + fi + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + # 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 + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt` + if [ ! -z "$SPLIT_TESTS" ]; then + set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + else + echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" + (exit 1) + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j17_with_vnodes + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j17_with_vnodes_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_cqlsh_dtests_py311_vnode: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.11/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j17_with_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_with_vnodes_raw /tmp/all_dtest_tests_j17_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_with_vnodes_raw > /tmp/all_dtest_tests_j17_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_with_vnodes > /tmp/split_dtest_tests_j17_with_vnodes.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes_final.txt\n" + - run: + name: Run dtests (j17_with_vnodes) + no_output_timeout: 15m + command: | + echo "cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt" + cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt + + source ~/env3.11/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then + export CQLSH_PYTHON=/usr/bin/python3.11 + fi + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + # 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 + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt` + if [ ! -z "$SPLIT_TESTS" ]; then + set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + else + echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" + (exit 1) + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j17_with_vnodes + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j17_with_vnodes_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_jvm_dtests: docker: - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium @@ -9467,9 +8257,171 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_build: + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j17_utests_stress: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 1 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Run Unit Tests (stress-test) + command: | + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + ant stress-test -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_jvm_dtests_vnode_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_JVM_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_JVM_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_JVM_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=true\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-jvm-dtest-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-jvm-dtest-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + - store_test_results: + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_build: docker: - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium @@ -9573,9 +8525,10 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_cqlsh_dtests_py38_vnode: + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_utests_oa_repeat: docker: - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium @@ -9586,61 +8539,42 @@ jobs: - attach_workspace: at: /home/cassandra - run: - name: Clone Cassandra dtest Repository (via git) + name: Log Environment Information command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j8_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_with_vnodes_raw /tmp/all_dtest_tests_j8_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j8_with_vnodes_raw > /tmp/all_dtest_tests_j8_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_with_vnodes > /tmp/split_dtest_tests_j8_with_vnodes.txt\ncat /tmp/split_dtest_tests_j8_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j8_with_vnodes_final.txt\n" - - run: - name: Run dtests (j8_with_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j8_with_vnodes_final.txt" - cat /tmp/split_dtest_tests_j8_with_vnodes_final.txt - - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then - export CQLSH_PYTHON=/usr/bin/python3.8 - fi - + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_with_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j8_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-oa\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-oa $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - store_test_results: - path: /tmp/results + path: /tmp/results/repeated_utests/output - store_artifacts: - path: /tmp/dtest - destination: dtest_j8_with_vnodes + path: /tmp/results/repeated_utests/stdout + destination: stdout - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j8_with_vnodes_logs + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs environment: - ANT_HOME: /usr/share/ant - LANG: en_US.UTF-8 @@ -9681,14 +8615,679 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_unit_tests_repeat: + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_cqlshlib_tests: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 1 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Run cqlshlib Unit Tests + command: | + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra/ + ant jar -Dno-checkstyle=true -Drat.skip=true -Dant.gen-doc.skip=true -Djavadoc.skip=true + ./pylib/cassandra-cqlsh-tests.sh $(pwd) + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/pylib + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_dtests: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j11_without_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_without_vnodes_raw /tmp/all_dtest_tests_j11_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_without_vnodes_raw > /tmp/all_dtest_tests_j11_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_without_vnodes > /tmp/split_dtest_tests_j11_without_vnodes.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\n" + - run: + name: Run dtests (j11_without_vnodes) + no_output_timeout: 15m + command: "echo \"cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j11_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j11_without_vnodes + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j11_without_vnodes_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j17_jvm_dtests_vnode: docker: - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l + parallelism: 1 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Determine distributed Tests to Run + command: | + # reminder: this code (along with all the steps) is independently executed on every circle container + # so the goal here is to get the circleci script to return the tests *this* container will run + # which we do via the `circleci` cli tool. + + rm -fr ~/cassandra-dtest/upgrade_tests + echo "***java tests***" + + # get all of our unit test filenames + set -eo pipefail && circleci tests glob "$HOME/cassandra/test/distributed/**/*.java" > /tmp/all_java_unit_tests.txt + + # split up the unit tests into groups based on the number of containers we have + set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt + set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/distributed/;;g" | grep "Test\.java$" | grep -v upgrade > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" + cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + no_output_timeout: 15m + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Run Unit Tests (testclasslist) + command: | + set -x + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + test_timeout=$(grep 'name="test.distributed.timeout"' build.xml | awk -F'"' '{print $4}' || true) + if [ -z "$test_timeout" ]; then + test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') + fi + ant testclasslist -Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16' -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=distributed -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_cqlsh_dtests_py38: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.8/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j17_without_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_without_vnodes_raw /tmp/all_dtest_tests_j17_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_without_vnodes_raw > /tmp/all_dtest_tests_j17_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_without_vnodes > /tmp/split_dtest_tests_j17_without_vnodes.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes_final.txt\n" + - run: + name: Run dtests (j17_without_vnodes) + no_output_timeout: 15m + command: | + echo "cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt" + cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt + + source ~/env3.8/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then + export CQLSH_PYTHON=/usr/bin/python3.8 + fi + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + # 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 + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt` + if [ ! -z "$SPLIT_TESTS" ]; then + set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + else + echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" + (exit 1) + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j17_without_vnodes + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j17_without_vnodes_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_utests_cdc: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Determine unit Tests to Run + command: | + # reminder: this code (along with all the steps) is independently executed on every circle container + # so the goal here is to get the circleci script to return the tests *this* container will run + # which we do via the `circleci` cli tool. + + rm -fr ~/cassandra-dtest/upgrade_tests + echo "***java tests***" + + # get all of our unit test filenames + set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt + + # split up the unit tests into groups based on the number of containers we have + set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt + set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" + cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + no_output_timeout: 15m + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Run Unit Tests (testclasslist-cdc) + command: | + set -x + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) + if [ -z "$test_timeout" ]; then + test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') + fi + ant testclasslist-cdc -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_utests_fqltool_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_FQLTOOL_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_FQLTOOL_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS_FQLTOOL} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=fqltool-test\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant fqltool-test $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + - store_test_results: + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_dtests_large: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j17_large_without_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_large_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --only-resource-intensive-tests --force-resource-intensive-tests --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_large_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_large_without_vnodes_raw /tmp/all_dtest_tests_j17_large_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_large_without_vnodes_raw > /tmp/all_dtest_tests_j17_large_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_large_without_vnodes > /tmp/split_dtest_tests_j17_large_without_vnodes.txt\ncat /tmp/split_dtest_tests_j17_large_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_large_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_large_without_vnodes_final.txt\n" + - run: + name: Run dtests (j17_large_without_vnodes) + no_output_timeout: 15m + command: "echo \"cat /tmp/split_dtest_tests_j17_large_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j17_large_without_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_large_without_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --only-resource-intensive-tests --force-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j17_large_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j17_large_without_vnodes + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j17_large_without_vnodes_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_unit_tests_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l parallelism: 4 steps: - attach_workspace: @@ -9773,9 +9372,9 @@ jobs: - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - CASSANDRA_USE_JDK11: true - j8_utests_fqltool: + j17_utests_long: docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -9784,7 +9383,7 @@ jobs: - attach_workspace: at: /home/cassandra - run: - name: Run Unit Tests (fqltool-test) + name: Run Unit Tests (long-test) command: | export PATH=$JAVA_HOME/bin:$PATH time mv ~/cassandra /tmp @@ -9792,7 +9391,7 @@ jobs: if [ -d ~/dtest_jars ]; then cp ~/dtest_jars/dtest* /tmp/cassandra/build/ fi - ant fqltool-test -Dno-build-test=true + ant long-test -Dno-build-test=true no_output_timeout: 15m - store_test_results: path: /tmp/cassandra/build/test/output/ @@ -9842,29 +9441,55 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_cqlshlib_tests: + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_utests_oa_repeat: docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 1 + parallelism: 4 steps: - attach_workspace: at: /home/cassandra - run: - name: Run cqlshlib Unit Tests + name: Log Environment Information command: | - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra/ - ant jar -Dno-checkstyle=true -Drat.skip=true -Dant.gen-doc.skip=true -Djavadoc.skip=true - ./pylib/cassandra-cqlsh-tests.sh $(pwd) + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-oa\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-oa $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - store_test_results: - path: /tmp/cassandra/pylib + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs environment: - ANT_HOME: /usr/share/ant - LANG: en_US.UTF-8 @@ -9905,11 +9530,11 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 j11_dtests_vnode: docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -9917,28 +9542,6 @@ jobs: steps: - attach_workspace: at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - run: name: Clone Cassandra dtest Repository (via git) command: | @@ -10014,9 +9617,9 @@ jobs: - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - CASSANDRA_USE_JDK11: true - j8_utests_cdc_repeat: + j17_jvm_dtests_repeat: docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -10049,7 +9652,7 @@ jobs: - run: name: Repeatedly run new or modifed JUnit tests no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-cdc\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-cdc $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_JVM_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_JVM_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_JVM_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-jvm-dtest-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-jvm-dtest-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - store_test_results: path: /tmp/results/repeated_utests/output - store_artifacts: @@ -10101,11 +9704,117 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_dtests_large_vnode_repeat: + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_dtests_offheap: docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j17_dtests_offheap) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_dtests_offheap_raw /tmp/all_dtest_tests_j17_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j17_dtests_offheap_raw > /tmp/all_dtest_tests_j17_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_dtests_offheap > /tmp/split_dtest_tests_j17_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\n" + - run: + name: Run dtests (j17_dtests_offheap) + no_output_timeout: 15m + command: "echo \"cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\"\ncat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j17_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j17_dtests_offheap + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j17_dtests_offheap_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_dtests_large_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -10172,7 +9881,7 @@ jobs: fi vnodes_args="" - if true; then + if false; then vnodes_args="--use-vnodes --num-tokens=16" fi @@ -10233,9 +9942,9 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_utests_long_repeat: + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_utests_long_repeat: docker: - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium @@ -10322,543 +10031,100 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_utests_long_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_LONG_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_LONG_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS_LONG} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=long-testsome\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant long-testsome $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + - store_test_results: + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - CASSANDRA_USE_JDK11: true workflows: version: 2 - java8_separate_tests: - jobs: - - start_j8_build: - type: approval - - j8_build: - requires: - - start_j8_build - - start_j8_unit_tests: - type: approval - - j8_unit_tests: - requires: - - start_j8_unit_tests - - j8_build - - start_j8_jvm_dtests: - type: approval - - j8_jvm_dtests: - requires: - - start_j8_jvm_dtests - - j8_build - - start_j8_jvm_dtests_vnode: - type: approval - - j8_jvm_dtests_vnode: - requires: - - start_j8_jvm_dtests_vnode - - j8_build - - start_j11_jvm_dtests: - type: approval - - j11_jvm_dtests: - requires: - - start_j11_jvm_dtests - - j8_build - - start_j11_jvm_dtests_vnode: - type: approval - - j11_jvm_dtests_vnode: - requires: - - start_j11_jvm_dtests_vnode - - j8_build - - start_j8_simulator_dtests: - type: approval - - j8_simulator_dtests: - requires: - - start_j8_simulator_dtests - - j8_build - - start_j8_cqlshlib_tests: - type: approval - - j8_cqlshlib_tests: - requires: - - start_j8_cqlshlib_tests - - j8_build - - start_j8_cqlshlib_cython_tests: - type: approval - - j8_cqlshlib_cython_tests: - requires: - - start_j8_cqlshlib_cython_tests - - j8_build - - start_j11_cqlshlib_tests: - type: approval - - j11_cqlshlib_tests: - requires: - - start_j11_cqlshlib_tests - - j8_build - - start_j11_cqlshlib_cython_tests: - type: approval - - j11_cqlshlib_cython_tests: - requires: - - start_j11_cqlshlib_cython_tests - - j8_build - - start_j11_unit_tests: - type: approval - - j11_unit_tests: - requires: - - start_j11_unit_tests - - j8_build - - start_j8_utests_oa: - type: approval - - j8_utests_oa: - requires: - - start_j8_utests_oa - - j8_build - - start_j11_utests_oa: - type: approval - - j11_utests_oa: - requires: - - start_j11_utests_oa - - j8_build - - start_j8_utests_long: - type: approval - - j8_utests_long: - requires: - - start_j8_utests_long - - j8_build - - start_j11_utests_long: - type: approval - - j11_utests_long: - requires: - - start_j11_utests_long - - j8_build - - start_j8_utests_cdc: - type: approval - - j8_utests_cdc: - requires: - - start_j8_utests_cdc - - j8_build - - start_j11_utests_cdc: - type: approval - - j11_utests_cdc: - requires: - - start_j11_utests_cdc - - j8_build - - start_j8_utests_compression: - type: approval - - j8_utests_compression: - requires: - - start_j8_utests_compression - - j8_build - - start_j11_utests_compression: - type: approval - - j11_utests_compression: - requires: - - start_j11_utests_compression - - j8_build - - start_j8_utests_trie: - type: approval - - j8_utests_trie: - requires: - - start_j8_utests_trie - - j8_build - - start_j11_utests_trie: - type: approval - - j11_utests_trie: - requires: - - start_j11_utests_trie - - j8_build - - start_j8_utests_stress: - type: approval - - j8_utests_stress: - requires: - - start_j8_utests_stress - - j8_build - - start_j11_utests_stress: - type: approval - - j11_utests_stress: - requires: - - start_j11_utests_stress - - j8_build - - start_j8_utests_fqltool: - type: approval - - j8_utests_fqltool: - requires: - - start_j8_utests_fqltool - - j8_build - - start_j11_utests_fqltool: - type: approval - - j11_utests_fqltool: - requires: - - start_j11_utests_fqltool - - j8_build - - start_j8_utests_system_keyspace_directory: - type: approval - - j8_utests_system_keyspace_directory: - requires: - - start_j8_utests_system_keyspace_directory - - j8_build - - start_j11_utests_system_keyspace_directory: - type: approval - - j11_utests_system_keyspace_directory: - requires: - - start_j11_utests_system_keyspace_directory - - j8_build - - start_j8_dtests: - type: approval - - j8_dtests: - requires: - - start_j8_dtests - - j8_build - - start_j8_dtests_vnode: - type: approval - - j8_dtests_vnode: - requires: - - start_j8_dtests_vnode - - j8_build - - start_j8_dtests_offheap: - type: approval - - j8_dtests_offheap: - requires: - - start_j8_dtests_offheap - - j8_build - - start_j11_dtests: - type: approval - - j11_dtests: - requires: - - start_j11_dtests - - j8_build - - start_j11_dtests_vnode: - type: approval - - j11_dtests_vnode: - requires: - - start_j11_dtests_vnode - - j8_build - - start_j11_dtests_offheap: - type: approval - - j11_dtests_offheap: - requires: - - start_j11_dtests_offheap - - j8_build - - start_j8_dtests_large: - type: approval - - j8_dtests_large: - requires: - - start_j8_dtests_large - - j8_build - - start_j8_dtests_large_vnode: - type: approval - - j8_dtests_large_vnode: - requires: - - start_j8_dtests_large_vnode - - j8_build - - start_j11_dtests_large: - type: approval - - j11_dtests_large: - requires: - - start_j11_dtests_large - - j8_build - - start_j11_dtests_large_vnode: - type: approval - - j11_dtests_large_vnode: - requires: - - start_j11_dtests_large_vnode - - j8_build - - start_j8_cqlsh_tests: - type: approval - - j8_cqlsh_dtests_py3: - requires: - - start_j8_cqlsh_tests - - j8_build - - j8_cqlsh_dtests_py3_vnode: - requires: - - start_j8_cqlsh_tests - - j8_build - - j8_cqlsh_dtests_py38: - requires: - - start_j8_cqlsh_tests - - j8_build - - j8_cqlsh_dtests_py311: - requires: - - start_j8_cqlsh_tests - - j8_build - - j8_cqlsh_dtests_py38_vnode: - requires: - - start_j8_cqlsh_tests - - j8_build - - j8_cqlsh_dtests_py311_vnode: - requires: - - start_j8_cqlsh_tests - - j8_build - - start_j8_cqlsh_tests_offheap: - type: approval - - j8_cqlsh_dtests_py3_offheap: - requires: - - start_j8_cqlsh_tests_offheap - - j8_build - - j8_cqlsh_dtests_py38_offheap: - requires: - - start_j8_cqlsh_tests_offheap - - j8_build - - j8_cqlsh_dtests_py311_offheap: - requires: - - start_j8_cqlsh_tests_offheap - - j8_build - - start_j11_cqlsh_tests: - type: approval - - j11_cqlsh_dtests_py3: - requires: - - start_j11_cqlsh_tests - - j8_build - - j11_cqlsh_dtests_py3_vnode: - requires: - - start_j11_cqlsh_tests - - j8_build - - j11_cqlsh_dtests_py38: - requires: - - start_j11_cqlsh_tests - - j8_build - - j11_cqlsh_dtests_py311: - requires: - - start_j11_cqlsh_tests - - j8_build - - j11_cqlsh_dtests_py38_vnode: - requires: - - start_j11_cqlsh_tests - - j8_build - - j11_cqlsh_dtests_py311_vnode: - requires: - - start_j11_cqlsh_tests - - j8_build - - start_j11_cqlsh_tests_offheap: - type: approval - - j11_cqlsh_dtests_py3_offheap: - requires: - - start_j11_cqlsh_tests_offheap - - j8_build - - j11_cqlsh_dtests_py38_offheap: - requires: - - start_j11_cqlsh_tests_offheap - - j8_build - - j11_cqlsh_dtests_py311_offheap: - requires: - - start_j11_cqlsh_tests_offheap - - j8_build - java8_pre-commit_tests: - jobs: - - start_pre-commit_tests: - type: approval - - j8_build: - requires: - - start_pre-commit_tests - - j8_unit_tests: - requires: - - j8_build - - j8_utests_oa: - requires: - - j8_build - - j8_simulator_dtests: - requires: - - j8_build - - j8_jvm_dtests: - requires: - - j8_build - - j8_jvm_dtests_vnode: - requires: - - j8_build - - j11_jvm_dtests: - requires: - - j8_build - - j11_jvm_dtests_vnode: - requires: - - j8_build - - j8_cqlshlib_tests: - requires: - - j8_build - - j8_cqlshlib_cython_tests: - requires: - - j8_build - - j11_cqlshlib_tests: - requires: - - j8_build - - j11_cqlshlib_cython_tests: - requires: - - j8_build - - j11_unit_tests: - requires: - - j8_build - - j11_utests_oa: - requires: - - j8_build - - start_utests_long: - type: approval - - j8_utests_long: - requires: - - start_utests_long - - j8_build - - j11_utests_long: - requires: - - start_utests_long - - j8_build - - start_utests_cdc: - type: approval - - j8_utests_cdc: - requires: - - start_utests_cdc - - j8_build - - j11_utests_cdc: - requires: - - start_utests_cdc - - j8_build - - start_utests_compression: - type: approval - - j8_utests_compression: - requires: - - start_utests_compression - - j8_build - - j11_utests_compression: - requires: - - start_utests_compression - - j8_build - - start_utests_trie: - type: approval - - j8_utests_trie: - requires: - - start_utests_trie - - j8_build - - j11_utests_trie: - requires: - - start_utests_trie - - j8_build - - start_utests_stress: - type: approval - - j8_utests_stress: - requires: - - start_utests_stress - - j8_build - - j11_utests_stress: - requires: - - start_utests_stress - - j8_build - - start_utests_fqltool: - type: approval - - j8_utests_fqltool: - requires: - - start_utests_fqltool - - j8_build - - j11_utests_fqltool: - requires: - - start_utests_fqltool - - j8_build - - start_utests_system_keyspace_directory: - type: approval - - j8_utests_system_keyspace_directory: - requires: - - j8_build - - j11_utests_system_keyspace_directory: - requires: - - start_utests_system_keyspace_directory - - j8_build - - j8_dtests: - requires: - - j8_build - - j8_dtests_vnode: - requires: - - j8_build - - start_j8_dtests_offheap: - type: approval - - j8_dtests_offheap: - requires: - - start_j8_dtests_offheap - - j8_build - - j11_dtests: - requires: - - j8_build - - j11_dtests_vnode: - requires: - - j8_build - - start_j11_dtests_offheap: - type: approval - - j11_dtests_offheap: - requires: - - start_j11_dtests_offheap - - j8_build - - start_j8_dtests_large: - type: approval - - j8_dtests_large: - requires: - - start_j8_dtests_large - - j8_build - - j8_dtests_large_vnode: - requires: - - start_j8_dtests_large - - j8_build - - start_j11_dtests_large: - type: approval - - j11_dtests_large: - requires: - - start_j11_dtests_large - - j8_build - - j11_dtests_large_vnode: - requires: - - start_j11_dtests_large - - j8_build - - j8_cqlsh_dtests_py3: - requires: - - j8_build - - j8_cqlsh_dtests_py3_vnode: - requires: - - j8_build - - j8_cqlsh_dtests_py38: - requires: - - j8_build - - j8_cqlsh_dtests_py311: - requires: - - j8_build - - j8_cqlsh_dtests_py38_vnode: - requires: - - j8_build - - j8_cqlsh_dtests_py311_vnode: - requires: - - j8_build - - start_j8_cqlsh_dtests_offheap: - type: approval - - j8_cqlsh_dtests_py3_offheap: - requires: - - start_j8_cqlsh_dtests_offheap - - j8_build - - j8_cqlsh_dtests_py38_offheap: - requires: - - start_j8_cqlsh_dtests_offheap - - j8_build - - j8_cqlsh_dtests_py311_offheap: - requires: - - start_j8_cqlsh_dtests_offheap - - j8_build - - j11_cqlsh_dtests_py3: - requires: - - j8_build - - j11_cqlsh_dtests_py3_vnode: - requires: - - j8_build - - j11_cqlsh_dtests_py38: - requires: - - j8_build - - j11_cqlsh_dtests_py311: - requires: - - j8_build - - j11_cqlsh_dtests_py38_vnode: - requires: - - j8_build - - j11_cqlsh_dtests_py311_vnode: - requires: - - j8_build - - start_j11_cqlsh-dtests-offheap: - type: approval - - j11_cqlsh_dtests_py3_offheap: - requires: - - start_j11_cqlsh-dtests-offheap - - j8_build - - j11_cqlsh_dtests_py38_offheap: - requires: - - start_j11_cqlsh-dtests-offheap - - j8_build - - j11_cqlsh_dtests_py311_offheap: - requires: - - start_j11_cqlsh-dtests-offheap - - j8_build java11_separate_tests: jobs: - start_j11_build: @@ -10884,6 +10150,18 @@ workflows: requires: - start_j11_jvm_dtests_vnode - j11_build + - start_j17_jvm_dtests: + type: approval + - j17_jvm_dtests: + requires: + - start_j17_jvm_dtests + - j11_build + - start_j17_jvm_dtests_vnode: + type: approval + - j17_jvm_dtests_vnode: + requires: + - start_j17_jvm_dtests_vnode + - j11_build - start_j11_simulator_dtests: type: approval - j11_simulator_dtests: @@ -10902,6 +10180,132 @@ workflows: requires: - start_j11_cqlshlib_cython_tests - j11_build + - start_j17_cqlshlib_tests: + type: approval + - j17_cqlshlib_tests: + requires: + - start_j17_cqlshlib_tests + - j11_build + - start_j17_cqlshlib_cython_tests: + type: approval + - j17_cqlshlib_cython_tests: + requires: + - start_j17_cqlshlib_cython_tests + - j11_build + - start_j17_unit_tests: + type: approval + - j17_unit_tests: + requires: + - start_j17_unit_tests + - j11_build + - start_j11_utests_oa: + type: approval + - j11_utests_oa: + requires: + - start_j11_utests_oa + - j11_build + - start_j17_utests_oa: + type: approval + - j17_utests_oa: + requires: + - start_j17_utests_oa + - j11_build + - start_j11_utests_long: + type: approval + - j11_utests_long: + requires: + - start_j11_utests_long + - j11_build + - start_j17_utests_long: + type: approval + - j17_utests_long: + requires: + - start_j17_utests_long + - j11_build + - start_j11_utests_cdc: + type: approval + - j11_utests_cdc: + requires: + - start_j11_utests_cdc + - j11_build + - start_j17_utests_cdc: + type: approval + - j17_utests_cdc: + requires: + - start_j17_utests_cdc + - j11_build + - start_j11_utests_compression: + type: approval + - j11_utests_compression: + requires: + - start_j11_utests_compression + - j11_build + - start_j17_utests_compression: + type: approval + - j17_utests_compression: + requires: + - start_j17_utests_compression + - j11_build + - start_j11_utests_trie: + type: approval + - j11_utests_trie: + requires: + - start_j11_utests_trie + - j11_build + - start_j17_utests_trie: + type: approval + - j17_utests_trie: + requires: + - start_j17_utests_trie + - j11_build + - start_j11_utests_stress: + type: approval + - j11_utests_stress: + requires: + - start_j11_utests_stress + - j11_build + - start_j17_utests_stress: + type: approval + - j17_utests_stress: + requires: + - start_j17_utests_stress + - j11_build + - start_j11_utests_fqltool: + type: approval + - j11_utests_fqltool: + requires: + - start_j11_utests_fqltool + - j11_build + - start_j17_utests_fqltool: + type: approval + - j17_utests_fqltool: + requires: + - start_j17_utests_fqltool + - j11_build + - start_j11_utests_system_keyspace_directory: + type: approval + - j11_utests_system_keyspace_directory: + requires: + - start_j11_utests_system_keyspace_directory + - j11_build + - start_j17_utests_system_keyspace_directory: + type: approval + - j17_utests_system_keyspace_directory: + requires: + - start_j17_utests_system_keyspace_directory + - j11_build + - start_j11_dtest_jars_build: + type: approval + - j11_dtest_jars_build: + requires: + - j11_build + - start_j11_dtest_jars_build + - start_jvm_upgrade_dtests: + type: approval + - j11_jvm_upgrade_dtests: + requires: + - start_jvm_upgrade_dtests + - j11_dtest_jars_build - start_j11_dtests: type: approval - j11_dtests: @@ -10920,6 +10324,24 @@ workflows: requires: - start_j11_dtests_offheap - j11_build + - start_j17_dtests: + type: approval + - j17_dtests: + requires: + - start_j17_dtests + - j11_build + - start_j17_dtests_vnode: + type: approval + - j17_dtests_vnode: + requires: + - start_j17_dtests_vnode + - j11_build + - start_j17_dtests_offheap: + type: approval + - j17_dtests_offheap: + requires: + - start_j17_dtests_offheap + - j11_build - start_j11_dtests_large: type: approval - j11_dtests_large: @@ -10932,6 +10354,18 @@ workflows: requires: - start_j11_dtests_large_vnode - j11_build + - start_j17_dtests_large: + type: approval + - j17_dtests_large: + requires: + - start_j17_dtests_large + - j11_build + - start_j17_dtests_large_vnode: + type: approval + - j17_dtests_large_vnode: + requires: + - start_j17_dtests_large_vnode + - j11_build - start_j11_cqlsh_tests: type: approval - j11_cqlsh_dtests_py3: @@ -10958,80 +10392,60 @@ workflows: requires: - start_j11_cqlsh_tests - j11_build - - start_j11_cqlsh-dtests-offheap: + - start_j11_cqlsh_tests_offheap: type: approval - j11_cqlsh_dtests_py3_offheap: requires: - - start_j11_cqlsh-dtests-offheap + - start_j11_cqlsh_tests_offheap - j11_build - j11_cqlsh_dtests_py38_offheap: requires: - - start_j11_cqlsh-dtests-offheap + - start_j11_cqlsh_tests_offheap - j11_build - j11_cqlsh_dtests_py311_offheap: requires: - - start_j11_cqlsh-dtests-offheap + - start_j11_cqlsh_tests_offheap - j11_build - - start_j11_utests_oa: + - start_j17_cqlsh_tests: type: approval - - j11_utests_oa: + - j17_cqlsh_dtests_py3: requires: - - start_j11_utests_oa + - start_j17_cqlsh_tests - j11_build - - start_j11_utests_long: - type: approval - - j11_utests_long: + - j17_cqlsh_dtests_py3_vnode: requires: - - start_j11_utests_long + - start_j17_cqlsh_tests - j11_build - - start_j11_utests_cdc: - type: approval - - j11_utests_cdc: + - j17_cqlsh_dtests_py38: requires: - - start_j11_utests_cdc + - start_j17_cqlsh_tests - j11_build - - start_j11_utests_compression: - type: approval - - j11_utests_compression: + - j17_cqlsh_dtests_py311: requires: - - start_j11_utests_compression + - start_j17_cqlsh_tests - j11_build - - start_j11_utests_trie: - type: approval - - j11_utests_trie: + - j17_cqlsh_dtests_py38_vnode: requires: - - start_j11_utests_trie + - start_j17_cqlsh_tests - j11_build - - start_j11_utests_stress: - type: approval - - j11_utests_stress: + - j17_cqlsh_dtests_py311_vnode: requires: - - start_j11_utests_stress + - start_j17_cqlsh_tests - j11_build - - start_j11_utests_fqltool: + - start_j17_cqlsh_tests_offheap: type: approval - - j11_utests_fqltool: + - j17_cqlsh_dtests_py3_offheap: requires: - - start_j11_utests_fqltool + - start_j17_cqlsh_tests_offheap - j11_build - - start_j11_utests_system_keyspace_directory: - type: approval - - j11_utests_system_keyspace_directory: + - j17_cqlsh_dtests_py38_offheap: requires: - - start_j11_utests_system_keyspace_directory + - start_j17_cqlsh_tests_offheap - j11_build - - start_j11_dtest_jars_build: - type: approval - - j11_dtest_jars_build: + - j17_cqlsh_dtests_py311_offheap: requires: + - start_j17_cqlsh_tests_offheap - j11_build - - start_j11_dtest_jars_build - - start_jvm_upgrade_dtests: - type: approval - - j11_jvm_upgrade_dtests: - requires: - - start_jvm_upgrade_dtests - - j11_dtest_jars_build - start_j11_upgrade_dtests: type: approval - j11_upgrade_dtests: @@ -11051,13 +10465,19 @@ workflows: - j11_utests_oa: requires: - j11_build + - j11_simulator_dtests: + requires: + - j11_build - j11_jvm_dtests: requires: - j11_build - j11_jvm_dtests_vnode: requires: - j11_build - - j11_simulator_dtests: + - j17_jvm_dtests: + requires: + - j11_build + - j17_jvm_dtests_vnode: requires: - j11_build - j11_cqlshlib_tests: @@ -11066,6 +10486,96 @@ workflows: - j11_cqlshlib_cython_tests: requires: - j11_build + - j17_cqlshlib_tests: + requires: + - j11_build + - j17_cqlshlib_cython_tests: + requires: + - j11_build + - j17_unit_tests: + requires: + - j11_build + - j17_utests_oa: + requires: + - j11_build + - start_utests_long: + type: approval + - j11_utests_long: + requires: + - start_utests_long + - j11_build + - j17_utests_long: + requires: + - start_utests_long + - j11_build + - start_utests_cdc: + type: approval + - j11_utests_cdc: + requires: + - start_utests_cdc + - j11_build + - j17_utests_cdc: + requires: + - start_utests_cdc + - j11_build + - start_utests_compression: + type: approval + - j11_utests_compression: + requires: + - start_utests_compression + - j11_build + - j17_utests_compression: + requires: + - start_utests_compression + - j11_build + - start_utests_trie: + type: approval + - j11_utests_trie: + requires: + - start_utests_trie + - j11_build + - j17_utests_trie: + requires: + - start_utests_trie + - j11_build + - start_utests_stress: + type: approval + - j11_utests_stress: + requires: + - start_utests_stress + - j11_build + - j17_utests_stress: + requires: + - start_utests_stress + - j11_build + - start_utests_fqltool: + type: approval + - j11_utests_fqltool: + requires: + - start_utests_fqltool + - j11_build + - j17_utests_fqltool: + requires: + - start_utests_fqltool + - j11_build + - start_utests_system_keyspace_directory: + type: approval + - j11_utests_system_keyspace_directory: + requires: + - j11_build + - j17_utests_system_keyspace_directory: + requires: + - start_utests_system_keyspace_directory + - j11_build + - start_jvm_upgrade_dtests: + type: approval + - j11_dtest_jars_build: + requires: + - j11_build + - start_jvm_upgrade_dtests + - j11_jvm_upgrade_dtests: + requires: + - j11_dtest_jars_build - j11_dtests: requires: - j11_build @@ -11078,6 +10588,18 @@ workflows: requires: - start_j11_dtests_offheap - j11_build + - j17_dtests: + requires: + - j11_build + - j17_dtests_vnode: + requires: + - j11_build + - start_j17_dtests_offheap: + type: approval + - j17_dtests_offheap: + requires: + - start_j17_dtests_offheap + - j11_build - start_j11_dtests_large: type: approval - j11_dtests_large: @@ -11088,6 +10610,16 @@ workflows: requires: - start_j11_dtests_large - j11_build + - start_j17_dtests_large: + type: approval + - j17_dtests_large: + requires: + - start_j17_dtests_large + - j11_build + - j17_dtests_large_vnode: + requires: + - start_j17_dtests_large + - j11_build - j11_cqlsh_dtests_py3: requires: - j11_build @@ -11106,74 +10638,331 @@ workflows: - j11_cqlsh_dtests_py311_vnode: requires: - j11_build - - start_j11_cqlsh-dtests-offheap: + - start_j11_cqlsh_dtests_offheap: type: approval - j11_cqlsh_dtests_py3_offheap: requires: - - start_j11_cqlsh-dtests-offheap + - start_j11_cqlsh_dtests_offheap - j11_build - j11_cqlsh_dtests_py38_offheap: requires: - - start_j11_cqlsh-dtests-offheap + - start_j11_cqlsh_dtests_offheap - j11_build - j11_cqlsh_dtests_py311_offheap: requires: - - start_j11_cqlsh-dtests-offheap + - start_j11_cqlsh_dtests_offheap - j11_build - - start_utests_long: + - j17_cqlsh_dtests_py3: + requires: + - j11_build + - j17_cqlsh_dtests_py3_vnode: + requires: + - j11_build + - j17_cqlsh_dtests_py38: + requires: + - j11_build + - j17_cqlsh_dtests_py311: + requires: + - j11_build + - j17_cqlsh_dtests_py38_vnode: + requires: + - j11_build + - j17_cqlsh_dtests_py311_vnode: + requires: + - j11_build + - start_j17_cqlsh-dtests-offheap: type: approval - - j11_utests_long: + - j17_cqlsh_dtests_py3_offheap: requires: - - start_utests_long + - start_j17_cqlsh-dtests-offheap - j11_build - - start_utests_cdc: - type: approval - - j11_utests_cdc: + - j17_cqlsh_dtests_py38_offheap: requires: - - start_utests_cdc + - start_j17_cqlsh-dtests-offheap - j11_build - - start_utests_compression: - type: approval - - j11_utests_compression: + - j17_cqlsh_dtests_py311_offheap: requires: - - start_utests_compression + - start_j17_cqlsh-dtests-offheap - j11_build - - start_utests_trie: - type: approval - - j11_utests_trie: - requires: - - start_utests_trie - - j11_build - - start_utests_stress: - type: approval - - j11_utests_stress: - requires: - - start_utests_stress - - j11_build - - start_utests_fqltool: - type: approval - - j11_utests_fqltool: - requires: - - start_utests_fqltool - - j11_build - - start_utests_system_keyspace_directory: - type: approval - - j11_utests_system_keyspace_directory: - requires: - - start_utests_system_keyspace_directory - - j11_build - - start_jvm_upgrade_dtests: - type: approval - - j11_dtest_jars_build: - requires: - - j11_build - - start_jvm_upgrade_dtests - - j11_jvm_upgrade_dtests: - requires: - - j11_dtest_jars_build - start_j11_upgrade_dtests: type: approval - j11_upgrade_dtests: requires: - j11_build - start_j11_upgrade_dtests + java17_separate_tests: + jobs: + - start_j17_build: + type: approval + - j17_build: + requires: + - start_j17_build + - start_j17_unit_tests: + type: approval + - j17_unit_tests: + requires: + - start_j17_unit_tests + - j17_build + - start_j17_jvm_dtests: + type: approval + - j17_jvm_dtests: + requires: + - start_j17_jvm_dtests + - j17_build + - start_j17_jvm_dtests_vnode: + type: approval + - j17_jvm_dtests_vnode: + requires: + - start_j17_jvm_dtests_vnode + - j17_build + - start_j17_cqlshlib_tests: + type: approval + - j17_cqlshlib_tests: + requires: + - start_j17_cqlshlib_tests + - j17_build + - start_j17_cqlshlib_cython_tests: + type: approval + - j17_cqlshlib_cython_tests: + requires: + - start_j17_cqlshlib_cython_tests + - j17_build + - start_j17_dtests: + type: approval + - j17_dtests: + requires: + - start_j17_dtests + - j17_build + - start_j17_dtests_vnode: + type: approval + - j17_dtests_vnode: + requires: + - start_j17_dtests_vnode + - j17_build + - start_j17_dtests_offheap: + type: approval + - j17_dtests_offheap: + requires: + - start_j17_dtests_offheap + - j17_build + - start_j17_dtests_large: + type: approval + - j17_dtests_large: + requires: + - start_j17_dtests_large + - j17_build + - start_j17_dtests_large_vnode: + type: approval + - j17_dtests_large_vnode: + requires: + - start_j17_dtests_large_vnode + - j17_build + - start_j17_cqlsh_tests: + type: approval + - j17_cqlsh_dtests_py3: + requires: + - start_j17_cqlsh_tests + - j17_build + - j17_cqlsh_dtests_py3_vnode: + requires: + - start_j17_cqlsh_tests + - j17_build + - j17_cqlsh_dtests_py38: + requires: + - start_j17_cqlsh_tests + - j17_build + - j17_cqlsh_dtests_py311: + requires: + - start_j17_cqlsh_tests + - j17_build + - j17_cqlsh_dtests_py38_vnode: + requires: + - start_j17_cqlsh_tests + - j17_build + - j17_cqlsh_dtests_py311_vnode: + requires: + - start_j17_cqlsh_tests + - j17_build + - start_j17_cqlsh-dtests-offheap: + type: approval + - j17_cqlsh_dtests_py3_offheap: + requires: + - start_j17_cqlsh-dtests-offheap + - j17_build + - j17_cqlsh_dtests_py38_offheap: + requires: + - start_j17_cqlsh-dtests-offheap + - j17_build + - j17_cqlsh_dtests_py311_offheap: + requires: + - start_j17_cqlsh-dtests-offheap + - j17_build + - start_j17_utests_oa: + type: approval + - j17_utests_oa: + requires: + - start_j17_utests_oa + - j17_build + - start_j17_utests_long: + type: approval + - j17_utests_long: + requires: + - start_j17_utests_long + - j17_build + - start_j17_utests_cdc: + type: approval + - j17_utests_cdc: + requires: + - start_j17_utests_cdc + - j17_build + - start_j17_utests_compression: + type: approval + - j17_utests_compression: + requires: + - start_j17_utests_compression + - j17_build + - start_j17_utests_trie: + type: approval + - j17_utests_trie: + requires: + - start_j17_utests_trie + - j17_build + - start_j17_utests_stress: + type: approval + - j17_utests_stress: + requires: + - start_j17_utests_stress + - j17_build + - start_j17_utests_fqltool: + type: approval + - j17_utests_fqltool: + requires: + - start_j17_utests_fqltool + - j17_build + - start_j17_utests_system_keyspace_directory: + type: approval + - j17_utests_system_keyspace_directory: + requires: + - start_j17_utests_system_keyspace_directory + - j17_build + java17_pre-commit_tests: + jobs: + - start_pre-commit_tests: + type: approval + - j17_build: + requires: + - start_pre-commit_tests + - j17_unit_tests: + requires: + - j17_build + - j17_utests_oa: + requires: + - j17_build + - j17_jvm_dtests: + requires: + - j17_build + - j17_jvm_dtests_vnode: + requires: + - j17_build + - j17_cqlshlib_tests: + requires: + - j17_build + - j17_cqlshlib_cython_tests: + requires: + - j17_build + - j17_dtests: + requires: + - j17_build + - j17_dtests_vnode: + requires: + - j17_build + - start_j17_dtests_offheap: + type: approval + - j17_dtests_offheap: + requires: + - start_j17_dtests_offheap + - j17_build + - start_j17_dtests_large: + type: approval + - j17_dtests_large: + requires: + - start_j17_dtests_large + - j17_build + - j17_dtests_large_vnode: + requires: + - start_j17_dtests_large + - j17_build + - j17_cqlsh_dtests_py3: + requires: + - j17_build + - j17_cqlsh_dtests_py3_vnode: + requires: + - j17_build + - j17_cqlsh_dtests_py38: + requires: + - j17_build + - j17_cqlsh_dtests_py311: + requires: + - j17_build + - j17_cqlsh_dtests_py38_vnode: + requires: + - j17_build + - j17_cqlsh_dtests_py311_vnode: + requires: + - j17_build + - start_j17_cqlsh-dtests-offheap: + type: approval + - j17_cqlsh_dtests_py3_offheap: + requires: + - start_j17_cqlsh-dtests-offheap + - j17_build + - j17_cqlsh_dtests_py38_offheap: + requires: + - start_j17_cqlsh-dtests-offheap + - j17_build + - j17_cqlsh_dtests_py311_offheap: + requires: + - start_j17_cqlsh-dtests-offheap + - j17_build + - start_utests_long: + type: approval + - j17_utests_long: + requires: + - start_utests_long + - j17_build + - start_utests_cdc: + type: approval + - j17_utests_cdc: + requires: + - start_utests_cdc + - j17_build + - start_utests_compression: + type: approval + - j17_utests_compression: + requires: + - start_utests_compression + - j17_build + - start_utests_trie: + type: approval + - j17_utests_trie: + requires: + - start_utests_trie + - j17_build + - start_utests_stress: + type: approval + - j17_utests_stress: + requires: + - start_utests_stress + - j17_build + - start_utests_fqltool: + type: approval + - j17_utests_fqltool: + requires: + - start_utests_fqltool + - j17_build + - start_utests_system_keyspace_directory: + type: approval + - j17_utests_system_keyspace_directory: + requires: + - start_utests_system_keyspace_directory + - j17_build diff --git a/.circleci/config.yml.PAID b/.circleci/config.yml.PAID index d2c06efac7..b27b59eb74 100644 --- a/.circleci/config.yml.PAID +++ b/.circleci/config.yml.PAID @@ -20,7 +20,7 @@ version: 2 jobs: j11_jvm_upgrade_dtests_repeat: docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: large working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -108,9 +108,376 @@ jobs: - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - CASSANDRA_USE_JDK11: true - j11_utests_fqltool_repeat: + j17_dtests: docker: - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: large + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 50 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j17_without_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_without_vnodes_raw /tmp/all_dtest_tests_j17_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_without_vnodes_raw > /tmp/all_dtest_tests_j17_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_without_vnodes > /tmp/split_dtest_tests_j17_without_vnodes.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes_final.txt\n" + - run: + name: Run dtests (j17_without_vnodes) + no_output_timeout: 15m + command: "echo \"cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j17_without_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j17_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j17_without_vnodes + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j17_without_vnodes_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_cqlshlib_cython_tests: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 1 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Run cqlshlib Unit Tests + command: | + export PATH=$JAVA_HOME/bin:$PATH + export cython="yes" + time mv ~/cassandra /tmp + cd /tmp/cassandra/ + ant jar -Dno-checkstyle=true -Drat.skip=true -Dant.gen-doc.skip=true -Djavadoc.skip=true + ./pylib/cassandra-cqlsh-tests.sh $(pwd) + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/pylib + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_cqlsh_dtests_py311_offheap: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: large + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 50 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.11/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j17_dtests_offheap) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_dtests_offheap_raw /tmp/all_dtest_tests_j17_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j17_dtests_offheap_raw > /tmp/all_dtest_tests_j17_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_dtests_offheap > /tmp/split_dtest_tests_j17_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\n" + - run: + name: Run dtests (j17_dtests_offheap) + no_output_timeout: 15m + command: | + echo "cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt" + cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt + + source ~/env3.11/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then + export CQLSH_PYTHON=/usr/bin/python3.11 + fi + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + # 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 + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt` + if [ ! -z "$SPLIT_TESTS" ]; then + set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + else + echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" + (exit 1) + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j17_dtests_offheap + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j17_dtests_offheap_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_jvm_dtests_vnode_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 25 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_JVM_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_JVM_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_JVM_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=true\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-jvm-dtest-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-jvm-dtest-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + - store_test_results: + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_utests_fqltool_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -200,7 +567,7 @@ jobs: - CASSANDRA_USE_JDK11: true j11_cqlshlib_cython_tests: docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -263,9 +630,9 @@ jobs: - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - CASSANDRA_USE_JDK11: true - j8_cqlsh_dtests_py311_vnode: + j17_cqlsh_dtests_py3_offheap: docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: large working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -284,26 +651,26 @@ jobs: # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.11/bin/activate + source ~/env3.6/bin/activate export PATH=$JAVA_HOME/bin:$PATH pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt pip3 uninstall -y cqlsh pip3 freeze - run: - name: Determine Tests to Run (j8_with_vnodes) + name: Determine Tests to Run (j17_dtests_offheap) no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_with_vnodes_raw /tmp/all_dtest_tests_j8_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j8_with_vnodes_raw > /tmp/all_dtest_tests_j8_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_with_vnodes > /tmp/split_dtest_tests_j8_with_vnodes.txt\ncat /tmp/split_dtest_tests_j8_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j8_with_vnodes_final.txt\n" + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_dtests_offheap_raw /tmp/all_dtest_tests_j17_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j17_dtests_offheap_raw > /tmp/all_dtest_tests_j17_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_dtests_offheap > /tmp/split_dtest_tests_j17_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\n" - run: - name: Run dtests (j8_with_vnodes) + name: Run dtests (j17_dtests_offheap) no_output_timeout: 15m command: | - echo "cat /tmp/split_dtest_tests_j8_with_vnodes_final.txt" - cat /tmp/split_dtest_tests_j8_with_vnodes_final.txt + echo "cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt" + cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt - source ~/env3.11/bin/activate + source ~/env3.6/bin/activate export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then - export CQLSH_PYTHON=/usr/bin/python3.11 + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then + export CQLSH_PYTHON=/usr/bin/python3.6 fi java -version @@ -314,9 +681,9 @@ jobs: echo "** done env" mkdir -p /tmp/results/dtests # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_with_vnodes_final.txt` + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt` if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j8_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt else echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" (exit 1) @@ -325,10 +692,10 @@ jobs: path: /tmp/results - store_artifacts: path: /tmp/dtest - destination: dtest_j8_with_vnodes + destination: dtest_j17_dtests_offheap - store_artifacts: path: ~/cassandra-dtest/logs - destination: dtest_j8_with_vnodes_logs + destination: dtest_j17_dtests_offheap_logs environment: - ANT_HOME: /usr/share/ant - LANG: en_US.UTF-8 @@ -369,9 +736,234 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_dtests_vnode_repeat: + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_utests_compression: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 25 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Determine unit Tests to Run + command: | + # reminder: this code (along with all the steps) is independently executed on every circle container + # so the goal here is to get the circleci script to return the tests *this* container will run + # which we do via the `circleci` cli tool. + + rm -fr ~/cassandra-dtest/upgrade_tests + echo "***java tests***" + + # get all of our unit test filenames + set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt + + # split up the unit tests into groups based on the number of containers we have + set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt + set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" + cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + no_output_timeout: 15m + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Run Unit Tests (testclasslist-compression) + command: | + set -x + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) + if [ -z "$test_timeout" ]; then + test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') + fi + ant testclasslist-compression -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_cqlsh_dtests_py38_vnode: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: large + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 50 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.8/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j17_with_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_with_vnodes_raw /tmp/all_dtest_tests_j17_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_with_vnodes_raw > /tmp/all_dtest_tests_j17_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_with_vnodes > /tmp/split_dtest_tests_j17_with_vnodes.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes_final.txt\n" + - run: + name: Run dtests (j17_with_vnodes) + no_output_timeout: 15m + command: | + echo "cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt" + cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt + + source ~/env3.8/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then + export CQLSH_PYTHON=/usr/bin/python3.8 + fi + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + # 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 + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt` + if [ ! -z "$SPLIT_TESTS" ]; then + set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + else + echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" + (exit 1) + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j17_with_vnodes + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j17_with_vnodes_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_dtests_vnode_repeat: docker: - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: large @@ -523,16 +1115,15 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_dtests_large_vnode: + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_dtests_offheap_repeat: docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: xlarge + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: large working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 4 + parallelism: 25 steps: - attach_workspace: at: /home/cassandra @@ -553,21 +1144,69 @@ jobs: pip3 uninstall -y cqlsh pip3 freeze - run: - name: Determine Tests to Run (j8_large_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_large_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --only-resource-intensive-tests --force-resource-intensive-tests --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_large_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_large_with_vnodes_raw /tmp/all_dtest_tests_j8_large_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j8_large_with_vnodes_raw > /tmp/all_dtest_tests_j8_large_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_large_with_vnodes > /tmp/split_dtest_tests_j8_large_with_vnodes.txt\ncat /tmp/split_dtest_tests_j8_large_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_large_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j8_large_with_vnodes_final.txt\n" - - run: - name: Run dtests (j8_large_with_vnodes) + name: Run repeated Python DTests no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j8_large_with_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j8_large_with_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_large_with_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --only-resource-intensive-tests --force-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j8_large_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" + command: | + if [ "${REPEATED_DTESTS}" == "" ]; then + echo "Repeated dtest name hasn't been defined, exiting without running any test" + elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then + echo "Repeated dtest count hasn't been defined, exiting without running any test" + elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then + echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" + else + + # Calculate the number of test iterations to be run by the current parallel runner. + # Since we are running the same test multiple times there is no need to use `circleci tests split`. + count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) + if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then + count=$((count+1)) + fi + + if (($count <= 0)); then + echo "No tests to run in this runner" + else + echo "Running ${REPEATED_DTESTS} $count times" + + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + + tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") + + stop_on_failure_arg="" + if ${REPEATED_TESTS_STOP_ON_FAILURE}; then + stop_on_failure_arg="-x" + fi + + vnodes_args="" + if true; then + vnodes_args="--use-vnodes --num-tokens=16" + fi + + upgrade_arg="" + if false; then + upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" + 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 --use-off-heap-memtables --skip-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt + fi + fi - store_test_results: path: /tmp/results - store_artifacts: path: /tmp/dtest - destination: dtest_j8_large_with_vnodes + destination: dtest - store_artifacts: path: ~/cassandra-dtest/logs - destination: dtest_j8_large_with_vnodes_logs + destination: dtest_logs environment: - ANT_HOME: /usr/share/ant - LANG: en_US.UTF-8 @@ -608,11 +1247,144 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_dtests_vnode_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: large + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 25 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Run repeated Python DTests + no_output_timeout: 15m + command: | + if [ "${REPEATED_DTESTS}" == "" ]; then + echo "Repeated dtest name hasn't been defined, exiting without running any test" + elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then + echo "Repeated dtest count hasn't been defined, exiting without running any test" + elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then + echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" + else + + # Calculate the number of test iterations to be run by the current parallel runner. + # Since we are running the same test multiple times there is no need to use `circleci tests split`. + count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) + if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then + count=$((count+1)) + fi + + if (($count <= 0)); then + echo "No tests to run in this runner" + else + echo "Running ${REPEATED_DTESTS} $count times" + + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + + tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") + + stop_on_failure_arg="" + if ${REPEATED_TESTS_STOP_ON_FAILURE}; then + stop_on_failure_arg="-x" + fi + + vnodes_args="" + if true; then + vnodes_args="--use-vnodes --num-tokens=16" + fi + + upgrade_arg="" + if false; then + upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" + 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 + fi + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true j11_utests_system_keyspace_directory: docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -728,35 +1500,72 @@ jobs: - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - CASSANDRA_USE_JDK11: true - j8_utests_stress: + j17_cqlsh_dtests_py3: docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: large working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 1 + parallelism: 50 steps: - attach_workspace: at: /home/cassandra - run: - name: Run Unit Tests (stress-test) + name: Clone Cassandra dtest Repository (via git) command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant stress-test -Dno-build-test=true + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j17_without_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_without_vnodes_raw /tmp/all_dtest_tests_j17_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_without_vnodes_raw > /tmp/all_dtest_tests_j17_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_without_vnodes > /tmp/split_dtest_tests_j17_without_vnodes.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes_final.txt\n" + - run: + name: Run dtests (j17_without_vnodes) no_output_timeout: 15m + command: | + echo "cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt" + cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt + + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then + export CQLSH_PYTHON=/usr/bin/python3.6 + fi + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + # 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 + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt` + if [ ! -z "$SPLIT_TESTS" ]; then + set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + else + echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" + (exit 1) + fi - store_test_results: - path: /tmp/cassandra/build/test/output/ + path: /tmp/results - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml + path: /tmp/dtest + destination: dtest_j17_without_vnodes - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs + path: ~/cassandra-dtest/logs + destination: dtest_j17_without_vnodes_logs environment: - ANT_HOME: /usr/share/ant - LANG: en_US.UTF-8 @@ -797,11 +1606,11 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 j11_utests_stress_repeat: docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -889,9 +1698,215 @@ jobs: - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - CASSANDRA_USE_JDK11: true - j11_cqlsh_dtests_py311: + j17_unit_tests: docker: - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 25 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Determine unit Tests to Run + command: | + # reminder: this code (along with all the steps) is independently executed on every circle container + # so the goal here is to get the circleci script to return the tests *this* container will run + # which we do via the `circleci` cli tool. + + rm -fr ~/cassandra-dtest/upgrade_tests + echo "***java tests***" + + # get all of our unit test filenames + set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt + + # split up the unit tests into groups based on the number of containers we have + set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt + set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" + cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + no_output_timeout: 15m + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Run Unit Tests (testclasslist) + command: | + set -x + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) + if [ -z "$test_timeout" ]; then + test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') + fi + ant testclasslist -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_utests_system_keyspace_directory_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 25 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-system-keyspace-directory\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-system-keyspace-directory $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + - store_test_results: + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_cqlsh_dtests_py311: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: large working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -998,170 +2013,96 @@ jobs: - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - CASSANDRA_USE_JDK11: true - j8_utests_trie_repeat: + j17_dtests_large_vnode_repeat: docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-trie\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-trie $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_jvm_dtests_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: large working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 10 + parallelism: 25 steps: - attach_workspace: at: /home/cassandra - run: - name: Determine distributed Tests to Run + name: Clone Cassandra dtest Repository (via git) command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/distributed/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/distributed/;;g" | grep "Test\.java$" | grep -v upgrade > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - run: - name: Log Environment Information + name: Configure virtualenv and python Dependencies command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist) - command: | - set -x + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.distributed.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist -Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16' -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=distributed -Dno-build-test=true + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Run repeated Python DTests no_output_timeout: 15m + command: | + if [ "${REPEATED_LARGE_DTESTS}" == "" ]; then + echo "Repeated dtest name hasn't been defined, exiting without running any test" + elif [ "${REPEATED_LARGE_DTESTS_COUNT}" == "" ]; then + echo "Repeated dtest count hasn't been defined, exiting without running any test" + elif [ "${REPEATED_LARGE_DTESTS_COUNT}" -le 0 ]; then + echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" + else + + # Calculate the number of test iterations to be run by the current parallel runner. + # Since we are running the same test multiple times there is no need to use `circleci tests split`. + count=$((${REPEATED_LARGE_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) + if (($CIRCLE_NODE_INDEX < (${REPEATED_LARGE_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then + count=$((count+1)) + fi + + if (($count <= 0)); then + echo "No tests to run in this runner" + else + echo "Running ${REPEATED_LARGE_DTESTS} $count times" + + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + + tests_arg=$(echo ${REPEATED_LARGE_DTESTS} | sed -e "s/,/ /g") + + stop_on_failure_arg="" + if ${REPEATED_TESTS_STOP_ON_FAILURE}; then + stop_on_failure_arg="-x" + fi + + vnodes_args="" + if true; then + vnodes_args="--use-vnodes --num-tokens=16" + fi + + upgrade_arg="" + if false; then + upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" + 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 --only-resource-intensive-tests --force-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt + fi + fi - store_test_results: - path: /tmp/cassandra/build/test/output/ + path: /tmp/results - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml + path: /tmp/dtest + destination: dtest - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs + path: ~/cassandra-dtest/logs + destination: dtest_logs environment: - ANT_HOME: /usr/share/ant - LANG: en_US.UTF-8 @@ -1202,12 +2143,12 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_utests_compression_repeat: + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_dtests_repeat: docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: large working_directory: ~/ shell: /bin/bash -eo pipefail -l parallelism: 25 @@ -1237,20 +2178,85 @@ jobs: which java java -version - run: - name: Repeatedly run new or modifed JUnit tests + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Run repeated Python DTests no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-compression\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-compression $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + command: | + if [ "${REPEATED_DTESTS}" == "" ]; then + echo "Repeated dtest name hasn't been defined, exiting without running any test" + elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then + echo "Repeated dtest count hasn't been defined, exiting without running any test" + elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then + echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" + else + + # Calculate the number of test iterations to be run by the current parallel runner. + # Since we are running the same test multiple times there is no need to use `circleci tests split`. + count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) + if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then + count=$((count+1)) + fi + + if (($count <= 0)); then + echo "No tests to run in this runner" + else + echo "Running ${REPEATED_DTESTS} $count times" + + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + + tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") + + stop_on_failure_arg="" + if ${REPEATED_TESTS_STOP_ON_FAILURE}; then + stop_on_failure_arg="-x" + fi + + vnodes_args="" + if false; then + vnodes_args="--use-vnodes --num-tokens=16" + fi + + upgrade_arg="" + if false; then + upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" + 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 + fi + fi - store_test_results: - path: /tmp/results/repeated_utests/output + path: /tmp/results - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout + path: /tmp/dtest + destination: dtest - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs + path: ~/cassandra-dtest/logs + destination: dtest_logs environment: - ANT_HOME: /usr/share/ant - LANG: en_US.UTF-8 @@ -1291,11 +2297,11 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 j11_unit_tests: docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -1411,9 +2417,9 @@ jobs: - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - CASSANDRA_USE_JDK11: true - j8_cqlsh_dtests_py3: + j17_cqlsh_dtests_py311: docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: large working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -1432,26 +2438,26 @@ jobs: # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate + source ~/env3.11/bin/activate export PATH=$JAVA_HOME/bin:$PATH pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt pip3 uninstall -y cqlsh pip3 freeze - run: - name: Determine Tests to Run (j8_without_vnodes) + name: Determine Tests to Run (j17_without_vnodes) no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_without_vnodes_raw /tmp/all_dtest_tests_j8_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j8_without_vnodes_raw > /tmp/all_dtest_tests_j8_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_without_vnodes > /tmp/split_dtest_tests_j8_without_vnodes.txt\ncat /tmp/split_dtest_tests_j8_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j8_without_vnodes_final.txt\n" + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_without_vnodes_raw /tmp/all_dtest_tests_j17_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_without_vnodes_raw > /tmp/all_dtest_tests_j17_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_without_vnodes > /tmp/split_dtest_tests_j17_without_vnodes.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes_final.txt\n" - run: - name: Run dtests (j8_without_vnodes) + name: Run dtests (j17_without_vnodes) no_output_timeout: 15m command: | - echo "cat /tmp/split_dtest_tests_j8_without_vnodes_final.txt" - cat /tmp/split_dtest_tests_j8_without_vnodes_final.txt + echo "cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt" + cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt - source ~/env3.6/bin/activate + source ~/env3.11/bin/activate export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then - export CQLSH_PYTHON=/usr/bin/python3.6 + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then + export CQLSH_PYTHON=/usr/bin/python3.11 fi java -version @@ -1462,9 +2468,9 @@ jobs: echo "** done env" mkdir -p /tmp/results/dtests # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_without_vnodes_final.txt` + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt` if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j8_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt else echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" (exit 1) @@ -1473,10 +2479,10 @@ jobs: path: /tmp/results - store_artifacts: path: /tmp/dtest - destination: dtest_j8_without_vnodes + destination: dtest_j17_without_vnodes - store_artifacts: path: ~/cassandra-dtest/logs - destination: dtest_j8_without_vnodes_logs + destination: dtest_j17_without_vnodes_logs environment: - ANT_HOME: /usr/share/ant - LANG: en_US.UTF-8 @@ -1517,11 +2523,11 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 j11_cqlsh_dtests_py38: docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: large working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -1628,7 +2634,7 @@ jobs: - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - CASSANDRA_USE_JDK11: true - j11_utests_compression_repeat: + j17_utests_stress_repeat: docker: - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium @@ -1636,6 +2642,95 @@ jobs: shell: /bin/bash -eo pipefail -l parallelism: 25 steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_STRESS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_STRESS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS_STRESS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=stress-test-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant stress-test-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + - store_test_results: + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_utests_compression_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 25 + steps: - attach_workspace: at: /home/cassandra - run: @@ -1718,7 +2813,7 @@ jobs: - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - CASSANDRA_USE_JDK11: true - j11_repeated_ant_test: + j17_utests_oa: docker: - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium @@ -1726,6 +2821,123 @@ jobs: shell: /bin/bash -eo pipefail -l parallelism: 25 steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Determine unit Tests to Run + command: | + # reminder: this code (along with all the steps) is independently executed on every circle container + # so the goal here is to get the circleci script to return the tests *this* container will run + # which we do via the `circleci` cli tool. + + rm -fr ~/cassandra-dtest/upgrade_tests + echo "***java tests***" + + # get all of our unit test filenames + set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt + + # split up the unit tests into groups based on the number of containers we have + set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt + set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" + cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + no_output_timeout: 15m + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Run Unit Tests (testclasslist-oa) + command: | + set -x + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) + if [ -z "$test_timeout" ]; then + test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') + fi + ant testclasslist-oa -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_repeated_ant_test: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 25 + steps: - attach_workspace: at: /home/cassandra - run: @@ -1916,7 +3128,7 @@ jobs: - CASSANDRA_USE_JDK11: true j11_dtests_large_vnode: docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: xlarge working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -2001,7 +3213,7 @@ jobs: - CASSANDRA_USE_JDK11: true j11_dtests_large_vnode_repeat: docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: large working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -2132,72 +3344,81 @@ jobs: - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - CASSANDRA_USE_JDK11: true - j8_cqlsh_dtests_py311: + j17_utests_trie: docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: large + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 50 + parallelism: 25 steps: - attach_workspace: at: /home/cassandra - run: - name: Clone Cassandra dtest Repository (via git) + name: Determine unit Tests to Run command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j8_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_without_vnodes_raw /tmp/all_dtest_tests_j8_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j8_without_vnodes_raw > /tmp/all_dtest_tests_j8_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_without_vnodes > /tmp/split_dtest_tests_j8_without_vnodes.txt\ncat /tmp/split_dtest_tests_j8_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j8_without_vnodes_final.txt\n" - - run: - name: Run dtests (j8_without_vnodes) + # reminder: this code (along with all the steps) is independently executed on every circle container + # so the goal here is to get the circleci script to return the tests *this* container will run + # which we do via the `circleci` cli tool. + + rm -fr ~/cassandra-dtest/upgrade_tests + echo "***java tests***" + + # get all of our unit test filenames + set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt + + # split up the unit tests into groups based on the number of containers we have + set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt + set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" + cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt no_output_timeout: 15m + - run: + name: Log Environment Information command: | - echo "cat /tmp/split_dtest_tests_j8_without_vnodes_final.txt" - cat /tmp/split_dtest_tests_j8_without_vnodes_final.txt - - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then - export CQLSH_PYTHON=/usr/bin/python3.11 - fi - + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_without_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j8_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) + - run: + name: Run Unit Tests (testclasslist-trie) + command: | + set -x + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ fi + test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) + if [ -z "$test_timeout" ]; then + test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') + fi + ant testclasslist-trie -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true + no_output_timeout: 15m - store_test_results: - path: /tmp/results + path: /tmp/cassandra/build/test/output/ - store_artifacts: - path: /tmp/dtest - destination: dtest_j8_without_vnodes + path: /tmp/cassandra/build/test/output + destination: junitxml - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j8_without_vnodes_logs + path: /tmp/cassandra/build/test/logs + destination: logs environment: - ANT_HOME: /usr/share/ant - LANG: en_US.UTF-8 @@ -2238,11 +3459,11 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 j11_cqlsh_dtests_py38_offheap: docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: large working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -2351,7 +3572,7 @@ jobs: - CASSANDRA_USE_JDK11: true j11_dtests_large: docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: xlarge working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -2436,7 +3657,7 @@ jobs: - CASSANDRA_USE_JDK11: true j11_utests_system_keyspace_directory_repeat: docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -2526,7 +3747,7 @@ jobs: - CASSANDRA_USE_JDK11: true j11_utests_oa: docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -2644,7 +3865,7 @@ jobs: - CASSANDRA_USE_JDK11: true j11_upgrade_dtests_repeat: docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: xlarge working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -2775,5039 +3996,7 @@ jobs: - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - CASSANDRA_USE_JDK11: true - j8_cqlsh_dtests_py3_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 50 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j8_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_with_vnodes_raw /tmp/all_dtest_tests_j8_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j8_with_vnodes_raw > /tmp/all_dtest_tests_j8_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_with_vnodes > /tmp/split_dtest_tests_j8_with_vnodes.txt\ncat /tmp/split_dtest_tests_j8_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j8_with_vnodes_final.txt\n" - - run: - name: Run dtests (j8_with_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j8_with_vnodes_final.txt" - cat /tmp/split_dtest_tests_j8_with_vnodes_final.txt - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then - export CQLSH_PYTHON=/usr/bin/python3.6 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_with_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j8_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j8_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j8_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_cqlsh_dtests_py3: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 50 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_without_vnodes_raw /tmp/all_dtest_tests_j11_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_without_vnodes_raw > /tmp/all_dtest_tests_j11_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_without_vnodes > /tmp/split_dtest_tests_j11_without_vnodes.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\n" - - run: - name: Run dtests (j11_without_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt" - cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then - export CQLSH_PYTHON=/usr/bin/python3.6 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_cqlshlib_cython_tests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run cqlshlib Unit Tests - command: | - export PATH=$JAVA_HOME/bin:$PATH - export cython="yes" - time mv ~/cassandra /tmp - cd /tmp/cassandra/ - ant jar -Dno-checkstyle=true -Drat.skip=true -Dant.gen-doc.skip=true -Djavadoc.skip=true - ./pylib/cassandra-cqlsh-tests.sh $(pwd) - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/pylib - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_utests_cdc: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-cdc) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-cdc -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_fqltool: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run Unit Tests (fqltool-test) - command: | - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant fqltool-test -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_utests_system_keyspace_directory: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-system-keyspace-directory) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-system-keyspace-directory -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_dtests_offheap_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if true; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 --use-off-heap-memtables --skip-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_dtests_offheap_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if true; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 --use-off-heap-memtables --skip-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_dtests_large_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_LARGE_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_LARGE_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_LARGE_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_LARGE_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_LARGE_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_LARGE_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_LARGE_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if false; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 --only-resource-intensive-tests --force-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_jvm_dtests_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 10 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine distributed Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/distributed/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/distributed/;;g" | grep "Test\.java$" | grep -v upgrade > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.distributed.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist -Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16' -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=distributed -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_simulator_dtests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Simulator Tests - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant test-simulator-dtest -Dno-build-test=true - no_output_timeout: 30m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_utests_compression: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-compression) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-compression -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_dtest_jars_build: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Build Cassandra DTest jars - command: | - export PATH=$JAVA_HOME/bin:$PATH - cd ~/cassandra - mkdir ~/dtest_jars - git remote add apache https://github.com/apache/cassandra.git - for branch in cassandra-4.0 cassandra-4.1 trunk; do - # check out the correct cassandra version: - git remote set-branches --add apache '$branch' - git fetch --depth 1 apache $branch - git checkout $branch - git clean -fd - # Loop to prevent failure due to maven-ant-tasks not downloading a jar.. - for x in $(seq 1 3); do - ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar -Dno-checkstyle=true -Drat.skip=true - RETURN="$?" - if [ "${RETURN}" -eq "0" ]; then - cp build/dtest*.jar ~/dtest_jars - break - fi - done - # Exit, if we didn't build successfully - if [ "${RETURN}" -ne "0" ]; then - echo "Build failed with exit code: ${RETURN}" - exit ${RETURN} - fi - done - # and build the dtest-jar for the branch under test - ${ANT_HOME}/bin/ant realclean - git checkout origin/$CIRCLE_BRANCH - git clean -fd - for x in $(seq 1 3); do - ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar -Dno-checkstyle=true -Drat.skip=true - RETURN="$?" - if [ "${RETURN}" -eq "0" ]; then - cp build/dtest*.jar ~/dtest_jars - break - fi - done - # Exit, if we didn't build successfully - if [ "${RETURN}" -ne "0" ]; then - echo "Build failed with exit code: ${RETURN}" - exit ${RETURN} - fi - ls -l ~/dtest_jars - no_output_timeout: 15m - - persist_to_workspace: - root: /home/cassandra - paths: - - dtest_jars - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_long: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run Unit Tests (long-test) - command: | - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant long-test -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_unit_tests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=testsome\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant testsome $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_dtests_large: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: xlarge - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j8_large_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_large_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --only-resource-intensive-tests --force-resource-intensive-tests --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_large_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_large_without_vnodes_raw /tmp/all_dtest_tests_j8_large_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j8_large_without_vnodes_raw > /tmp/all_dtest_tests_j8_large_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_large_without_vnodes > /tmp/split_dtest_tests_j8_large_without_vnodes.txt\ncat /tmp/split_dtest_tests_j8_large_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_large_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j8_large_without_vnodes_final.txt\n" - - run: - name: Run dtests (j8_large_without_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j8_large_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j8_large_without_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_large_without_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --only-resource-intensive-tests --force-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j8_large_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j8_large_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j8_large_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_simulator_dtests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Simulator Tests - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant test-simulator-dtest -Dno-build-test=true - no_output_timeout: 30m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_jvm_upgrade_dtests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: xlarge - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine distributed Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/distributed/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/distributed/;;g" | grep "Test\.java$" | grep upgrade > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.distributed.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=distributed -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_stress: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run Unit Tests (stress-test) - command: | - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant stress-test -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_cqlsh_dtests_py38_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 50 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j8_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_dtests_offheap_raw /tmp/all_dtest_tests_j8_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j8_dtests_offheap_raw > /tmp/all_dtest_tests_j8_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_dtests_offheap > /tmp/split_dtest_tests_j8_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j8_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j8_dtests_offheap) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt" - cat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt - - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then - export CQLSH_PYTHON=/usr/bin/python3.8 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j8_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j8_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j8_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_utests_cdc_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-cdc\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-cdc $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_dtests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if false; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_utests_fqltool_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_FQLTOOL_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_FQLTOOL_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS_FQLTOOL} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=fqltool-test\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant fqltool-test $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_jvm_dtests_vnode_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_JVM_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_JVM_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_JVM_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=true\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-jvm-dtest-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-jvm-dtest-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_utests_compression: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-compression) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-compression -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_cqlsh_dtests_py38: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 50 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j8_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_without_vnodes_raw /tmp/all_dtest_tests_j8_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j8_without_vnodes_raw > /tmp/all_dtest_tests_j8_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_without_vnodes > /tmp/split_dtest_tests_j8_without_vnodes.txt\ncat /tmp/split_dtest_tests_j8_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j8_without_vnodes_final.txt\n" - - run: - name: Run dtests (j8_without_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j8_without_vnodes_final.txt" - cat /tmp/split_dtest_tests_j8_without_vnodes_final.txt - - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then - export CQLSH_PYTHON=/usr/bin/python3.8 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_without_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j8_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j8_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j8_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_cqlsh_dtests_py3_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 50 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_dtests_offheap_raw /tmp/all_dtest_tests_j11_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j11_dtests_offheap_raw > /tmp/all_dtest_tests_j11_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_dtests_offheap > /tmp/split_dtest_tests_j11_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j11_dtests_offheap) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt" - cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then - export CQLSH_PYTHON=/usr/bin/python3.6 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_utests_oa: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-oa) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-oa -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_simulator_dtests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_SIMULATOR_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_SIMULATOR_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_SIMULATOR_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-simulator-dtest\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-simulator-dtest $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_cqlsh_dtests_py311_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 50 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_dtests_offheap_raw /tmp/all_dtest_tests_j11_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j11_dtests_offheap_raw > /tmp/all_dtest_tests_j11_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_dtests_offheap > /tmp/split_dtest_tests_j11_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j11_dtests_offheap) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt" - cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt - - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then - export CQLSH_PYTHON=/usr/bin/python3.11 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_utests_system_keyspace_directory_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-system-keyspace-directory\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-system-keyspace-directory $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_utests_trie: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-trie) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-trie -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_upgrade_dtests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 100 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_upgradetests_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_upgradetests_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --execute-upgrade-tests-only --upgrade-target-version-only --upgrade-version-selection all --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_upgradetests_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_upgradetests_without_vnodes_raw /tmp/all_dtest_tests_j11_upgradetests_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_upgradetests_without_vnodes_raw > /tmp/all_dtest_tests_j11_upgradetests_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_upgradetests_without_vnodes > /tmp/split_dtest_tests_j11_upgradetests_without_vnodes.txt\ncat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt\n" - - run: - name: Run dtests (j11_upgradetests_without_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --execute-upgrade-tests-only --upgrade-target-version-only --upgrade-version-selection all --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j11_upgradetests_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_upgradetests_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_upgradetests_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_dtests_large_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_LARGE_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_LARGE_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_LARGE_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_LARGE_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_LARGE_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_LARGE_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_LARGE_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if false; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 --only-resource-intensive-tests --force-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_utests_trie: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-trie) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-trie -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_cqlsh_dtests_py3_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 50 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j8_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_dtests_offheap_raw /tmp/all_dtest_tests_j8_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j8_dtests_offheap_raw > /tmp/all_dtest_tests_j8_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_dtests_offheap > /tmp/split_dtest_tests_j8_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j8_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j8_dtests_offheap) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt" - cat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then - export CQLSH_PYTHON=/usr/bin/python3.6 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j8_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j8_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j8_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_utests_stress_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_STRESS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_STRESS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS_STRESS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=stress-test-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant stress-test-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_dtests_vnode_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if true; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_cqlsh_dtests_py3_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 50 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_with_vnodes_raw /tmp/all_dtest_tests_j11_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_with_vnodes_raw > /tmp/all_dtest_tests_j11_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_with_vnodes > /tmp/split_dtest_tests_j11_with_vnodes.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n" - - run: - name: Run dtests (j11_with_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt" - cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then - export CQLSH_PYTHON=/usr/bin/python3.6 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_dtests_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 50 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_dtests_offheap_raw /tmp/all_dtest_tests_j11_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j11_dtests_offheap_raw > /tmp/all_dtest_tests_j11_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_dtests_offheap > /tmp/split_dtest_tests_j11_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j11_dtests_offheap) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\"\ncat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j11_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_cqlsh_dtests_py38_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 50 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_with_vnodes_raw /tmp/all_dtest_tests_j11_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_with_vnodes_raw > /tmp/all_dtest_tests_j11_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_with_vnodes > /tmp/split_dtest_tests_j11_with_vnodes.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n" - - run: - name: Run dtests (j11_with_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt" - cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt - - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then - export CQLSH_PYTHON=/usr/bin/python3.8 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_trie_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-trie\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-trie $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_simulator_dtests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_SIMULATOR_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_SIMULATOR_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_SIMULATOR_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-simulator-dtest\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-simulator-dtest $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_jvm_dtests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_JVM_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_JVM_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_JVM_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-jvm-dtest-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-jvm-dtest-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_cqlsh_dtests_py311_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 50 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_with_vnodes_raw /tmp/all_dtest_tests_j11_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_with_vnodes_raw > /tmp/all_dtest_tests_j11_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_with_vnodes > /tmp/split_dtest_tests_j11_with_vnodes.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n" - - run: - name: Run dtests (j11_with_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt" - cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt - - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then - export CQLSH_PYTHON=/usr/bin/python3.11 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_utests_long_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_LONG_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_LONG_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS_LONG} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=long-testsome\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant long-testsome $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_dtests_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 50 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j8_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_dtests_offheap_raw /tmp/all_dtest_tests_j8_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j8_dtests_offheap_raw > /tmp/all_dtest_tests_j8_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_dtests_offheap > /tmp/split_dtest_tests_j8_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j8_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j8_dtests_offheap) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt\"\ncat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j8_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j8_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j8_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_unit_tests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_jvm_dtests: + j17_jvm_dtests: docker: - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: large @@ -7922,10 +4111,9 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_jvm_dtests_vnode_repeat: + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_repeated_ant_test: docker: - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium @@ -7933,810 +4121,6 @@ jobs: shell: /bin/bash -eo pipefail -l parallelism: 25 steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_JVM_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_JVM_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_JVM_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=true\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-jvm-dtest-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-jvm-dtest-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_build: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Clone Cassandra Repository (via git) - command: | - git clone --single-branch --depth 1 --branch $CIRCLE_BRANCH https://github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME.git ~/cassandra - - run: - name: Build Cassandra - command: | - export PATH=$JAVA_HOME/bin:$PATH - cd ~/cassandra - # Loop to prevent failure due to maven-ant-tasks not downloading a jar.. - for x in $(seq 1 3); do - ${ANT_HOME}/bin/ant clean realclean jar - RETURN="$?" - if [ "${RETURN}" -eq "0" ]; then - break - fi - done - # Exit, if we didn't build successfully - if [ "${RETURN}" -ne "0" ]; then - echo "Build failed with exit code: ${RETURN}" - exit ${RETURN} - fi - no_output_timeout: 15m - - run: - name: Run static code analysis - command: | - export PATH=$JAVA_HOME/bin:$PATH - cd ~/cassandra - ant check - - persist_to_workspace: - root: /home/cassandra - paths: - - cassandra - - .m2 - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_utests_oa_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-oa\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-oa $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_dtests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 50 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j8_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_without_vnodes_raw /tmp/all_dtest_tests_j8_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j8_without_vnodes_raw > /tmp/all_dtest_tests_j8_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_without_vnodes > /tmp/split_dtest_tests_j8_without_vnodes.txt\ncat /tmp/split_dtest_tests_j8_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j8_without_vnodes_final.txt\n" - - run: - name: Run dtests (j8_without_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j8_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j8_without_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_without_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j8_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j8_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j8_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_utests_oa_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-oa\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-oa $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_dtests_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 50 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j8_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_with_vnodes_raw /tmp/all_dtest_tests_j8_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j8_with_vnodes_raw > /tmp/all_dtest_tests_j8_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_with_vnodes > /tmp/split_dtest_tests_j8_with_vnodes.txt\ncat /tmp/split_dtest_tests_j8_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j8_with_vnodes_final.txt\n" - - run: - name: Run dtests (j8_with_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j8_with_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j8_with_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_with_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j8_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j8_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j8_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_cqlshlib_tests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run cqlshlib Unit Tests - command: | - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra/ - ant jar -Dno-checkstyle=true -Drat.skip=true -Dant.gen-doc.skip=true -Djavadoc.skip=true - ./pylib/cassandra-cqlsh-tests.sh $(pwd) - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/pylib - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_jvm_dtests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_JVM_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_JVM_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_JVM_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-jvm-dtest-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-jvm-dtest-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_dtests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 50 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_without_vnodes_raw /tmp/all_dtest_tests_j11_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_without_vnodes_raw > /tmp/all_dtest_tests_j11_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_without_vnodes > /tmp/split_dtest_tests_j11_without_vnodes.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\n" - - run: - name: Run dtests (j11_without_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j11_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j8_repeated_ant_test: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - attach_workspace: at: /home/cassandra - run: @@ -8922,37 +4306,74 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_utests_long: + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_cqlsh_dtests_py3: docker: - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium + resource_class: large working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 1 + parallelism: 50 steps: - attach_workspace: at: /home/cassandra - run: - name: Run Unit Tests (long-test) + name: Clone Cassandra dtest Repository (via git) command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant long-test -Dno-build-test=true + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j11_without_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_without_vnodes_raw /tmp/all_dtest_tests_j11_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_without_vnodes_raw > /tmp/all_dtest_tests_j11_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_without_vnodes > /tmp/split_dtest_tests_j11_without_vnodes.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\n" + - run: + name: Run dtests (j11_without_vnodes) no_output_timeout: 15m + command: | + echo "cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt" + cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt + + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then + export CQLSH_PYTHON=/usr/bin/python3.6 + fi + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + # 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 + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt` + if [ ! -z "$SPLIT_TESTS" ]; then + set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + else + echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" + (exit 1) + fi - store_test_results: - path: /tmp/cassandra/build/test/output/ + path: /tmp/results - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml + path: /tmp/dtest + destination: dtest_j11_without_vnodes - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs + path: ~/cassandra-dtest/logs + destination: dtest_j11_without_vnodes_logs environment: - ANT_HOME: /usr/share/ant - LANG: en_US.UTF-8 @@ -8993,9 +4414,116 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_utests_cdc: + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j17_build: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 1 + steps: + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Clone Cassandra Repository (via git) + command: | + git clone --single-branch --depth 1 --branch $CIRCLE_BRANCH https://github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME.git ~/cassandra + - run: + name: Build Cassandra + command: | + export PATH=$JAVA_HOME/bin:$PATH + cd ~/cassandra + # Loop to prevent failure due to maven-ant-tasks not downloading a jar.. + for x in $(seq 1 3); do + ${ANT_HOME}/bin/ant clean realclean jar + RETURN="$?" + if [ "${RETURN}" -eq "0" ]; then + break + fi + done + # Exit, if we didn't build successfully + if [ "${RETURN}" -ne "0" ]; then + echo "Build failed with exit code: ${RETURN}" + exit ${RETURN} + fi + no_output_timeout: 15m + - run: + name: Run static code analysis + command: | + export PATH=$JAVA_HOME/bin:$PATH + cd ~/cassandra + ant check + - persist_to_workspace: + root: /home/cassandra + paths: + - cassandra + - .m2 + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_utests_cdc: docker: - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium @@ -9110,74 +4638,56 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_cqlsh_dtests_py311_offheap: + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j17_utests_cdc_repeat: docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: large + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 50 + parallelism: 25 steps: - attach_workspace: at: /home/cassandra - run: - name: Clone Cassandra dtest Repository (via git) + name: Log Environment Information command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j8_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_dtests_offheap_raw /tmp/all_dtest_tests_j8_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j8_dtests_offheap_raw > /tmp/all_dtest_tests_j8_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_dtests_offheap > /tmp/split_dtest_tests_j8_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j8_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j8_dtests_offheap) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt" - cat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt - - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then - export CQLSH_PYTHON=/usr/bin/python3.11 - fi - + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_dtests_offheap_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j8_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-cdc\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-cdc $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - store_test_results: - path: /tmp/results + path: /tmp/results/repeated_utests/output - store_artifacts: - path: /tmp/dtest - destination: dtest_j8_dtests_offheap + path: /tmp/results/repeated_utests/stdout + destination: stdout - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j8_dtests_offheap_logs + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs environment: - ANT_HOME: /usr/share/ant - LANG: en_US.UTF-8 @@ -9218,9 +4728,1097 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_dtests_repeat: + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_utests_fqltool: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 1 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Run Unit Tests (fqltool-test) + command: | + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + ant fqltool-test -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_dtests_offheap_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: large + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 25 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Run repeated Python DTests + no_output_timeout: 15m + command: | + if [ "${REPEATED_DTESTS}" == "" ]; then + echo "Repeated dtest name hasn't been defined, exiting without running any test" + elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then + echo "Repeated dtest count hasn't been defined, exiting without running any test" + elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then + echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" + else + + # Calculate the number of test iterations to be run by the current parallel runner. + # Since we are running the same test multiple times there is no need to use `circleci tests split`. + count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) + if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then + count=$((count+1)) + fi + + if (($count <= 0)); then + echo "No tests to run in this runner" + else + echo "Running ${REPEATED_DTESTS} $count times" + + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + + tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") + + stop_on_failure_arg="" + if ${REPEATED_TESTS_STOP_ON_FAILURE}; then + stop_on_failure_arg="-x" + fi + + vnodes_args="" + if true; then + vnodes_args="--use-vnodes --num-tokens=16" + fi + + upgrade_arg="" + if false; then + upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" + 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 --use-off-heap-memtables --skip-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt + fi + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_jvm_dtests_vnode: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: large + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 10 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Determine distributed Tests to Run + command: | + # reminder: this code (along with all the steps) is independently executed on every circle container + # so the goal here is to get the circleci script to return the tests *this* container will run + # which we do via the `circleci` cli tool. + + rm -fr ~/cassandra-dtest/upgrade_tests + echo "***java tests***" + + # get all of our unit test filenames + set -eo pipefail && circleci tests glob "$HOME/cassandra/test/distributed/**/*.java" > /tmp/all_java_unit_tests.txt + + # split up the unit tests into groups based on the number of containers we have + set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt + set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/distributed/;;g" | grep "Test\.java$" | grep -v upgrade > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" + cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + no_output_timeout: 15m + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Run Unit Tests (testclasslist) + command: | + set -x + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + test_timeout=$(grep 'name="test.distributed.timeout"' build.xml | awk -F'"' '{print $4}' || true) + if [ -z "$test_timeout" ]; then + test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') + fi + ant testclasslist -Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16' -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=distributed -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_dtest_jars_build: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 1 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Build Cassandra DTest jars + command: | + export PATH=$JAVA_HOME/bin:$PATH + cd ~/cassandra + mkdir ~/dtest_jars + git remote add apache https://github.com/apache/cassandra.git + for branch in cassandra-4.0 cassandra-4.1 trunk; do + # check out the correct cassandra version: + git remote set-branches --add apache '$branch' + git fetch --depth 1 apache $branch + git checkout $branch + git clean -fd + # Loop to prevent failure due to maven-ant-tasks not downloading a jar.. + for x in $(seq 1 3); do + ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar -Dno-checkstyle=true -Drat.skip=true + RETURN="$?" + if [ "${RETURN}" -eq "0" ]; then + cp build/dtest*.jar ~/dtest_jars + break + fi + done + # Exit, if we didn't build successfully + if [ "${RETURN}" -ne "0" ]; then + echo "Build failed with exit code: ${RETURN}" + exit ${RETURN} + fi + done + # and build the dtest-jar for the branch under test + ${ANT_HOME}/bin/ant realclean + git checkout origin/$CIRCLE_BRANCH + git clean -fd + for x in $(seq 1 3); do + ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar -Dno-checkstyle=true -Drat.skip=true + RETURN="$?" + if [ "${RETURN}" -eq "0" ]; then + cp build/dtest*.jar ~/dtest_jars + break + fi + done + # Exit, if we didn't build successfully + if [ "${RETURN}" -ne "0" ]; then + echo "Build failed with exit code: ${RETURN}" + exit ${RETURN} + fi + ls -l ~/dtest_jars + no_output_timeout: 15m + - persist_to_workspace: + root: /home/cassandra + paths: + - dtest_jars + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_utests_long: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 1 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Run Unit Tests (long-test) + command: | + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + ant long-test -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j17_unit_tests_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 25 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=testsome\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant testsome $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + - store_test_results: + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_simulator_dtests: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 1 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Determine unit Tests to Run + command: | + # reminder: this code (along with all the steps) is independently executed on every circle container + # so the goal here is to get the circleci script to return the tests *this* container will run + # which we do via the `circleci` cli tool. + + rm -fr ~/cassandra-dtest/upgrade_tests + echo "***java tests***" + + # get all of our unit test filenames + set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt + + # split up the unit tests into groups based on the number of containers we have + set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt + set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" + cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + no_output_timeout: 15m + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Run Simulator Tests + command: | + set -x + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + ant test-simulator-dtest -Dno-build-test=true + no_output_timeout: 30m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_jvm_upgrade_dtests: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: xlarge + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Determine distributed Tests to Run + command: | + # reminder: this code (along with all the steps) is independently executed on every circle container + # so the goal here is to get the circleci script to return the tests *this* container will run + # which we do via the `circleci` cli tool. + + rm -fr ~/cassandra-dtest/upgrade_tests + echo "***java tests***" + + # get all of our unit test filenames + set -eo pipefail && circleci tests glob "$HOME/cassandra/test/distributed/**/*.java" > /tmp/all_java_unit_tests.txt + + # split up the unit tests into groups based on the number of containers we have + set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt + set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/distributed/;;g" | grep "Test\.java$" | grep upgrade > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" + cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + no_output_timeout: 15m + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Run Unit Tests (testclasslist) + command: | + set -x + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + test_timeout=$(grep 'name="test.distributed.timeout"' build.xml | awk -F'"' '{print $4}' || true) + if [ -z "$test_timeout" ]; then + test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') + fi + ant testclasslist -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=distributed -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_utests_stress: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 1 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Run Unit Tests (stress-test) + command: | + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + ant stress-test -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_utests_cdc_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 25 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-cdc\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-cdc $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + - store_test_results: + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j17_dtests_vnode: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: large + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 50 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j17_with_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_with_vnodes_raw /tmp/all_dtest_tests_j17_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_with_vnodes_raw > /tmp/all_dtest_tests_j17_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_with_vnodes > /tmp/split_dtest_tests_j17_with_vnodes.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes_final.txt\n" + - run: + name: Run dtests (j17_with_vnodes) + no_output_timeout: 15m + command: "echo \"cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j17_with_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j17_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j17_with_vnodes + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j17_with_vnodes_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_dtests_repeat: docker: - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: large @@ -9350,9 +5948,2201 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_jvm_dtests: + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_utests_compression: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 25 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Determine unit Tests to Run + command: | + # reminder: this code (along with all the steps) is independently executed on every circle container + # so the goal here is to get the circleci script to return the tests *this* container will run + # which we do via the `circleci` cli tool. + + rm -fr ~/cassandra-dtest/upgrade_tests + echo "***java tests***" + + # get all of our unit test filenames + set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt + + # split up the unit tests into groups based on the number of containers we have + set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt + set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" + cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + no_output_timeout: 15m + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Run Unit Tests (testclasslist-compression) + command: | + set -x + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) + if [ -z "$test_timeout" ]; then + test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') + fi + ant testclasslist-compression -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j17_utests_trie_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 25 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-trie\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-trie $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + - store_test_results: + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_cqlsh_dtests_py3_offheap: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: large + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 50 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j11_dtests_offheap) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_dtests_offheap_raw /tmp/all_dtest_tests_j11_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j11_dtests_offheap_raw > /tmp/all_dtest_tests_j11_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_dtests_offheap > /tmp/split_dtest_tests_j11_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\n" + - run: + name: Run dtests (j11_dtests_offheap) + no_output_timeout: 15m + command: | + echo "cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt" + cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt + + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then + export CQLSH_PYTHON=/usr/bin/python3.6 + fi + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + # 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 + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt` + if [ ! -z "$SPLIT_TESTS" ]; then + set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + else + echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" + (exit 1) + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j11_dtests_offheap + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j11_dtests_offheap_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_cqlsh_dtests_py311_offheap: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: large + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 50 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.11/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j11_dtests_offheap) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_dtests_offheap_raw /tmp/all_dtest_tests_j11_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j11_dtests_offheap_raw > /tmp/all_dtest_tests_j11_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_dtests_offheap > /tmp/split_dtest_tests_j11_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\n" + - run: + name: Run dtests (j11_dtests_offheap) + no_output_timeout: 15m + command: | + echo "cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt" + cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt + + source ~/env3.11/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then + export CQLSH_PYTHON=/usr/bin/python3.11 + fi + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + # 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 + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt` + if [ ! -z "$SPLIT_TESTS" ]; then + set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + else + echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" + (exit 1) + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j11_dtests_offheap + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j11_dtests_offheap_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_utests_trie: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 25 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Determine unit Tests to Run + command: | + # reminder: this code (along with all the steps) is independently executed on every circle container + # so the goal here is to get the circleci script to return the tests *this* container will run + # which we do via the `circleci` cli tool. + + rm -fr ~/cassandra-dtest/upgrade_tests + echo "***java tests***" + + # get all of our unit test filenames + set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt + + # split up the unit tests into groups based on the number of containers we have + set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt + set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" + cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + no_output_timeout: 15m + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Run Unit Tests (testclasslist-trie) + command: | + set -x + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) + if [ -z "$test_timeout" ]; then + test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') + fi + ant testclasslist-trie -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_upgrade_dtests: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: large + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 100 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j11_upgradetests_without_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_upgradetests_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --execute-upgrade-tests-only --upgrade-target-version-only --upgrade-version-selection all --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_upgradetests_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_upgradetests_without_vnodes_raw /tmp/all_dtest_tests_j11_upgradetests_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_upgradetests_without_vnodes_raw > /tmp/all_dtest_tests_j11_upgradetests_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_upgradetests_without_vnodes > /tmp/split_dtest_tests_j11_upgradetests_without_vnodes.txt\ncat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt\n" + - run: + name: Run dtests (j11_upgradetests_without_vnodes) + no_output_timeout: 15m + command: "echo \"cat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --execute-upgrade-tests-only --upgrade-target-version-only --upgrade-version-selection all --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j11_upgradetests_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j11_upgradetests_without_vnodes + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j11_upgradetests_without_vnodes_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_dtests_large_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: large + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 25 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Run repeated Python DTests + no_output_timeout: 15m + command: | + if [ "${REPEATED_LARGE_DTESTS}" == "" ]; then + echo "Repeated dtest name hasn't been defined, exiting without running any test" + elif [ "${REPEATED_LARGE_DTESTS_COUNT}" == "" ]; then + echo "Repeated dtest count hasn't been defined, exiting without running any test" + elif [ "${REPEATED_LARGE_DTESTS_COUNT}" -le 0 ]; then + echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" + else + + # Calculate the number of test iterations to be run by the current parallel runner. + # Since we are running the same test multiple times there is no need to use `circleci tests split`. + count=$((${REPEATED_LARGE_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) + if (($CIRCLE_NODE_INDEX < (${REPEATED_LARGE_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then + count=$((count+1)) + fi + + if (($count <= 0)); then + echo "No tests to run in this runner" + else + echo "Running ${REPEATED_LARGE_DTESTS} $count times" + + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + + tests_arg=$(echo ${REPEATED_LARGE_DTESTS} | sed -e "s/,/ /g") + + stop_on_failure_arg="" + if ${REPEATED_TESTS_STOP_ON_FAILURE}; then + stop_on_failure_arg="-x" + fi + + vnodes_args="" + if false; then + vnodes_args="--use-vnodes --num-tokens=16" + fi + + upgrade_arg="" + if false; then + upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" + 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 --only-resource-intensive-tests --force-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt + fi + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j17_utests_compression_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 25 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-compression\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-compression $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + - store_test_results: + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_cqlsh_dtests_py3_vnode: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: large + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 50 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j11_with_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_with_vnodes_raw /tmp/all_dtest_tests_j11_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_with_vnodes_raw > /tmp/all_dtest_tests_j11_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_with_vnodes > /tmp/split_dtest_tests_j11_with_vnodes.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n" + - run: + name: Run dtests (j11_with_vnodes) + no_output_timeout: 15m + command: | + echo "cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt" + cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt + + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then + export CQLSH_PYTHON=/usr/bin/python3.6 + fi + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + # 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 + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt` + if [ ! -z "$SPLIT_TESTS" ]; then + set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + else + echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" + (exit 1) + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j11_with_vnodes + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j11_with_vnodes_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j17_utests_fqltool: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 1 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Run Unit Tests (fqltool-test) + command: | + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + ant fqltool-test -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_dtests_large_vnode: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: xlarge + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j17_large_with_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_large_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --only-resource-intensive-tests --force-resource-intensive-tests --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_large_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_large_with_vnodes_raw /tmp/all_dtest_tests_j17_large_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_large_with_vnodes_raw > /tmp/all_dtest_tests_j17_large_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_large_with_vnodes > /tmp/split_dtest_tests_j17_large_with_vnodes.txt\ncat /tmp/split_dtest_tests_j17_large_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_large_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_large_with_vnodes_final.txt\n" + - run: + name: Run dtests (j17_large_with_vnodes) + no_output_timeout: 15m + command: "echo \"cat /tmp/split_dtest_tests_j17_large_with_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j17_large_with_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_large_with_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --only-resource-intensive-tests --force-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j17_large_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j17_large_with_vnodes + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j17_large_with_vnodes_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_dtests_offheap: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: large + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 50 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j11_dtests_offheap) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_dtests_offheap_raw /tmp/all_dtest_tests_j11_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j11_dtests_offheap_raw > /tmp/all_dtest_tests_j11_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_dtests_offheap > /tmp/split_dtest_tests_j11_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\n" + - run: + name: Run dtests (j11_dtests_offheap) + no_output_timeout: 15m + command: "echo \"cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\"\ncat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j11_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j11_dtests_offheap + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j11_dtests_offheap_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_cqlsh_dtests_py38_vnode: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: large + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 50 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.8/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j11_with_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_with_vnodes_raw /tmp/all_dtest_tests_j11_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_with_vnodes_raw > /tmp/all_dtest_tests_j11_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_with_vnodes > /tmp/split_dtest_tests_j11_with_vnodes.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n" + - run: + name: Run dtests (j11_with_vnodes) + no_output_timeout: 15m + command: | + echo "cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt" + cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt + + source ~/env3.8/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then + export CQLSH_PYTHON=/usr/bin/python3.8 + fi + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + # 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 + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt` + if [ ! -z "$SPLIT_TESTS" ]; then + set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + else + echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" + (exit 1) + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j11_with_vnodes + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j11_with_vnodes_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_utests_trie_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 25 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-trie\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-trie $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + - store_test_results: + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_simulator_dtests_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 25 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_SIMULATOR_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_SIMULATOR_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_SIMULATOR_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-simulator-dtest\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-simulator-dtest $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + - store_test_results: + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_jvm_dtests_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 25 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_JVM_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_JVM_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_JVM_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-jvm-dtest-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-jvm-dtest-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + - store_test_results: + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j17_cqlsh_dtests_py38_offheap: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: large + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 50 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.8/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j17_dtests_offheap) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_dtests_offheap_raw /tmp/all_dtest_tests_j17_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j17_dtests_offheap_raw > /tmp/all_dtest_tests_j17_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_dtests_offheap > /tmp/split_dtest_tests_j17_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\n" + - run: + name: Run dtests (j17_dtests_offheap) + no_output_timeout: 15m + command: | + echo "cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt" + cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt + + source ~/env3.8/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then + export CQLSH_PYTHON=/usr/bin/python3.8 + fi + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + # 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 + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt` + if [ ! -z "$SPLIT_TESTS" ]; then + set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + else + echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" + (exit 1) + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j17_dtests_offheap + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j17_dtests_offheap_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_cqlshlib_tests: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 1 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Run cqlshlib Unit Tests + command: | + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra/ + ant jar -Dno-checkstyle=true -Drat.skip=true -Dant.gen-doc.skip=true -Djavadoc.skip=true + ./pylib/cassandra-cqlsh-tests.sh $(pwd) + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/pylib + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_cqlsh_dtests_py311_vnode: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: large + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 50 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.11/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j11_with_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_with_vnodes_raw /tmp/all_dtest_tests_j11_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_with_vnodes_raw > /tmp/all_dtest_tests_j11_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_with_vnodes > /tmp/split_dtest_tests_j11_with_vnodes.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n" + - run: + name: Run dtests (j11_with_vnodes) + no_output_timeout: 15m + command: | + echo "cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt" + cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt + + source ~/env3.11/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then + export CQLSH_PYTHON=/usr/bin/python3.11 + fi + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + # 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 + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt` + if [ ! -z "$SPLIT_TESTS" ]; then + set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + else + echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" + (exit 1) + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j11_with_vnodes + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j11_with_vnodes_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j17_utests_system_keyspace_directory: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 25 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Determine unit Tests to Run + command: | + # reminder: this code (along with all the steps) is independently executed on every circle container + # so the goal here is to get the circleci script to return the tests *this* container will run + # which we do via the `circleci` cli tool. + + rm -fr ~/cassandra-dtest/upgrade_tests + echo "***java tests***" + + # get all of our unit test filenames + set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt + + # split up the unit tests into groups based on the number of containers we have + set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt + set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" + cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + no_output_timeout: 15m + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Run Unit Tests (testclasslist-system-keyspace-directory) + command: | + set -x + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) + if [ -z "$test_timeout" ]; then + test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') + fi + ant testclasslist-system-keyspace-directory -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_cqlsh_dtests_py3_vnode: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: large + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 50 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j17_with_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_with_vnodes_raw /tmp/all_dtest_tests_j17_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_with_vnodes_raw > /tmp/all_dtest_tests_j17_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_with_vnodes > /tmp/split_dtest_tests_j17_with_vnodes.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes_final.txt\n" + - run: + name: Run dtests (j17_with_vnodes) + no_output_timeout: 15m + command: | + echo "cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt" + cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt + + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then + export CQLSH_PYTHON=/usr/bin/python3.6 + fi + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + # 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 + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt` + if [ ! -z "$SPLIT_TESTS" ]; then + set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + else + echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" + (exit 1) + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j17_with_vnodes + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j17_with_vnodes_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_cqlsh_dtests_py311_vnode: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: large + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 50 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.11/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j17_with_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_with_vnodes_raw /tmp/all_dtest_tests_j17_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_with_vnodes_raw > /tmp/all_dtest_tests_j17_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_with_vnodes > /tmp/split_dtest_tests_j17_with_vnodes.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes_final.txt\n" + - run: + name: Run dtests (j17_with_vnodes) + no_output_timeout: 15m + command: | + echo "cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt" + cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt + + source ~/env3.11/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then + export CQLSH_PYTHON=/usr/bin/python3.11 + fi + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + # 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 + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt` + if [ ! -z "$SPLIT_TESTS" ]; then + set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + else + echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" + (exit 1) + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j17_with_vnodes + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j17_with_vnodes_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_jvm_dtests: docker: - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: large @@ -9467,9 +8257,171 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_build: + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j17_utests_stress: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 1 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Run Unit Tests (stress-test) + command: | + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + ant stress-test -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_jvm_dtests_vnode_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 25 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_JVM_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_JVM_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_JVM_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=true\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-jvm-dtest-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-jvm-dtest-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + - store_test_results: + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_build: docker: - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium @@ -9573,74 +8525,56 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_cqlsh_dtests_py38_vnode: + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_utests_oa_repeat: docker: - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: large + resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 50 + parallelism: 25 steps: - attach_workspace: at: /home/cassandra - run: - name: Clone Cassandra dtest Repository (via git) + name: Log Environment Information command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j8_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j8_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j8_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_with_vnodes_raw /tmp/all_dtest_tests_j8_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j8_with_vnodes_raw > /tmp/all_dtest_tests_j8_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j8_with_vnodes > /tmp/split_dtest_tests_j8_with_vnodes.txt\ncat /tmp/split_dtest_tests_j8_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j8_with_vnodes_final.txt\n" - - run: - name: Run dtests (j8_with_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j8_with_vnodes_final.txt" - cat /tmp/split_dtest_tests_j8_with_vnodes_final.txt - - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then - export CQLSH_PYTHON=/usr/bin/python3.8 - fi - + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j8_with_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j8_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-oa\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-oa $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - store_test_results: - path: /tmp/results + path: /tmp/results/repeated_utests/output - store_artifacts: - path: /tmp/dtest - destination: dtest_j8_with_vnodes + path: /tmp/results/repeated_utests/stdout + destination: stdout - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j8_with_vnodes_logs + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs environment: - ANT_HOME: /usr/share/ant - LANG: en_US.UTF-8 @@ -9681,11 +8615,676 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_unit_tests_repeat: + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_cqlshlib_tests: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 1 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Run cqlshlib Unit Tests + command: | + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra/ + ant jar -Dno-checkstyle=true -Drat.skip=true -Dant.gen-doc.skip=true -Djavadoc.skip=true + ./pylib/cassandra-cqlsh-tests.sh $(pwd) + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/pylib + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j11_dtests: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: large + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 50 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j11_without_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_without_vnodes_raw /tmp/all_dtest_tests_j11_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_without_vnodes_raw > /tmp/all_dtest_tests_j11_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_without_vnodes > /tmp/split_dtest_tests_j11_without_vnodes.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\n" + - run: + name: Run dtests (j11_without_vnodes) + no_output_timeout: 15m + command: "echo \"cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j11_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j11_without_vnodes + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j11_without_vnodes_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + - CASSANDRA_USE_JDK11: true + j17_jvm_dtests_vnode: docker: - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: large + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 10 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Determine distributed Tests to Run + command: | + # reminder: this code (along with all the steps) is independently executed on every circle container + # so the goal here is to get the circleci script to return the tests *this* container will run + # which we do via the `circleci` cli tool. + + rm -fr ~/cassandra-dtest/upgrade_tests + echo "***java tests***" + + # get all of our unit test filenames + set -eo pipefail && circleci tests glob "$HOME/cassandra/test/distributed/**/*.java" > /tmp/all_java_unit_tests.txt + + # split up the unit tests into groups based on the number of containers we have + set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt + set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/distributed/;;g" | grep "Test\.java$" | grep -v upgrade > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" + cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + no_output_timeout: 15m + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Run Unit Tests (testclasslist) + command: | + set -x + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + test_timeout=$(grep 'name="test.distributed.timeout"' build.xml | awk -F'"' '{print $4}' || true) + if [ -z "$test_timeout" ]; then + test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') + fi + ant testclasslist -Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16' -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=distributed -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_cqlsh_dtests_py38: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: large + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 50 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.8/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j17_without_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_without_vnodes_raw /tmp/all_dtest_tests_j17_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_without_vnodes_raw > /tmp/all_dtest_tests_j17_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_without_vnodes > /tmp/split_dtest_tests_j17_without_vnodes.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes_final.txt\n" + - run: + name: Run dtests (j17_without_vnodes) + no_output_timeout: 15m + command: | + echo "cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt" + cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt + + source ~/env3.8/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then + export CQLSH_PYTHON=/usr/bin/python3.8 + fi + + java -version + cd ~/cassandra-dtest + mkdir -p /tmp/dtest + + echo "env: $(env)" + echo "** done env" + mkdir -p /tmp/results/dtests + # 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 + export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt` + if [ ! -z "$SPLIT_TESTS" ]; then + set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt + else + echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" + (exit 1) + fi + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j17_without_vnodes + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j17_without_vnodes_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_utests_cdc: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 25 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Determine unit Tests to Run + command: | + # reminder: this code (along with all the steps) is independently executed on every circle container + # so the goal here is to get the circleci script to return the tests *this* container will run + # which we do via the `circleci` cli tool. + + rm -fr ~/cassandra-dtest/upgrade_tests + echo "***java tests***" + + # get all of our unit test filenames + set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt + + # split up the unit tests into groups based on the number of containers we have + set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt + set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" + cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt + no_output_timeout: 15m + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Run Unit Tests (testclasslist-cdc) + command: | + set -x + export PATH=$JAVA_HOME/bin:$PATH + time mv ~/cassandra /tmp + cd /tmp/cassandra + if [ -d ~/dtest_jars ]; then + cp ~/dtest_jars/dtest* /tmp/cassandra/build/ + fi + test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) + if [ -z "$test_timeout" ]; then + test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') + fi + ant testclasslist-cdc -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true + no_output_timeout: 15m + - store_test_results: + path: /tmp/cassandra/build/test/output/ + - store_artifacts: + path: /tmp/cassandra/build/test/output + destination: junitxml + - store_artifacts: + path: /tmp/cassandra/build/test/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_utests_fqltool_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 25 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_FQLTOOL_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_FQLTOOL_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS_FQLTOOL} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=fqltool-test\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant fqltool-test $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + - store_test_results: + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_dtests_large: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: xlarge + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 4 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j17_large_without_vnodes) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_large_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --only-resource-intensive-tests --force-resource-intensive-tests --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_large_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_large_without_vnodes_raw /tmp/all_dtest_tests_j17_large_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_large_without_vnodes_raw > /tmp/all_dtest_tests_j17_large_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_large_without_vnodes > /tmp/split_dtest_tests_j17_large_without_vnodes.txt\ncat /tmp/split_dtest_tests_j17_large_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_large_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_large_without_vnodes_final.txt\n" + - run: + name: Run dtests (j17_large_without_vnodes) + no_output_timeout: 15m + command: "echo \"cat /tmp/split_dtest_tests_j17_large_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j17_large_without_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_large_without_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --only-resource-intensive-tests --force-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j17_large_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j17_large_without_vnodes + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j17_large_without_vnodes_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_unit_tests_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -9773,9 +9372,9 @@ jobs: - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - CASSANDRA_USE_JDK11: true - j8_utests_fqltool: + j17_utests_long: docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -9784,7 +9383,7 @@ jobs: - attach_workspace: at: /home/cassandra - run: - name: Run Unit Tests (fqltool-test) + name: Run Unit Tests (long-test) command: | export PATH=$JAVA_HOME/bin:$PATH time mv ~/cassandra /tmp @@ -9792,7 +9391,7 @@ jobs: if [ -d ~/dtest_jars ]; then cp ~/dtest_jars/dtest* /tmp/cassandra/build/ fi - ant fqltool-test -Dno-build-test=true + ant long-test -Dno-build-test=true no_output_timeout: 15m - store_test_results: path: /tmp/cassandra/build/test/output/ @@ -9842,29 +9441,55 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_cqlshlib_tests: + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_utests_oa_repeat: docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l - parallelism: 1 + parallelism: 25 steps: - attach_workspace: at: /home/cassandra - run: - name: Run cqlshlib Unit Tests + name: Log Environment Information command: | - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra/ - ant jar -Dno-checkstyle=true -Drat.skip=true -Dant.gen-doc.skip=true -Djavadoc.skip=true - ./pylib/cassandra-cqlsh-tests.sh $(pwd) + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-oa\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-oa $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - store_test_results: - path: /tmp/cassandra/pylib + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs environment: - ANT_HOME: /usr/share/ant - LANG: en_US.UTF-8 @@ -9905,11 +9530,11 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 j11_dtests_vnode: docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest resource_class: large working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -9917,28 +9542,6 @@ jobs: steps: - attach_workspace: at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - run: name: Clone Cassandra dtest Repository (via git) command: | @@ -10014,9 +9617,9 @@ jobs: - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - CASSANDRA_USE_JDK11: true - j8_utests_cdc_repeat: + j17_jvm_dtests_repeat: docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -10049,7 +9652,7 @@ jobs: - run: name: Repeatedly run new or modifed JUnit tests no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-cdc\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-cdc $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_JVM_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_JVM_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_JVM_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-jvm-dtest-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-jvm-dtest-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - store_test_results: path: /tmp/results/repeated_utests/output - store_artifacts: @@ -10101,11 +9704,117 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j8_dtests_large_vnode_repeat: + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_dtests_offheap: docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + - image: apache/cassandra-testing-ubuntu2004-java11:latest + resource_class: large + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 50 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Clone Cassandra dtest Repository (via git) + command: | + git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest + - run: + name: Configure virtualenv and python Dependencies + command: | + # note, this should be super quick as all dependencies should be pre-installed in the docker image + # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated + # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and + # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) + source ~/env3.6/bin/activate + export PATH=$JAVA_HOME/bin:$PATH + pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt + pip3 uninstall -y cqlsh + pip3 freeze + - run: + name: Determine Tests to Run (j17_dtests_offheap) + no_output_timeout: 5m + command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_dtests_offheap_raw /tmp/all_dtest_tests_j17_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j17_dtests_offheap_raw > /tmp/all_dtest_tests_j17_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_dtests_offheap > /tmp/split_dtest_tests_j17_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\n" + - run: + name: Run dtests (j17_dtests_offheap) + no_output_timeout: 15m + command: "echo \"cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\"\ncat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j17_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" + - store_test_results: + path: /tmp/results + - store_artifacts: + path: /tmp/dtest + destination: dtest_j17_dtests_offheap + - store_artifacts: + path: ~/cassandra-dtest/logs + destination: dtest_j17_dtests_offheap_logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_dtests_large_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: large working_directory: ~/ shell: /bin/bash -eo pipefail -l @@ -10172,7 +9881,7 @@ jobs: fi vnodes_args="" - if true; then + if false; then vnodes_args="--use-vnodes --num-tokens=16" fi @@ -10233,9 +9942,9 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - j11_utests_long_repeat: + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j17_utests_long_repeat: docker: - image: apache/cassandra-testing-ubuntu2004-java11:latest resource_class: medium @@ -10322,543 +10031,100 @@ jobs: - REPEATED_ANT_TEST_METHODS: null - REPEATED_ANT_TEST_VNODES: false - REPEATED_ANT_TEST_COUNT: 500 + - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + j11_utests_long_repeat: + docker: + - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest + resource_class: medium + working_directory: ~/ + shell: /bin/bash -eo pipefail -l + parallelism: 25 + steps: + - attach_workspace: + at: /home/cassandra + - run: + name: Log Environment Information + command: | + echo '*** id ***' + id + echo '*** cat /proc/cpuinfo ***' + cat /proc/cpuinfo + echo '*** free -m ***' + free -m + echo '*** df -m ***' + df -m + echo '*** ifconfig -a ***' + ifconfig -a + echo '*** uname -a ***' + uname -a + echo '*** mount ***' + mount + echo '*** env ***' + env + echo '*** java ***' + which java + java -version + - run: + name: Repeatedly run new or modifed JUnit tests + no_output_timeout: 15m + command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_LONG_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_LONG_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS_LONG} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=long-testsome\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant long-testsome $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" + - store_test_results: + path: /tmp/results/repeated_utests/output + - store_artifacts: + path: /tmp/results/repeated_utests/stdout + destination: stdout + - store_artifacts: + path: /tmp/results/repeated_utests/output + destination: junitxml + - store_artifacts: + path: /tmp/results/repeated_utests/logs + destination: logs + environment: + - ANT_HOME: /usr/share/ant + - LANG: en_US.UTF-8 + - KEEP_TEST_DIR: true + - DEFAULT_DIR: /home/cassandra/cassandra-dtest + - PYTHONIOENCODING: utf-8 + - PYTHONUNBUFFERED: true + - CASS_DRIVER_NO_EXTENSIONS: true + - CASS_DRIVER_NO_CYTHON: true + - CASSANDRA_SKIP_SYNC: true + - DTEST_REPO: https://github.com/apache/cassandra-dtest.git + - DTEST_BRANCH: trunk + - CCM_MAX_HEAP_SIZE: 1024M + - CCM_HEAP_NEWSIZE: 256M + - REPEATED_TESTS_STOP_ON_FAILURE: false + - REPEATED_UTESTS: null + - REPEATED_UTESTS_COUNT: 500 + - REPEATED_UTESTS_FQLTOOL: null + - REPEATED_UTESTS_FQLTOOL_COUNT: 500 + - REPEATED_UTESTS_LONG: null + - REPEATED_UTESTS_LONG_COUNT: 100 + - REPEATED_UTESTS_STRESS: null + - REPEATED_UTESTS_STRESS_COUNT: 500 + - REPEATED_SIMULATOR_DTESTS: null + - REPEATED_SIMULATOR_DTESTS_COUNT: 500 + - REPEATED_JVM_DTESTS: null + - REPEATED_JVM_DTESTS_COUNT: 500 + - REPEATED_JVM_UPGRADE_DTESTS: null + - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 + - REPEATED_DTESTS: null + - REPEATED_DTESTS_COUNT: 500 + - REPEATED_LARGE_DTESTS: null + - REPEATED_LARGE_DTESTS_COUNT: 100 + - REPEATED_UPGRADE_DTESTS: null + - REPEATED_UPGRADE_DTESTS_COUNT: 25 + - REPEATED_ANT_TEST_TARGET: testsome + - REPEATED_ANT_TEST_CLASS: null + - REPEATED_ANT_TEST_METHODS: null + - REPEATED_ANT_TEST_VNODES: false + - REPEATED_ANT_TEST_COUNT: 500 - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - CASSANDRA_USE_JDK11: true workflows: version: 2 - java8_separate_tests: - jobs: - - start_j8_build: - type: approval - - j8_build: - requires: - - start_j8_build - - start_j8_unit_tests: - type: approval - - j8_unit_tests: - requires: - - start_j8_unit_tests - - j8_build - - start_j8_jvm_dtests: - type: approval - - j8_jvm_dtests: - requires: - - start_j8_jvm_dtests - - j8_build - - start_j8_jvm_dtests_vnode: - type: approval - - j8_jvm_dtests_vnode: - requires: - - start_j8_jvm_dtests_vnode - - j8_build - - start_j11_jvm_dtests: - type: approval - - j11_jvm_dtests: - requires: - - start_j11_jvm_dtests - - j8_build - - start_j11_jvm_dtests_vnode: - type: approval - - j11_jvm_dtests_vnode: - requires: - - start_j11_jvm_dtests_vnode - - j8_build - - start_j8_simulator_dtests: - type: approval - - j8_simulator_dtests: - requires: - - start_j8_simulator_dtests - - j8_build - - start_j8_cqlshlib_tests: - type: approval - - j8_cqlshlib_tests: - requires: - - start_j8_cqlshlib_tests - - j8_build - - start_j8_cqlshlib_cython_tests: - type: approval - - j8_cqlshlib_cython_tests: - requires: - - start_j8_cqlshlib_cython_tests - - j8_build - - start_j11_cqlshlib_tests: - type: approval - - j11_cqlshlib_tests: - requires: - - start_j11_cqlshlib_tests - - j8_build - - start_j11_cqlshlib_cython_tests: - type: approval - - j11_cqlshlib_cython_tests: - requires: - - start_j11_cqlshlib_cython_tests - - j8_build - - start_j11_unit_tests: - type: approval - - j11_unit_tests: - requires: - - start_j11_unit_tests - - j8_build - - start_j8_utests_oa: - type: approval - - j8_utests_oa: - requires: - - start_j8_utests_oa - - j8_build - - start_j11_utests_oa: - type: approval - - j11_utests_oa: - requires: - - start_j11_utests_oa - - j8_build - - start_j8_utests_long: - type: approval - - j8_utests_long: - requires: - - start_j8_utests_long - - j8_build - - start_j11_utests_long: - type: approval - - j11_utests_long: - requires: - - start_j11_utests_long - - j8_build - - start_j8_utests_cdc: - type: approval - - j8_utests_cdc: - requires: - - start_j8_utests_cdc - - j8_build - - start_j11_utests_cdc: - type: approval - - j11_utests_cdc: - requires: - - start_j11_utests_cdc - - j8_build - - start_j8_utests_compression: - type: approval - - j8_utests_compression: - requires: - - start_j8_utests_compression - - j8_build - - start_j11_utests_compression: - type: approval - - j11_utests_compression: - requires: - - start_j11_utests_compression - - j8_build - - start_j8_utests_trie: - type: approval - - j8_utests_trie: - requires: - - start_j8_utests_trie - - j8_build - - start_j11_utests_trie: - type: approval - - j11_utests_trie: - requires: - - start_j11_utests_trie - - j8_build - - start_j8_utests_stress: - type: approval - - j8_utests_stress: - requires: - - start_j8_utests_stress - - j8_build - - start_j11_utests_stress: - type: approval - - j11_utests_stress: - requires: - - start_j11_utests_stress - - j8_build - - start_j8_utests_fqltool: - type: approval - - j8_utests_fqltool: - requires: - - start_j8_utests_fqltool - - j8_build - - start_j11_utests_fqltool: - type: approval - - j11_utests_fqltool: - requires: - - start_j11_utests_fqltool - - j8_build - - start_j8_utests_system_keyspace_directory: - type: approval - - j8_utests_system_keyspace_directory: - requires: - - start_j8_utests_system_keyspace_directory - - j8_build - - start_j11_utests_system_keyspace_directory: - type: approval - - j11_utests_system_keyspace_directory: - requires: - - start_j11_utests_system_keyspace_directory - - j8_build - - start_j8_dtests: - type: approval - - j8_dtests: - requires: - - start_j8_dtests - - j8_build - - start_j8_dtests_vnode: - type: approval - - j8_dtests_vnode: - requires: - - start_j8_dtests_vnode - - j8_build - - start_j8_dtests_offheap: - type: approval - - j8_dtests_offheap: - requires: - - start_j8_dtests_offheap - - j8_build - - start_j11_dtests: - type: approval - - j11_dtests: - requires: - - start_j11_dtests - - j8_build - - start_j11_dtests_vnode: - type: approval - - j11_dtests_vnode: - requires: - - start_j11_dtests_vnode - - j8_build - - start_j11_dtests_offheap: - type: approval - - j11_dtests_offheap: - requires: - - start_j11_dtests_offheap - - j8_build - - start_j8_dtests_large: - type: approval - - j8_dtests_large: - requires: - - start_j8_dtests_large - - j8_build - - start_j8_dtests_large_vnode: - type: approval - - j8_dtests_large_vnode: - requires: - - start_j8_dtests_large_vnode - - j8_build - - start_j11_dtests_large: - type: approval - - j11_dtests_large: - requires: - - start_j11_dtests_large - - j8_build - - start_j11_dtests_large_vnode: - type: approval - - j11_dtests_large_vnode: - requires: - - start_j11_dtests_large_vnode - - j8_build - - start_j8_cqlsh_tests: - type: approval - - j8_cqlsh_dtests_py3: - requires: - - start_j8_cqlsh_tests - - j8_build - - j8_cqlsh_dtests_py3_vnode: - requires: - - start_j8_cqlsh_tests - - j8_build - - j8_cqlsh_dtests_py38: - requires: - - start_j8_cqlsh_tests - - j8_build - - j8_cqlsh_dtests_py311: - requires: - - start_j8_cqlsh_tests - - j8_build - - j8_cqlsh_dtests_py38_vnode: - requires: - - start_j8_cqlsh_tests - - j8_build - - j8_cqlsh_dtests_py311_vnode: - requires: - - start_j8_cqlsh_tests - - j8_build - - start_j8_cqlsh_tests_offheap: - type: approval - - j8_cqlsh_dtests_py3_offheap: - requires: - - start_j8_cqlsh_tests_offheap - - j8_build - - j8_cqlsh_dtests_py38_offheap: - requires: - - start_j8_cqlsh_tests_offheap - - j8_build - - j8_cqlsh_dtests_py311_offheap: - requires: - - start_j8_cqlsh_tests_offheap - - j8_build - - start_j11_cqlsh_tests: - type: approval - - j11_cqlsh_dtests_py3: - requires: - - start_j11_cqlsh_tests - - j8_build - - j11_cqlsh_dtests_py3_vnode: - requires: - - start_j11_cqlsh_tests - - j8_build - - j11_cqlsh_dtests_py38: - requires: - - start_j11_cqlsh_tests - - j8_build - - j11_cqlsh_dtests_py311: - requires: - - start_j11_cqlsh_tests - - j8_build - - j11_cqlsh_dtests_py38_vnode: - requires: - - start_j11_cqlsh_tests - - j8_build - - j11_cqlsh_dtests_py311_vnode: - requires: - - start_j11_cqlsh_tests - - j8_build - - start_j11_cqlsh_tests_offheap: - type: approval - - j11_cqlsh_dtests_py3_offheap: - requires: - - start_j11_cqlsh_tests_offheap - - j8_build - - j11_cqlsh_dtests_py38_offheap: - requires: - - start_j11_cqlsh_tests_offheap - - j8_build - - j11_cqlsh_dtests_py311_offheap: - requires: - - start_j11_cqlsh_tests_offheap - - j8_build - java8_pre-commit_tests: - jobs: - - start_pre-commit_tests: - type: approval - - j8_build: - requires: - - start_pre-commit_tests - - j8_unit_tests: - requires: - - j8_build - - j8_utests_oa: - requires: - - j8_build - - j8_simulator_dtests: - requires: - - j8_build - - j8_jvm_dtests: - requires: - - j8_build - - j8_jvm_dtests_vnode: - requires: - - j8_build - - j11_jvm_dtests: - requires: - - j8_build - - j11_jvm_dtests_vnode: - requires: - - j8_build - - j8_cqlshlib_tests: - requires: - - j8_build - - j8_cqlshlib_cython_tests: - requires: - - j8_build - - j11_cqlshlib_tests: - requires: - - j8_build - - j11_cqlshlib_cython_tests: - requires: - - j8_build - - j11_unit_tests: - requires: - - j8_build - - j11_utests_oa: - requires: - - j8_build - - start_utests_long: - type: approval - - j8_utests_long: - requires: - - start_utests_long - - j8_build - - j11_utests_long: - requires: - - start_utests_long - - j8_build - - start_utests_cdc: - type: approval - - j8_utests_cdc: - requires: - - start_utests_cdc - - j8_build - - j11_utests_cdc: - requires: - - start_utests_cdc - - j8_build - - start_utests_compression: - type: approval - - j8_utests_compression: - requires: - - start_utests_compression - - j8_build - - j11_utests_compression: - requires: - - start_utests_compression - - j8_build - - start_utests_trie: - type: approval - - j8_utests_trie: - requires: - - start_utests_trie - - j8_build - - j11_utests_trie: - requires: - - start_utests_trie - - j8_build - - start_utests_stress: - type: approval - - j8_utests_stress: - requires: - - start_utests_stress - - j8_build - - j11_utests_stress: - requires: - - start_utests_stress - - j8_build - - start_utests_fqltool: - type: approval - - j8_utests_fqltool: - requires: - - start_utests_fqltool - - j8_build - - j11_utests_fqltool: - requires: - - start_utests_fqltool - - j8_build - - start_utests_system_keyspace_directory: - type: approval - - j8_utests_system_keyspace_directory: - requires: - - j8_build - - j11_utests_system_keyspace_directory: - requires: - - start_utests_system_keyspace_directory - - j8_build - - j8_dtests: - requires: - - j8_build - - j8_dtests_vnode: - requires: - - j8_build - - start_j8_dtests_offheap: - type: approval - - j8_dtests_offheap: - requires: - - start_j8_dtests_offheap - - j8_build - - j11_dtests: - requires: - - j8_build - - j11_dtests_vnode: - requires: - - j8_build - - start_j11_dtests_offheap: - type: approval - - j11_dtests_offheap: - requires: - - start_j11_dtests_offheap - - j8_build - - start_j8_dtests_large: - type: approval - - j8_dtests_large: - requires: - - start_j8_dtests_large - - j8_build - - j8_dtests_large_vnode: - requires: - - start_j8_dtests_large - - j8_build - - start_j11_dtests_large: - type: approval - - j11_dtests_large: - requires: - - start_j11_dtests_large - - j8_build - - j11_dtests_large_vnode: - requires: - - start_j11_dtests_large - - j8_build - - j8_cqlsh_dtests_py3: - requires: - - j8_build - - j8_cqlsh_dtests_py3_vnode: - requires: - - j8_build - - j8_cqlsh_dtests_py38: - requires: - - j8_build - - j8_cqlsh_dtests_py311: - requires: - - j8_build - - j8_cqlsh_dtests_py38_vnode: - requires: - - j8_build - - j8_cqlsh_dtests_py311_vnode: - requires: - - j8_build - - start_j8_cqlsh_dtests_offheap: - type: approval - - j8_cqlsh_dtests_py3_offheap: - requires: - - start_j8_cqlsh_dtests_offheap - - j8_build - - j8_cqlsh_dtests_py38_offheap: - requires: - - start_j8_cqlsh_dtests_offheap - - j8_build - - j8_cqlsh_dtests_py311_offheap: - requires: - - start_j8_cqlsh_dtests_offheap - - j8_build - - j11_cqlsh_dtests_py3: - requires: - - j8_build - - j11_cqlsh_dtests_py3_vnode: - requires: - - j8_build - - j11_cqlsh_dtests_py38: - requires: - - j8_build - - j11_cqlsh_dtests_py311: - requires: - - j8_build - - j11_cqlsh_dtests_py38_vnode: - requires: - - j8_build - - j11_cqlsh_dtests_py311_vnode: - requires: - - j8_build - - start_j11_cqlsh-dtests-offheap: - type: approval - - j11_cqlsh_dtests_py3_offheap: - requires: - - start_j11_cqlsh-dtests-offheap - - j8_build - - j11_cqlsh_dtests_py38_offheap: - requires: - - start_j11_cqlsh-dtests-offheap - - j8_build - - j11_cqlsh_dtests_py311_offheap: - requires: - - start_j11_cqlsh-dtests-offheap - - j8_build java11_separate_tests: jobs: - start_j11_build: @@ -10884,6 +10150,18 @@ workflows: requires: - start_j11_jvm_dtests_vnode - j11_build + - start_j17_jvm_dtests: + type: approval + - j17_jvm_dtests: + requires: + - start_j17_jvm_dtests + - j11_build + - start_j17_jvm_dtests_vnode: + type: approval + - j17_jvm_dtests_vnode: + requires: + - start_j17_jvm_dtests_vnode + - j11_build - start_j11_simulator_dtests: type: approval - j11_simulator_dtests: @@ -10902,6 +10180,132 @@ workflows: requires: - start_j11_cqlshlib_cython_tests - j11_build + - start_j17_cqlshlib_tests: + type: approval + - j17_cqlshlib_tests: + requires: + - start_j17_cqlshlib_tests + - j11_build + - start_j17_cqlshlib_cython_tests: + type: approval + - j17_cqlshlib_cython_tests: + requires: + - start_j17_cqlshlib_cython_tests + - j11_build + - start_j17_unit_tests: + type: approval + - j17_unit_tests: + requires: + - start_j17_unit_tests + - j11_build + - start_j11_utests_oa: + type: approval + - j11_utests_oa: + requires: + - start_j11_utests_oa + - j11_build + - start_j17_utests_oa: + type: approval + - j17_utests_oa: + requires: + - start_j17_utests_oa + - j11_build + - start_j11_utests_long: + type: approval + - j11_utests_long: + requires: + - start_j11_utests_long + - j11_build + - start_j17_utests_long: + type: approval + - j17_utests_long: + requires: + - start_j17_utests_long + - j11_build + - start_j11_utests_cdc: + type: approval + - j11_utests_cdc: + requires: + - start_j11_utests_cdc + - j11_build + - start_j17_utests_cdc: + type: approval + - j17_utests_cdc: + requires: + - start_j17_utests_cdc + - j11_build + - start_j11_utests_compression: + type: approval + - j11_utests_compression: + requires: + - start_j11_utests_compression + - j11_build + - start_j17_utests_compression: + type: approval + - j17_utests_compression: + requires: + - start_j17_utests_compression + - j11_build + - start_j11_utests_trie: + type: approval + - j11_utests_trie: + requires: + - start_j11_utests_trie + - j11_build + - start_j17_utests_trie: + type: approval + - j17_utests_trie: + requires: + - start_j17_utests_trie + - j11_build + - start_j11_utests_stress: + type: approval + - j11_utests_stress: + requires: + - start_j11_utests_stress + - j11_build + - start_j17_utests_stress: + type: approval + - j17_utests_stress: + requires: + - start_j17_utests_stress + - j11_build + - start_j11_utests_fqltool: + type: approval + - j11_utests_fqltool: + requires: + - start_j11_utests_fqltool + - j11_build + - start_j17_utests_fqltool: + type: approval + - j17_utests_fqltool: + requires: + - start_j17_utests_fqltool + - j11_build + - start_j11_utests_system_keyspace_directory: + type: approval + - j11_utests_system_keyspace_directory: + requires: + - start_j11_utests_system_keyspace_directory + - j11_build + - start_j17_utests_system_keyspace_directory: + type: approval + - j17_utests_system_keyspace_directory: + requires: + - start_j17_utests_system_keyspace_directory + - j11_build + - start_j11_dtest_jars_build: + type: approval + - j11_dtest_jars_build: + requires: + - j11_build + - start_j11_dtest_jars_build + - start_jvm_upgrade_dtests: + type: approval + - j11_jvm_upgrade_dtests: + requires: + - start_jvm_upgrade_dtests + - j11_dtest_jars_build - start_j11_dtests: type: approval - j11_dtests: @@ -10920,6 +10324,24 @@ workflows: requires: - start_j11_dtests_offheap - j11_build + - start_j17_dtests: + type: approval + - j17_dtests: + requires: + - start_j17_dtests + - j11_build + - start_j17_dtests_vnode: + type: approval + - j17_dtests_vnode: + requires: + - start_j17_dtests_vnode + - j11_build + - start_j17_dtests_offheap: + type: approval + - j17_dtests_offheap: + requires: + - start_j17_dtests_offheap + - j11_build - start_j11_dtests_large: type: approval - j11_dtests_large: @@ -10932,6 +10354,18 @@ workflows: requires: - start_j11_dtests_large_vnode - j11_build + - start_j17_dtests_large: + type: approval + - j17_dtests_large: + requires: + - start_j17_dtests_large + - j11_build + - start_j17_dtests_large_vnode: + type: approval + - j17_dtests_large_vnode: + requires: + - start_j17_dtests_large_vnode + - j11_build - start_j11_cqlsh_tests: type: approval - j11_cqlsh_dtests_py3: @@ -10958,80 +10392,60 @@ workflows: requires: - start_j11_cqlsh_tests - j11_build - - start_j11_cqlsh-dtests-offheap: + - start_j11_cqlsh_tests_offheap: type: approval - j11_cqlsh_dtests_py3_offheap: requires: - - start_j11_cqlsh-dtests-offheap + - start_j11_cqlsh_tests_offheap - j11_build - j11_cqlsh_dtests_py38_offheap: requires: - - start_j11_cqlsh-dtests-offheap + - start_j11_cqlsh_tests_offheap - j11_build - j11_cqlsh_dtests_py311_offheap: requires: - - start_j11_cqlsh-dtests-offheap + - start_j11_cqlsh_tests_offheap - j11_build - - start_j11_utests_oa: + - start_j17_cqlsh_tests: type: approval - - j11_utests_oa: + - j17_cqlsh_dtests_py3: requires: - - start_j11_utests_oa + - start_j17_cqlsh_tests - j11_build - - start_j11_utests_long: - type: approval - - j11_utests_long: + - j17_cqlsh_dtests_py3_vnode: requires: - - start_j11_utests_long + - start_j17_cqlsh_tests - j11_build - - start_j11_utests_cdc: - type: approval - - j11_utests_cdc: + - j17_cqlsh_dtests_py38: requires: - - start_j11_utests_cdc + - start_j17_cqlsh_tests - j11_build - - start_j11_utests_compression: - type: approval - - j11_utests_compression: + - j17_cqlsh_dtests_py311: requires: - - start_j11_utests_compression + - start_j17_cqlsh_tests - j11_build - - start_j11_utests_trie: - type: approval - - j11_utests_trie: + - j17_cqlsh_dtests_py38_vnode: requires: - - start_j11_utests_trie + - start_j17_cqlsh_tests - j11_build - - start_j11_utests_stress: - type: approval - - j11_utests_stress: + - j17_cqlsh_dtests_py311_vnode: requires: - - start_j11_utests_stress + - start_j17_cqlsh_tests - j11_build - - start_j11_utests_fqltool: + - start_j17_cqlsh_tests_offheap: type: approval - - j11_utests_fqltool: + - j17_cqlsh_dtests_py3_offheap: requires: - - start_j11_utests_fqltool + - start_j17_cqlsh_tests_offheap - j11_build - - start_j11_utests_system_keyspace_directory: - type: approval - - j11_utests_system_keyspace_directory: + - j17_cqlsh_dtests_py38_offheap: requires: - - start_j11_utests_system_keyspace_directory + - start_j17_cqlsh_tests_offheap - j11_build - - start_j11_dtest_jars_build: - type: approval - - j11_dtest_jars_build: + - j17_cqlsh_dtests_py311_offheap: requires: + - start_j17_cqlsh_tests_offheap - j11_build - - start_j11_dtest_jars_build - - start_jvm_upgrade_dtests: - type: approval - - j11_jvm_upgrade_dtests: - requires: - - start_jvm_upgrade_dtests - - j11_dtest_jars_build - start_j11_upgrade_dtests: type: approval - j11_upgrade_dtests: @@ -11051,13 +10465,19 @@ workflows: - j11_utests_oa: requires: - j11_build + - j11_simulator_dtests: + requires: + - j11_build - j11_jvm_dtests: requires: - j11_build - j11_jvm_dtests_vnode: requires: - j11_build - - j11_simulator_dtests: + - j17_jvm_dtests: + requires: + - j11_build + - j17_jvm_dtests_vnode: requires: - j11_build - j11_cqlshlib_tests: @@ -11066,6 +10486,96 @@ workflows: - j11_cqlshlib_cython_tests: requires: - j11_build + - j17_cqlshlib_tests: + requires: + - j11_build + - j17_cqlshlib_cython_tests: + requires: + - j11_build + - j17_unit_tests: + requires: + - j11_build + - j17_utests_oa: + requires: + - j11_build + - start_utests_long: + type: approval + - j11_utests_long: + requires: + - start_utests_long + - j11_build + - j17_utests_long: + requires: + - start_utests_long + - j11_build + - start_utests_cdc: + type: approval + - j11_utests_cdc: + requires: + - start_utests_cdc + - j11_build + - j17_utests_cdc: + requires: + - start_utests_cdc + - j11_build + - start_utests_compression: + type: approval + - j11_utests_compression: + requires: + - start_utests_compression + - j11_build + - j17_utests_compression: + requires: + - start_utests_compression + - j11_build + - start_utests_trie: + type: approval + - j11_utests_trie: + requires: + - start_utests_trie + - j11_build + - j17_utests_trie: + requires: + - start_utests_trie + - j11_build + - start_utests_stress: + type: approval + - j11_utests_stress: + requires: + - start_utests_stress + - j11_build + - j17_utests_stress: + requires: + - start_utests_stress + - j11_build + - start_utests_fqltool: + type: approval + - j11_utests_fqltool: + requires: + - start_utests_fqltool + - j11_build + - j17_utests_fqltool: + requires: + - start_utests_fqltool + - j11_build + - start_utests_system_keyspace_directory: + type: approval + - j11_utests_system_keyspace_directory: + requires: + - j11_build + - j17_utests_system_keyspace_directory: + requires: + - start_utests_system_keyspace_directory + - j11_build + - start_jvm_upgrade_dtests: + type: approval + - j11_dtest_jars_build: + requires: + - j11_build + - start_jvm_upgrade_dtests + - j11_jvm_upgrade_dtests: + requires: + - j11_dtest_jars_build - j11_dtests: requires: - j11_build @@ -11078,6 +10588,18 @@ workflows: requires: - start_j11_dtests_offheap - j11_build + - j17_dtests: + requires: + - j11_build + - j17_dtests_vnode: + requires: + - j11_build + - start_j17_dtests_offheap: + type: approval + - j17_dtests_offheap: + requires: + - start_j17_dtests_offheap + - j11_build - start_j11_dtests_large: type: approval - j11_dtests_large: @@ -11088,6 +10610,16 @@ workflows: requires: - start_j11_dtests_large - j11_build + - start_j17_dtests_large: + type: approval + - j17_dtests_large: + requires: + - start_j17_dtests_large + - j11_build + - j17_dtests_large_vnode: + requires: + - start_j17_dtests_large + - j11_build - j11_cqlsh_dtests_py3: requires: - j11_build @@ -11106,74 +10638,331 @@ workflows: - j11_cqlsh_dtests_py311_vnode: requires: - j11_build - - start_j11_cqlsh-dtests-offheap: + - start_j11_cqlsh_dtests_offheap: type: approval - j11_cqlsh_dtests_py3_offheap: requires: - - start_j11_cqlsh-dtests-offheap + - start_j11_cqlsh_dtests_offheap - j11_build - j11_cqlsh_dtests_py38_offheap: requires: - - start_j11_cqlsh-dtests-offheap + - start_j11_cqlsh_dtests_offheap - j11_build - j11_cqlsh_dtests_py311_offheap: requires: - - start_j11_cqlsh-dtests-offheap + - start_j11_cqlsh_dtests_offheap - j11_build - - start_utests_long: + - j17_cqlsh_dtests_py3: + requires: + - j11_build + - j17_cqlsh_dtests_py3_vnode: + requires: + - j11_build + - j17_cqlsh_dtests_py38: + requires: + - j11_build + - j17_cqlsh_dtests_py311: + requires: + - j11_build + - j17_cqlsh_dtests_py38_vnode: + requires: + - j11_build + - j17_cqlsh_dtests_py311_vnode: + requires: + - j11_build + - start_j17_cqlsh-dtests-offheap: type: approval - - j11_utests_long: + - j17_cqlsh_dtests_py3_offheap: requires: - - start_utests_long + - start_j17_cqlsh-dtests-offheap - j11_build - - start_utests_cdc: - type: approval - - j11_utests_cdc: + - j17_cqlsh_dtests_py38_offheap: requires: - - start_utests_cdc + - start_j17_cqlsh-dtests-offheap - j11_build - - start_utests_compression: - type: approval - - j11_utests_compression: + - j17_cqlsh_dtests_py311_offheap: requires: - - start_utests_compression + - start_j17_cqlsh-dtests-offheap - j11_build - - start_utests_trie: - type: approval - - j11_utests_trie: - requires: - - start_utests_trie - - j11_build - - start_utests_stress: - type: approval - - j11_utests_stress: - requires: - - start_utests_stress - - j11_build - - start_utests_fqltool: - type: approval - - j11_utests_fqltool: - requires: - - start_utests_fqltool - - j11_build - - start_utests_system_keyspace_directory: - type: approval - - j11_utests_system_keyspace_directory: - requires: - - start_utests_system_keyspace_directory - - j11_build - - start_jvm_upgrade_dtests: - type: approval - - j11_dtest_jars_build: - requires: - - j11_build - - start_jvm_upgrade_dtests - - j11_jvm_upgrade_dtests: - requires: - - j11_dtest_jars_build - start_j11_upgrade_dtests: type: approval - j11_upgrade_dtests: requires: - j11_build - start_j11_upgrade_dtests + java17_separate_tests: + jobs: + - start_j17_build: + type: approval + - j17_build: + requires: + - start_j17_build + - start_j17_unit_tests: + type: approval + - j17_unit_tests: + requires: + - start_j17_unit_tests + - j17_build + - start_j17_jvm_dtests: + type: approval + - j17_jvm_dtests: + requires: + - start_j17_jvm_dtests + - j17_build + - start_j17_jvm_dtests_vnode: + type: approval + - j17_jvm_dtests_vnode: + requires: + - start_j17_jvm_dtests_vnode + - j17_build + - start_j17_cqlshlib_tests: + type: approval + - j17_cqlshlib_tests: + requires: + - start_j17_cqlshlib_tests + - j17_build + - start_j17_cqlshlib_cython_tests: + type: approval + - j17_cqlshlib_cython_tests: + requires: + - start_j17_cqlshlib_cython_tests + - j17_build + - start_j17_dtests: + type: approval + - j17_dtests: + requires: + - start_j17_dtests + - j17_build + - start_j17_dtests_vnode: + type: approval + - j17_dtests_vnode: + requires: + - start_j17_dtests_vnode + - j17_build + - start_j17_dtests_offheap: + type: approval + - j17_dtests_offheap: + requires: + - start_j17_dtests_offheap + - j17_build + - start_j17_dtests_large: + type: approval + - j17_dtests_large: + requires: + - start_j17_dtests_large + - j17_build + - start_j17_dtests_large_vnode: + type: approval + - j17_dtests_large_vnode: + requires: + - start_j17_dtests_large_vnode + - j17_build + - start_j17_cqlsh_tests: + type: approval + - j17_cqlsh_dtests_py3: + requires: + - start_j17_cqlsh_tests + - j17_build + - j17_cqlsh_dtests_py3_vnode: + requires: + - start_j17_cqlsh_tests + - j17_build + - j17_cqlsh_dtests_py38: + requires: + - start_j17_cqlsh_tests + - j17_build + - j17_cqlsh_dtests_py311: + requires: + - start_j17_cqlsh_tests + - j17_build + - j17_cqlsh_dtests_py38_vnode: + requires: + - start_j17_cqlsh_tests + - j17_build + - j17_cqlsh_dtests_py311_vnode: + requires: + - start_j17_cqlsh_tests + - j17_build + - start_j17_cqlsh-dtests-offheap: + type: approval + - j17_cqlsh_dtests_py3_offheap: + requires: + - start_j17_cqlsh-dtests-offheap + - j17_build + - j17_cqlsh_dtests_py38_offheap: + requires: + - start_j17_cqlsh-dtests-offheap + - j17_build + - j17_cqlsh_dtests_py311_offheap: + requires: + - start_j17_cqlsh-dtests-offheap + - j17_build + - start_j17_utests_oa: + type: approval + - j17_utests_oa: + requires: + - start_j17_utests_oa + - j17_build + - start_j17_utests_long: + type: approval + - j17_utests_long: + requires: + - start_j17_utests_long + - j17_build + - start_j17_utests_cdc: + type: approval + - j17_utests_cdc: + requires: + - start_j17_utests_cdc + - j17_build + - start_j17_utests_compression: + type: approval + - j17_utests_compression: + requires: + - start_j17_utests_compression + - j17_build + - start_j17_utests_trie: + type: approval + - j17_utests_trie: + requires: + - start_j17_utests_trie + - j17_build + - start_j17_utests_stress: + type: approval + - j17_utests_stress: + requires: + - start_j17_utests_stress + - j17_build + - start_j17_utests_fqltool: + type: approval + - j17_utests_fqltool: + requires: + - start_j17_utests_fqltool + - j17_build + - start_j17_utests_system_keyspace_directory: + type: approval + - j17_utests_system_keyspace_directory: + requires: + - start_j17_utests_system_keyspace_directory + - j17_build + java17_pre-commit_tests: + jobs: + - start_pre-commit_tests: + type: approval + - j17_build: + requires: + - start_pre-commit_tests + - j17_unit_tests: + requires: + - j17_build + - j17_utests_oa: + requires: + - j17_build + - j17_jvm_dtests: + requires: + - j17_build + - j17_jvm_dtests_vnode: + requires: + - j17_build + - j17_cqlshlib_tests: + requires: + - j17_build + - j17_cqlshlib_cython_tests: + requires: + - j17_build + - j17_dtests: + requires: + - j17_build + - j17_dtests_vnode: + requires: + - j17_build + - start_j17_dtests_offheap: + type: approval + - j17_dtests_offheap: + requires: + - start_j17_dtests_offheap + - j17_build + - start_j17_dtests_large: + type: approval + - j17_dtests_large: + requires: + - start_j17_dtests_large + - j17_build + - j17_dtests_large_vnode: + requires: + - start_j17_dtests_large + - j17_build + - j17_cqlsh_dtests_py3: + requires: + - j17_build + - j17_cqlsh_dtests_py3_vnode: + requires: + - j17_build + - j17_cqlsh_dtests_py38: + requires: + - j17_build + - j17_cqlsh_dtests_py311: + requires: + - j17_build + - j17_cqlsh_dtests_py38_vnode: + requires: + - j17_build + - j17_cqlsh_dtests_py311_vnode: + requires: + - j17_build + - start_j17_cqlsh-dtests-offheap: + type: approval + - j17_cqlsh_dtests_py3_offheap: + requires: + - start_j17_cqlsh-dtests-offheap + - j17_build + - j17_cqlsh_dtests_py38_offheap: + requires: + - start_j17_cqlsh-dtests-offheap + - j17_build + - j17_cqlsh_dtests_py311_offheap: + requires: + - start_j17_cqlsh-dtests-offheap + - j17_build + - start_utests_long: + type: approval + - j17_utests_long: + requires: + - start_utests_long + - j17_build + - start_utests_cdc: + type: approval + - j17_utests_cdc: + requires: + - start_utests_cdc + - j17_build + - start_utests_compression: + type: approval + - j17_utests_compression: + requires: + - start_utests_compression + - j17_build + - start_utests_trie: + type: approval + - j17_utests_trie: + requires: + - start_utests_trie + - j17_build + - start_utests_stress: + type: approval + - j17_utests_stress: + requires: + - start_utests_stress + - j17_build + - start_utests_fqltool: + type: approval + - j17_utests_fqltool: + requires: + - start_utests_fqltool + - j17_build + - start_utests_system_keyspace_directory: + type: approval + - j17_utests_system_keyspace_directory: + requires: + - start_utests_system_keyspace_directory + - j17_build diff --git a/.circleci/config_11_and_17.yml b/.circleci/config_11_and_17.yml deleted file mode 100644 index 0c247fbc85..0000000000 --- a/.circleci/config_11_and_17.yml +++ /dev/null @@ -1,10968 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -version: 2 -jobs: - j11_jvm_upgrade_dtests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_JVM_UPGRADE_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_JVM_UPGRADE_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_JVM_UPGRADE_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-jvm-dtest-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-jvm-dtest-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_dtests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_without_vnodes_raw /tmp/all_dtest_tests_j17_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_without_vnodes_raw > /tmp/all_dtest_tests_j17_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_without_vnodes > /tmp/split_dtest_tests_j17_without_vnodes.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes_final.txt\n" - - run: - name: Run dtests (j17_without_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j17_without_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j17_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_cqlshlib_cython_tests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run cqlshlib Unit Tests - command: | - export PATH=$JAVA_HOME/bin:$PATH - export cython="yes" - time mv ~/cassandra /tmp - cd /tmp/cassandra/ - ant jar -Dno-checkstyle=true -Drat.skip=true -Dant.gen-doc.skip=true -Djavadoc.skip=true - ./pylib/cassandra-cqlsh-tests.sh $(pwd) - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/pylib - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_cqlsh_dtests_py311_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_dtests_offheap_raw /tmp/all_dtest_tests_j17_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j17_dtests_offheap_raw > /tmp/all_dtest_tests_j17_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_dtests_offheap > /tmp/split_dtest_tests_j17_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j17_dtests_offheap) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt" - cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt - - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then - export CQLSH_PYTHON=/usr/bin/python3.11 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_jvm_dtests_vnode_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_JVM_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_JVM_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_JVM_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=true\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-jvm-dtest-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-jvm-dtest-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_utests_fqltool_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_FQLTOOL_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_FQLTOOL_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS_FQLTOOL} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=fqltool-test\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant fqltool-test $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_cqlshlib_cython_tests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run cqlshlib Unit Tests - command: | - export PATH=$JAVA_HOME/bin:$PATH - export cython="yes" - time mv ~/cassandra /tmp - cd /tmp/cassandra/ - ant jar -Dno-checkstyle=true -Drat.skip=true -Dant.gen-doc.skip=true -Djavadoc.skip=true - ./pylib/cassandra-cqlsh-tests.sh $(pwd) - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/pylib - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_cqlsh_dtests_py3_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_dtests_offheap_raw /tmp/all_dtest_tests_j17_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j17_dtests_offheap_raw > /tmp/all_dtest_tests_j17_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_dtests_offheap > /tmp/split_dtest_tests_j17_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j17_dtests_offheap) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt" - cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then - export CQLSH_PYTHON=/usr/bin/python3.6 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_utests_compression: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-compression) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-compression -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_cqlsh_dtests_py38_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_with_vnodes_raw /tmp/all_dtest_tests_j17_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_with_vnodes_raw > /tmp/all_dtest_tests_j17_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_with_vnodes > /tmp/split_dtest_tests_j17_with_vnodes.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes_final.txt\n" - - run: - name: Run dtests (j17_with_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt" - cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt - - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then - export CQLSH_PYTHON=/usr/bin/python3.8 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_dtests_vnode_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if true; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_dtests_offheap_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if true; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 --use-off-heap-memtables --skip-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_dtests_vnode_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if true; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_system_keyspace_directory: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-system-keyspace-directory) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-system-keyspace-directory -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_cqlsh_dtests_py3: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_without_vnodes_raw /tmp/all_dtest_tests_j17_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_without_vnodes_raw > /tmp/all_dtest_tests_j17_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_without_vnodes > /tmp/split_dtest_tests_j17_without_vnodes.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes_final.txt\n" - - run: - name: Run dtests (j17_without_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt" - cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then - export CQLSH_PYTHON=/usr/bin/python3.6 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_utests_stress_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_STRESS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_STRESS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS_STRESS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=stress-test-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant stress-test-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_unit_tests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_utests_system_keyspace_directory_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-system-keyspace-directory\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-system-keyspace-directory $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_cqlsh_dtests_py311: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_without_vnodes_raw /tmp/all_dtest_tests_j11_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_without_vnodes_raw > /tmp/all_dtest_tests_j11_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_without_vnodes > /tmp/split_dtest_tests_j11_without_vnodes.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\n" - - run: - name: Run dtests (j11_without_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt" - cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt - - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then - export CQLSH_PYTHON=/usr/bin/python3.11 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_dtests_large_vnode_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_LARGE_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_LARGE_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_LARGE_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_LARGE_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_LARGE_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_LARGE_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_LARGE_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if true; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 --only-resource-intensive-tests --force-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_dtests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if false; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_unit_tests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_cqlsh_dtests_py311: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_without_vnodes_raw /tmp/all_dtest_tests_j17_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_without_vnodes_raw > /tmp/all_dtest_tests_j17_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_without_vnodes > /tmp/split_dtest_tests_j17_without_vnodes.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes_final.txt\n" - - run: - name: Run dtests (j17_without_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt" - cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt - - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then - export CQLSH_PYTHON=/usr/bin/python3.11 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_cqlsh_dtests_py38: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_without_vnodes_raw /tmp/all_dtest_tests_j11_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_without_vnodes_raw > /tmp/all_dtest_tests_j11_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_without_vnodes > /tmp/split_dtest_tests_j11_without_vnodes.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\n" - - run: - name: Run dtests (j11_without_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt" - cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt - - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then - export CQLSH_PYTHON=/usr/bin/python3.8 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_utests_stress_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_STRESS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_STRESS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS_STRESS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=stress-test-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant stress-test-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_utests_compression_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-compression\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-compression $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_utests_oa: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-oa) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-oa -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_repeated_ant_test: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run repeated JUnit test - no_output_timeout: 15m - command: | - if [ "${REPEATED_ANT_TEST_CLASS}" == "" ]; then - echo "Repeated utest class name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_ANT_TEST_COUNT}" == "" ]; then - echo "Repeated utest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_ANT_TEST_COUNT}" -le 0 ]; then - echo "Repeated utest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_ANT_TEST_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_ANT_TEST_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_ANT_TEST_TARGET} ${REPEATED_ANT_TEST_CLASS} ${REPEATED_ANT_TEST_METHODS} ${REPEATED_ANT_TEST_COUNT} times" - - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - - target=${REPEATED_ANT_TEST_TARGET} - class_path=${REPEATED_ANT_TEST_CLASS} - class_name="${class_path##*.}" - - # Prepare the -Dtest.name argument. - # It can be the fully qualified class name or the short class name, depending on the target. - if [[ $target == "test" || \ - $target == "test-cdc" || \ - $target == "test-compression" || \ - $target == "test-trie" || \ - $target == "test-oa" || \ - $target == "test-system-keyspace-directory" || \ - $target == "fqltool-test" || \ - $target == "long-test" || \ - $target == "stress-test" || \ - $target == "test-simulator-dtest" ]]; then - name="-Dtest.name=$class_name" - else - name="-Dtest.name=$class_path" - fi - - # Prepare the -Dtest.methods argument, which is optional - if [ "${REPEATED_ANT_TEST_METHODS}" == "" ]; then - methods="" - else - methods="-Dtest.methods=${REPEATED_ANT_TEST_METHODS}" - fi - - # Prepare the JVM dtests vnodes argument, which is optional - vnodes_args="" - if ${REPEATED_ANT_TEST_VNODES}; then - vnodes_args="-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'" - fi - - # Run the test target as many times as requested collecting the exit code, - # stopping the iteration only if stop_on_failure is set. - exit_code="$?" - for i in $(seq -w 1 $count); do - - echo "Running test iteration $i of $count" - - # run the test - status="passes" - if !( set -o pipefail && ant $target $name $methods $vnodes_args -Dno-build-test=true | tee stdout.txt ); then - status="fails" - exit_code=1 - fi - - # move the stdout output file - dest=/tmp/results/repeated_utest/stdout/${status}/${i} - mkdir -p $dest - mv stdout.txt $dest/${REPEATED_ANT_TEST_TARGET}-${REPEATED_ANT_TEST_CLASS}.txt - - # move the XML output files - source=build/test/output - dest=/tmp/results/repeated_utest/output/${status}/${i} - mkdir -p $dest - if [[ -d $source && -n "$(ls $source)" ]]; then - mv $source/* $dest/ - fi - - # move the log files - source=build/test/logs - dest=/tmp/results/repeated_utest/logs/${status}/${i} - mkdir -p $dest - if [[ -d $source && -n "$(ls $source)" ]]; then - mv $source/* $dest/ - fi - - # maybe stop iterations on test failure - if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then - break - fi - done - - (exit ${exit_code}) - fi - fi - - store_test_results: - path: /tmp/results/repeated_utest/output - - store_artifacts: - path: /tmp/results/repeated_utest/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utest/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utest/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_dtests_large_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_large_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_large_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --only-resource-intensive-tests --force-resource-intensive-tests --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_large_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_large_with_vnodes_raw /tmp/all_dtest_tests_j11_large_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_large_with_vnodes_raw > /tmp/all_dtest_tests_j11_large_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_large_with_vnodes > /tmp/split_dtest_tests_j11_large_with_vnodes.txt\ncat /tmp/split_dtest_tests_j11_large_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_large_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_large_with_vnodes_final.txt\n" - - run: - name: Run dtests (j11_large_with_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j11_large_with_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j11_large_with_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_large_with_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --only-resource-intensive-tests --force-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j11_large_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_large_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_large_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_dtests_large_vnode_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_LARGE_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_LARGE_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_LARGE_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_LARGE_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_LARGE_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_LARGE_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_LARGE_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if true; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 --only-resource-intensive-tests --force-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_utests_trie: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-trie) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-trie -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_cqlsh_dtests_py38_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_dtests_offheap_raw /tmp/all_dtest_tests_j11_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j11_dtests_offheap_raw > /tmp/all_dtest_tests_j11_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_dtests_offheap > /tmp/split_dtest_tests_j11_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j11_dtests_offheap) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt" - cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt - - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then - export CQLSH_PYTHON=/usr/bin/python3.8 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_dtests_large: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_large_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_large_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --only-resource-intensive-tests --force-resource-intensive-tests --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_large_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_large_without_vnodes_raw /tmp/all_dtest_tests_j11_large_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_large_without_vnodes_raw > /tmp/all_dtest_tests_j11_large_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_large_without_vnodes > /tmp/split_dtest_tests_j11_large_without_vnodes.txt\ncat /tmp/split_dtest_tests_j11_large_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_large_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_large_without_vnodes_final.txt\n" - - run: - name: Run dtests (j11_large_without_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j11_large_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j11_large_without_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_large_without_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --only-resource-intensive-tests --force-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j11_large_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_large_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_large_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_system_keyspace_directory_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-system-keyspace-directory\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-system-keyspace-directory $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_oa: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-oa) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-oa -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_upgrade_dtests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_UPGRADE_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_UPGRADE_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_UPGRADE_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_UPGRADE_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_UPGRADE_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_UPGRADE_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_UPGRADE_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if false; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if true; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_jvm_dtests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine distributed Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/distributed/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/distributed/;;g" | grep "Test\.java$" | grep -v upgrade > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.distributed.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=distributed -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_repeated_ant_test: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run repeated JUnit test - no_output_timeout: 15m - command: | - if [ "${REPEATED_ANT_TEST_CLASS}" == "" ]; then - echo "Repeated utest class name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_ANT_TEST_COUNT}" == "" ]; then - echo "Repeated utest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_ANT_TEST_COUNT}" -le 0 ]; then - echo "Repeated utest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_ANT_TEST_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_ANT_TEST_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_ANT_TEST_TARGET} ${REPEATED_ANT_TEST_CLASS} ${REPEATED_ANT_TEST_METHODS} ${REPEATED_ANT_TEST_COUNT} times" - - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - - target=${REPEATED_ANT_TEST_TARGET} - class_path=${REPEATED_ANT_TEST_CLASS} - class_name="${class_path##*.}" - - # Prepare the -Dtest.name argument. - # It can be the fully qualified class name or the short class name, depending on the target. - if [[ $target == "test" || \ - $target == "test-cdc" || \ - $target == "test-compression" || \ - $target == "test-trie" || \ - $target == "test-oa" || \ - $target == "test-system-keyspace-directory" || \ - $target == "fqltool-test" || \ - $target == "long-test" || \ - $target == "stress-test" || \ - $target == "test-simulator-dtest" ]]; then - name="-Dtest.name=$class_name" - else - name="-Dtest.name=$class_path" - fi - - # Prepare the -Dtest.methods argument, which is optional - if [ "${REPEATED_ANT_TEST_METHODS}" == "" ]; then - methods="" - else - methods="-Dtest.methods=${REPEATED_ANT_TEST_METHODS}" - fi - - # Prepare the JVM dtests vnodes argument, which is optional - vnodes_args="" - if ${REPEATED_ANT_TEST_VNODES}; then - vnodes_args="-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'" - fi - - # Run the test target as many times as requested collecting the exit code, - # stopping the iteration only if stop_on_failure is set. - exit_code="$?" - for i in $(seq -w 1 $count); do - - echo "Running test iteration $i of $count" - - # run the test - status="passes" - if !( set -o pipefail && ant $target $name $methods $vnodes_args -Dno-build-test=true | tee stdout.txt ); then - status="fails" - exit_code=1 - fi - - # move the stdout output file - dest=/tmp/results/repeated_utest/stdout/${status}/${i} - mkdir -p $dest - mv stdout.txt $dest/${REPEATED_ANT_TEST_TARGET}-${REPEATED_ANT_TEST_CLASS}.txt - - # move the XML output files - source=build/test/output - dest=/tmp/results/repeated_utest/output/${status}/${i} - mkdir -p $dest - if [[ -d $source && -n "$(ls $source)" ]]; then - mv $source/* $dest/ - fi - - # move the log files - source=build/test/logs - dest=/tmp/results/repeated_utest/logs/${status}/${i} - mkdir -p $dest - if [[ -d $source && -n "$(ls $source)" ]]; then - mv $source/* $dest/ - fi - - # maybe stop iterations on test failure - if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then - break - fi - done - - (exit ${exit_code}) - fi - fi - - store_test_results: - path: /tmp/results/repeated_utest/output - - store_artifacts: - path: /tmp/results/repeated_utest/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utest/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utest/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_cqlsh_dtests_py3: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_without_vnodes_raw /tmp/all_dtest_tests_j11_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_without_vnodes_raw > /tmp/all_dtest_tests_j11_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_without_vnodes > /tmp/split_dtest_tests_j11_without_vnodes.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\n" - - run: - name: Run dtests (j11_without_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt" - cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then - export CQLSH_PYTHON=/usr/bin/python3.6 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_build: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Clone Cassandra Repository (via git) - command: | - git clone --single-branch --depth 1 --branch $CIRCLE_BRANCH https://github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME.git ~/cassandra - - run: - name: Build Cassandra - command: | - export PATH=$JAVA_HOME/bin:$PATH - cd ~/cassandra - # Loop to prevent failure due to maven-ant-tasks not downloading a jar.. - for x in $(seq 1 3); do - ${ANT_HOME}/bin/ant clean realclean jar - RETURN="$?" - if [ "${RETURN}" -eq "0" ]; then - break - fi - done - # Exit, if we didn't build successfully - if [ "${RETURN}" -ne "0" ]; then - echo "Build failed with exit code: ${RETURN}" - exit ${RETURN} - fi - no_output_timeout: 15m - - run: - name: Run static code analysis - command: | - export PATH=$JAVA_HOME/bin:$PATH - cd ~/cassandra - ant check - - persist_to_workspace: - root: /home/cassandra - paths: - - cassandra - - .m2 - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_utests_cdc: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-cdc) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-cdc -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_utests_cdc_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-cdc\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-cdc $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_utests_fqltool: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run Unit Tests (fqltool-test) - command: | - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant fqltool-test -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_dtests_offheap_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if true; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 --use-off-heap-memtables --skip-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_jvm_dtests_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine distributed Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/distributed/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/distributed/;;g" | grep "Test\.java$" | grep -v upgrade > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.distributed.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist -Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16' -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=distributed -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_dtest_jars_build: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Build Cassandra DTest jars - command: | - export PATH=$JAVA_HOME/bin:$PATH - cd ~/cassandra - mkdir ~/dtest_jars - git remote add apache https://github.com/apache/cassandra.git - for branch in cassandra-4.0 cassandra-4.1 trunk; do - # check out the correct cassandra version: - git remote set-branches --add apache '$branch' - git fetch --depth 1 apache $branch - git checkout $branch - git clean -fd - # Loop to prevent failure due to maven-ant-tasks not downloading a jar.. - for x in $(seq 1 3); do - ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar -Dno-checkstyle=true -Drat.skip=true - RETURN="$?" - if [ "${RETURN}" -eq "0" ]; then - cp build/dtest*.jar ~/dtest_jars - break - fi - done - # Exit, if we didn't build successfully - if [ "${RETURN}" -ne "0" ]; then - echo "Build failed with exit code: ${RETURN}" - exit ${RETURN} - fi - done - # and build the dtest-jar for the branch under test - ${ANT_HOME}/bin/ant realclean - git checkout origin/$CIRCLE_BRANCH - git clean -fd - for x in $(seq 1 3); do - ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar -Dno-checkstyle=true -Drat.skip=true - RETURN="$?" - if [ "${RETURN}" -eq "0" ]; then - cp build/dtest*.jar ~/dtest_jars - break - fi - done - # Exit, if we didn't build successfully - if [ "${RETURN}" -ne "0" ]; then - echo "Build failed with exit code: ${RETURN}" - exit ${RETURN} - fi - ls -l ~/dtest_jars - no_output_timeout: 15m - - persist_to_workspace: - root: /home/cassandra - paths: - - dtest_jars - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_long: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run Unit Tests (long-test) - command: | - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant long-test -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_unit_tests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=testsome\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant testsome $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_simulator_dtests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Simulator Tests - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant test-simulator-dtest -Dno-build-test=true - no_output_timeout: 30m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_jvm_upgrade_dtests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine distributed Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/distributed/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/distributed/;;g" | grep "Test\.java$" | grep upgrade > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.distributed.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=distributed -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_stress: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run Unit Tests (stress-test) - command: | - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant stress-test -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_cdc_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-cdc\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-cdc $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_dtests_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_with_vnodes_raw /tmp/all_dtest_tests_j17_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_with_vnodes_raw > /tmp/all_dtest_tests_j17_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_with_vnodes > /tmp/split_dtest_tests_j17_with_vnodes.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes_final.txt\n" - - run: - name: Run dtests (j17_with_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j17_with_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j17_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_dtests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if false; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_compression: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-compression) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-compression -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_utests_trie_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-trie\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-trie $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_cqlsh_dtests_py3_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_dtests_offheap_raw /tmp/all_dtest_tests_j11_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j11_dtests_offheap_raw > /tmp/all_dtest_tests_j11_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_dtests_offheap > /tmp/split_dtest_tests_j11_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j11_dtests_offheap) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt" - cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then - export CQLSH_PYTHON=/usr/bin/python3.6 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_cqlsh_dtests_py311_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_dtests_offheap_raw /tmp/all_dtest_tests_j11_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j11_dtests_offheap_raw > /tmp/all_dtest_tests_j11_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_dtests_offheap > /tmp/split_dtest_tests_j11_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j11_dtests_offheap) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt" - cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt - - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then - export CQLSH_PYTHON=/usr/bin/python3.11 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_trie: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-trie) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-trie -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_upgrade_dtests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_upgradetests_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_upgradetests_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --execute-upgrade-tests-only --upgrade-target-version-only --upgrade-version-selection all --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_upgradetests_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_upgradetests_without_vnodes_raw /tmp/all_dtest_tests_j11_upgradetests_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_upgradetests_without_vnodes_raw > /tmp/all_dtest_tests_j11_upgradetests_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_upgradetests_without_vnodes > /tmp/split_dtest_tests_j11_upgradetests_without_vnodes.txt\ncat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt\n" - - run: - name: Run dtests (j11_upgradetests_without_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --execute-upgrade-tests-only --upgrade-target-version-only --upgrade-version-selection all --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j11_upgradetests_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_upgradetests_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_upgradetests_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_dtests_large_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_LARGE_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_LARGE_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_LARGE_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_LARGE_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_LARGE_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_LARGE_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_LARGE_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if false; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 --only-resource-intensive-tests --force-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_utests_compression_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-compression\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-compression $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_cqlsh_dtests_py3_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_with_vnodes_raw /tmp/all_dtest_tests_j11_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_with_vnodes_raw > /tmp/all_dtest_tests_j11_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_with_vnodes > /tmp/split_dtest_tests_j11_with_vnodes.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n" - - run: - name: Run dtests (j11_with_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt" - cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then - export CQLSH_PYTHON=/usr/bin/python3.6 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_utests_fqltool: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run Unit Tests (fqltool-test) - command: | - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant fqltool-test -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_dtests_large_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_large_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_large_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --only-resource-intensive-tests --force-resource-intensive-tests --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_large_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_large_with_vnodes_raw /tmp/all_dtest_tests_j17_large_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_large_with_vnodes_raw > /tmp/all_dtest_tests_j17_large_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_large_with_vnodes > /tmp/split_dtest_tests_j17_large_with_vnodes.txt\ncat /tmp/split_dtest_tests_j17_large_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_large_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_large_with_vnodes_final.txt\n" - - run: - name: Run dtests (j17_large_with_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j17_large_with_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j17_large_with_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_large_with_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --only-resource-intensive-tests --force-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j17_large_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_large_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_large_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_dtests_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_dtests_offheap_raw /tmp/all_dtest_tests_j11_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j11_dtests_offheap_raw > /tmp/all_dtest_tests_j11_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_dtests_offheap > /tmp/split_dtest_tests_j11_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j11_dtests_offheap) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\"\ncat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j11_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_cqlsh_dtests_py38_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_with_vnodes_raw /tmp/all_dtest_tests_j11_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_with_vnodes_raw > /tmp/all_dtest_tests_j11_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_with_vnodes > /tmp/split_dtest_tests_j11_with_vnodes.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n" - - run: - name: Run dtests (j11_with_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt" - cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt - - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then - export CQLSH_PYTHON=/usr/bin/python3.8 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_trie_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-trie\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-trie $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_simulator_dtests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_SIMULATOR_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_SIMULATOR_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_SIMULATOR_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-simulator-dtest\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-simulator-dtest $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_jvm_dtests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_JVM_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_JVM_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_JVM_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-jvm-dtest-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-jvm-dtest-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_cqlsh_dtests_py38_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_dtests_offheap_raw /tmp/all_dtest_tests_j17_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j17_dtests_offheap_raw > /tmp/all_dtest_tests_j17_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_dtests_offheap > /tmp/split_dtest_tests_j17_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j17_dtests_offheap) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt" - cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt - - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then - export CQLSH_PYTHON=/usr/bin/python3.8 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_cqlshlib_tests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run cqlshlib Unit Tests - command: | - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra/ - ant jar -Dno-checkstyle=true -Drat.skip=true -Dant.gen-doc.skip=true -Djavadoc.skip=true - ./pylib/cassandra-cqlsh-tests.sh $(pwd) - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/pylib - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_cqlsh_dtests_py311_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_with_vnodes_raw /tmp/all_dtest_tests_j11_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_with_vnodes_raw > /tmp/all_dtest_tests_j11_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_with_vnodes > /tmp/split_dtest_tests_j11_with_vnodes.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n" - - run: - name: Run dtests (j11_with_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt" - cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt - - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then - export CQLSH_PYTHON=/usr/bin/python3.11 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_utests_system_keyspace_directory: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-system-keyspace-directory) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-system-keyspace-directory -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_cqlsh_dtests_py3_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_with_vnodes_raw /tmp/all_dtest_tests_j17_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_with_vnodes_raw > /tmp/all_dtest_tests_j17_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_with_vnodes > /tmp/split_dtest_tests_j17_with_vnodes.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes_final.txt\n" - - run: - name: Run dtests (j17_with_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt" - cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then - export CQLSH_PYTHON=/usr/bin/python3.6 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_cqlsh_dtests_py311_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_with_vnodes_raw /tmp/all_dtest_tests_j17_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_with_vnodes_raw > /tmp/all_dtest_tests_j17_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_with_vnodes > /tmp/split_dtest_tests_j17_with_vnodes.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes_final.txt\n" - - run: - name: Run dtests (j17_with_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt" - cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt - - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then - export CQLSH_PYTHON=/usr/bin/python3.11 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_jvm_dtests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine distributed Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/distributed/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/distributed/;;g" | grep "Test\.java$" | grep -v upgrade > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.distributed.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=distributed -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_utests_stress: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run Unit Tests (stress-test) - command: | - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant stress-test -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_jvm_dtests_vnode_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_JVM_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_JVM_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_JVM_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=true\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-jvm-dtest-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-jvm-dtest-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_build: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Clone Cassandra Repository (via git) - command: | - git clone --single-branch --depth 1 --branch $CIRCLE_BRANCH https://github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME.git ~/cassandra - - run: - name: Build Cassandra - command: | - export PATH=$JAVA_HOME/bin:$PATH - cd ~/cassandra - # Loop to prevent failure due to maven-ant-tasks not downloading a jar.. - for x in $(seq 1 3); do - ${ANT_HOME}/bin/ant clean realclean jar - RETURN="$?" - if [ "${RETURN}" -eq "0" ]; then - break - fi - done - # Exit, if we didn't build successfully - if [ "${RETURN}" -ne "0" ]; then - echo "Build failed with exit code: ${RETURN}" - exit ${RETURN} - fi - no_output_timeout: 15m - - run: - name: Run static code analysis - command: | - export PATH=$JAVA_HOME/bin:$PATH - cd ~/cassandra - ant check - - persist_to_workspace: - root: /home/cassandra - paths: - - cassandra - - .m2 - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_oa_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-oa\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-oa $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_cqlshlib_tests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run cqlshlib Unit Tests - command: | - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra/ - ant jar -Dno-checkstyle=true -Drat.skip=true -Dant.gen-doc.skip=true -Djavadoc.skip=true - ./pylib/cassandra-cqlsh-tests.sh $(pwd) - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/pylib - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_dtests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_without_vnodes_raw /tmp/all_dtest_tests_j11_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_without_vnodes_raw > /tmp/all_dtest_tests_j11_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_without_vnodes > /tmp/split_dtest_tests_j11_without_vnodes.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\n" - - run: - name: Run dtests (j11_without_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j11_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_jvm_dtests_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine distributed Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/distributed/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/distributed/;;g" | grep "Test\.java$" | grep -v upgrade > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.distributed.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist -Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16' -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=distributed -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_cqlsh_dtests_py38: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_without_vnodes_raw /tmp/all_dtest_tests_j17_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_without_vnodes_raw > /tmp/all_dtest_tests_j17_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_without_vnodes > /tmp/split_dtest_tests_j17_without_vnodes.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes_final.txt\n" - - run: - name: Run dtests (j17_without_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt" - cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt - - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then - export CQLSH_PYTHON=/usr/bin/python3.8 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_utests_cdc: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-cdc) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-cdc -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_utests_fqltool_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_FQLTOOL_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_FQLTOOL_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS_FQLTOOL} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=fqltool-test\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant fqltool-test $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_dtests_large: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_large_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_large_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --only-resource-intensive-tests --force-resource-intensive-tests --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_large_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_large_without_vnodes_raw /tmp/all_dtest_tests_j17_large_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_large_without_vnodes_raw > /tmp/all_dtest_tests_j17_large_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_large_without_vnodes > /tmp/split_dtest_tests_j17_large_without_vnodes.txt\ncat /tmp/split_dtest_tests_j17_large_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_large_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_large_without_vnodes_final.txt\n" - - run: - name: Run dtests (j17_large_without_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j17_large_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j17_large_without_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_large_without_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --only-resource-intensive-tests --force-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j17_large_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_large_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_large_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_unit_tests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=testsome\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant testsome $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_utests_long: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run Unit Tests (long-test) - command: | - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant long-test -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_utests_oa_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-oa\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-oa $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_dtests_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_with_vnodes_raw /tmp/all_dtest_tests_j11_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_with_vnodes_raw > /tmp/all_dtest_tests_j11_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_with_vnodes > /tmp/split_dtest_tests_j11_with_vnodes.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n" - - run: - name: Run dtests (j11_with_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j11_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_jvm_dtests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_JVM_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_JVM_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_JVM_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-jvm-dtest-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-jvm-dtest-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_dtests_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_dtests_offheap_raw /tmp/all_dtest_tests_j17_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j17_dtests_offheap_raw > /tmp/all_dtest_tests_j17_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_dtests_offheap > /tmp/split_dtest_tests_j17_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j17_dtests_offheap) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\"\ncat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j17_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_dtests_large_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_LARGE_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_LARGE_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_LARGE_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_LARGE_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_LARGE_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_LARGE_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_LARGE_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if false; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 --only-resource-intensive-tests --force-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_utests_long_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_LONG_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_LONG_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS_LONG} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=long-testsome\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant long-testsome $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_utests_long_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_LONG_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_LONG_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS_LONG} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=long-testsome\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant long-testsome $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true -workflows: - version: 2 - java11_separate_tests: - jobs: - - start_j11_build: - type: approval - - j11_build: - requires: - - start_j11_build - - start_j11_unit_tests: - type: approval - - j11_unit_tests: - requires: - - start_j11_unit_tests - - j11_build - - start_j11_jvm_dtests: - type: approval - - j11_jvm_dtests: - requires: - - start_j11_jvm_dtests - - j11_build - - start_j11_jvm_dtests_vnode: - type: approval - - j11_jvm_dtests_vnode: - requires: - - start_j11_jvm_dtests_vnode - - j11_build - - start_j17_jvm_dtests: - type: approval - - j17_jvm_dtests: - requires: - - start_j17_jvm_dtests - - j11_build - - start_j17_jvm_dtests_vnode: - type: approval - - j17_jvm_dtests_vnode: - requires: - - start_j17_jvm_dtests_vnode - - j11_build - - start_j11_simulator_dtests: - type: approval - - j11_simulator_dtests: - requires: - - start_j11_simulator_dtests - - j11_build - - start_j11_cqlshlib_tests: - type: approval - - j11_cqlshlib_tests: - requires: - - start_j11_cqlshlib_tests - - j11_build - - start_j11_cqlshlib_cython_tests: - type: approval - - j11_cqlshlib_cython_tests: - requires: - - start_j11_cqlshlib_cython_tests - - j11_build - - start_j17_cqlshlib_tests: - type: approval - - j17_cqlshlib_tests: - requires: - - start_j17_cqlshlib_tests - - j11_build - - start_j17_cqlshlib_cython_tests: - type: approval - - j17_cqlshlib_cython_tests: - requires: - - start_j17_cqlshlib_cython_tests - - j11_build - - start_j17_unit_tests: - type: approval - - j17_unit_tests: - requires: - - start_j17_unit_tests - - j11_build - - start_j11_utests_oa: - type: approval - - j11_utests_oa: - requires: - - start_j11_utests_oa - - j11_build - - start_j17_utests_oa: - type: approval - - j17_utests_oa: - requires: - - start_j17_utests_oa - - j11_build - - start_j11_utests_long: - type: approval - - j11_utests_long: - requires: - - start_j11_utests_long - - j11_build - - start_j17_utests_long: - type: approval - - j17_utests_long: - requires: - - start_j17_utests_long - - j11_build - - start_j11_utests_cdc: - type: approval - - j11_utests_cdc: - requires: - - start_j11_utests_cdc - - j11_build - - start_j17_utests_cdc: - type: approval - - j17_utests_cdc: - requires: - - start_j17_utests_cdc - - j11_build - - start_j11_utests_compression: - type: approval - - j11_utests_compression: - requires: - - start_j11_utests_compression - - j11_build - - start_j17_utests_compression: - type: approval - - j17_utests_compression: - requires: - - start_j17_utests_compression - - j11_build - - start_j11_utests_trie: - type: approval - - j11_utests_trie: - requires: - - start_j11_utests_trie - - j11_build - - start_j17_utests_trie: - type: approval - - j17_utests_trie: - requires: - - start_j17_utests_trie - - j11_build - - start_j11_utests_stress: - type: approval - - j11_utests_stress: - requires: - - start_j11_utests_stress - - j11_build - - start_j17_utests_stress: - type: approval - - j17_utests_stress: - requires: - - start_j17_utests_stress - - j11_build - - start_j11_utests_fqltool: - type: approval - - j11_utests_fqltool: - requires: - - start_j11_utests_fqltool - - j11_build - - start_j17_utests_fqltool: - type: approval - - j17_utests_fqltool: - requires: - - start_j17_utests_fqltool - - j11_build - - start_j11_utests_system_keyspace_directory: - type: approval - - j11_utests_system_keyspace_directory: - requires: - - start_j11_utests_system_keyspace_directory - - j11_build - - start_j17_utests_system_keyspace_directory: - type: approval - - j17_utests_system_keyspace_directory: - requires: - - start_j17_utests_system_keyspace_directory - - j11_build - - start_j11_dtest_jars_build: - type: approval - - j11_dtest_jars_build: - requires: - - j11_build - - start_j11_dtest_jars_build - - start_jvm_upgrade_dtests: - type: approval - - j11_jvm_upgrade_dtests: - requires: - - start_jvm_upgrade_dtests - - j11_dtest_jars_build - - start_j11_dtests: - type: approval - - j11_dtests: - requires: - - start_j11_dtests - - j11_build - - start_j11_dtests_vnode: - type: approval - - j11_dtests_vnode: - requires: - - start_j11_dtests_vnode - - j11_build - - start_j11_dtests_offheap: - type: approval - - j11_dtests_offheap: - requires: - - start_j11_dtests_offheap - - j11_build - - start_j17_dtests: - type: approval - - j17_dtests: - requires: - - start_j17_dtests - - j11_build - - start_j17_dtests_vnode: - type: approval - - j17_dtests_vnode: - requires: - - start_j17_dtests_vnode - - j11_build - - start_j17_dtests_offheap: - type: approval - - j17_dtests_offheap: - requires: - - start_j17_dtests_offheap - - j11_build - - start_j11_dtests_large: - type: approval - - j11_dtests_large: - requires: - - start_j11_dtests_large - - j11_build - - start_j11_dtests_large_vnode: - type: approval - - j11_dtests_large_vnode: - requires: - - start_j11_dtests_large_vnode - - j11_build - - start_j17_dtests_large: - type: approval - - j17_dtests_large: - requires: - - start_j17_dtests_large - - j11_build - - start_j17_dtests_large_vnode: - type: approval - - j17_dtests_large_vnode: - requires: - - start_j17_dtests_large_vnode - - j11_build - - start_j11_cqlsh_tests: - type: approval - - j11_cqlsh_dtests_py3: - requires: - - start_j11_cqlsh_tests - - j11_build - - j11_cqlsh_dtests_py3_vnode: - requires: - - start_j11_cqlsh_tests - - j11_build - - j11_cqlsh_dtests_py38: - requires: - - start_j11_cqlsh_tests - - j11_build - - j11_cqlsh_dtests_py311: - requires: - - start_j11_cqlsh_tests - - j11_build - - j11_cqlsh_dtests_py38_vnode: - requires: - - start_j11_cqlsh_tests - - j11_build - - j11_cqlsh_dtests_py311_vnode: - requires: - - start_j11_cqlsh_tests - - j11_build - - start_j11_cqlsh_tests_offheap: - type: approval - - j11_cqlsh_dtests_py3_offheap: - requires: - - start_j11_cqlsh_tests_offheap - - j11_build - - j11_cqlsh_dtests_py38_offheap: - requires: - - start_j11_cqlsh_tests_offheap - - j11_build - - j11_cqlsh_dtests_py311_offheap: - requires: - - start_j11_cqlsh_tests_offheap - - j11_build - - start_j17_cqlsh_tests: - type: approval - - j17_cqlsh_dtests_py3: - requires: - - start_j17_cqlsh_tests - - j11_build - - j17_cqlsh_dtests_py3_vnode: - requires: - - start_j17_cqlsh_tests - - j11_build - - j17_cqlsh_dtests_py38: - requires: - - start_j17_cqlsh_tests - - j11_build - - j17_cqlsh_dtests_py311: - requires: - - start_j17_cqlsh_tests - - j11_build - - j17_cqlsh_dtests_py38_vnode: - requires: - - start_j17_cqlsh_tests - - j11_build - - j17_cqlsh_dtests_py311_vnode: - requires: - - start_j17_cqlsh_tests - - j11_build - - start_j17_cqlsh_tests_offheap: - type: approval - - j17_cqlsh_dtests_py3_offheap: - requires: - - start_j17_cqlsh_tests_offheap - - j11_build - - j17_cqlsh_dtests_py38_offheap: - requires: - - start_j17_cqlsh_tests_offheap - - j11_build - - j17_cqlsh_dtests_py311_offheap: - requires: - - start_j17_cqlsh_tests_offheap - - j11_build - - start_j11_upgrade_dtests: - type: approval - - j11_upgrade_dtests: - requires: - - start_j11_upgrade_dtests - - j11_build - java11_pre-commit_tests: - jobs: - - start_pre-commit_tests: - type: approval - - j11_build: - requires: - - start_pre-commit_tests - - j11_unit_tests: - requires: - - j11_build - - j11_utests_oa: - requires: - - j11_build - - j11_simulator_dtests: - requires: - - j11_build - - j11_jvm_dtests: - requires: - - j11_build - - j11_jvm_dtests_vnode: - requires: - - j11_build - - j17_jvm_dtests: - requires: - - j11_build - - j17_jvm_dtests_vnode: - requires: - - j11_build - - j11_cqlshlib_tests: - requires: - - j11_build - - j11_cqlshlib_cython_tests: - requires: - - j11_build - - j17_cqlshlib_tests: - requires: - - j11_build - - j17_cqlshlib_cython_tests: - requires: - - j11_build - - j17_unit_tests: - requires: - - j11_build - - j17_utests_oa: - requires: - - j11_build - - start_utests_long: - type: approval - - j11_utests_long: - requires: - - start_utests_long - - j11_build - - j17_utests_long: - requires: - - start_utests_long - - j11_build - - start_utests_cdc: - type: approval - - j11_utests_cdc: - requires: - - start_utests_cdc - - j11_build - - j17_utests_cdc: - requires: - - start_utests_cdc - - j11_build - - start_utests_compression: - type: approval - - j11_utests_compression: - requires: - - start_utests_compression - - j11_build - - j17_utests_compression: - requires: - - start_utests_compression - - j11_build - - start_utests_trie: - type: approval - - j11_utests_trie: - requires: - - start_utests_trie - - j11_build - - j17_utests_trie: - requires: - - start_utests_trie - - j11_build - - start_utests_stress: - type: approval - - j11_utests_stress: - requires: - - start_utests_stress - - j11_build - - j17_utests_stress: - requires: - - start_utests_stress - - j11_build - - start_utests_fqltool: - type: approval - - j11_utests_fqltool: - requires: - - start_utests_fqltool - - j11_build - - j17_utests_fqltool: - requires: - - start_utests_fqltool - - j11_build - - start_utests_system_keyspace_directory: - type: approval - - j11_utests_system_keyspace_directory: - requires: - - j11_build - - j17_utests_system_keyspace_directory: - requires: - - start_utests_system_keyspace_directory - - j11_build - - start_jvm_upgrade_dtests: - type: approval - - j11_dtest_jars_build: - requires: - - j11_build - - start_jvm_upgrade_dtests - - j11_jvm_upgrade_dtests: - requires: - - j11_dtest_jars_build - - j11_dtests: - requires: - - j11_build - - j11_dtests_vnode: - requires: - - j11_build - - start_j11_dtests_offheap: - type: approval - - j11_dtests_offheap: - requires: - - start_j11_dtests_offheap - - j11_build - - j17_dtests: - requires: - - j11_build - - j17_dtests_vnode: - requires: - - j11_build - - start_j17_dtests_offheap: - type: approval - - j17_dtests_offheap: - requires: - - start_j17_dtests_offheap - - j11_build - - start_j11_dtests_large: - type: approval - - j11_dtests_large: - requires: - - start_j11_dtests_large - - j11_build - - j11_dtests_large_vnode: - requires: - - start_j11_dtests_large - - j11_build - - start_j17_dtests_large: - type: approval - - j17_dtests_large: - requires: - - start_j17_dtests_large - - j11_build - - j17_dtests_large_vnode: - requires: - - start_j17_dtests_large - - j11_build - - j11_cqlsh_dtests_py3: - requires: - - j11_build - - j11_cqlsh_dtests_py3_vnode: - requires: - - j11_build - - j11_cqlsh_dtests_py38: - requires: - - j11_build - - j11_cqlsh_dtests_py311: - requires: - - j11_build - - j11_cqlsh_dtests_py38_vnode: - requires: - - j11_build - - j11_cqlsh_dtests_py311_vnode: - requires: - - j11_build - - start_j11_cqlsh_dtests_offheap: - type: approval - - j11_cqlsh_dtests_py3_offheap: - requires: - - start_j11_cqlsh_dtests_offheap - - j11_build - - j11_cqlsh_dtests_py38_offheap: - requires: - - start_j11_cqlsh_dtests_offheap - - j11_build - - j11_cqlsh_dtests_py311_offheap: - requires: - - start_j11_cqlsh_dtests_offheap - - j11_build - - j17_cqlsh_dtests_py3: - requires: - - j11_build - - j17_cqlsh_dtests_py3_vnode: - requires: - - j11_build - - j17_cqlsh_dtests_py38: - requires: - - j11_build - - j17_cqlsh_dtests_py311: - requires: - - j11_build - - j17_cqlsh_dtests_py38_vnode: - requires: - - j11_build - - j17_cqlsh_dtests_py311_vnode: - requires: - - j11_build - - start_j17_cqlsh-dtests-offheap: - type: approval - - j17_cqlsh_dtests_py3_offheap: - requires: - - start_j17_cqlsh-dtests-offheap - - j11_build - - j17_cqlsh_dtests_py38_offheap: - requires: - - start_j17_cqlsh-dtests-offheap - - j11_build - - j17_cqlsh_dtests_py311_offheap: - requires: - - start_j17_cqlsh-dtests-offheap - - j11_build - - start_j11_upgrade_dtests: - type: approval - - j11_upgrade_dtests: - requires: - - j11_build - - start_j11_upgrade_dtests - java17_separate_tests: - jobs: - - start_j17_build: - type: approval - - j17_build: - requires: - - start_j17_build - - start_j17_unit_tests: - type: approval - - j17_unit_tests: - requires: - - start_j17_unit_tests - - j17_build - - start_j17_jvm_dtests: - type: approval - - j17_jvm_dtests: - requires: - - start_j17_jvm_dtests - - j17_build - - start_j17_jvm_dtests_vnode: - type: approval - - j17_jvm_dtests_vnode: - requires: - - start_j17_jvm_dtests_vnode - - j17_build - - start_j17_cqlshlib_tests: - type: approval - - j17_cqlshlib_tests: - requires: - - start_j17_cqlshlib_tests - - j17_build - - start_j17_cqlshlib_cython_tests: - type: approval - - j17_cqlshlib_cython_tests: - requires: - - start_j17_cqlshlib_cython_tests - - j17_build - - start_j17_dtests: - type: approval - - j17_dtests: - requires: - - start_j17_dtests - - j17_build - - start_j17_dtests_vnode: - type: approval - - j17_dtests_vnode: - requires: - - start_j17_dtests_vnode - - j17_build - - start_j17_dtests_offheap: - type: approval - - j17_dtests_offheap: - requires: - - start_j17_dtests_offheap - - j17_build - - start_j17_dtests_large: - type: approval - - j17_dtests_large: - requires: - - start_j17_dtests_large - - j17_build - - start_j17_dtests_large_vnode: - type: approval - - j17_dtests_large_vnode: - requires: - - start_j17_dtests_large_vnode - - j17_build - - start_j17_cqlsh_tests: - type: approval - - j17_cqlsh_dtests_py3: - requires: - - start_j17_cqlsh_tests - - j17_build - - j17_cqlsh_dtests_py3_vnode: - requires: - - start_j17_cqlsh_tests - - j17_build - - j17_cqlsh_dtests_py38: - requires: - - start_j17_cqlsh_tests - - j17_build - - j17_cqlsh_dtests_py311: - requires: - - start_j17_cqlsh_tests - - j17_build - - j17_cqlsh_dtests_py38_vnode: - requires: - - start_j17_cqlsh_tests - - j17_build - - j17_cqlsh_dtests_py311_vnode: - requires: - - start_j17_cqlsh_tests - - j17_build - - start_j17_cqlsh-dtests-offheap: - type: approval - - j17_cqlsh_dtests_py3_offheap: - requires: - - start_j17_cqlsh-dtests-offheap - - j17_build - - j17_cqlsh_dtests_py38_offheap: - requires: - - start_j17_cqlsh-dtests-offheap - - j17_build - - j17_cqlsh_dtests_py311_offheap: - requires: - - start_j17_cqlsh-dtests-offheap - - j17_build - - start_j17_utests_oa: - type: approval - - j17_utests_oa: - requires: - - start_j17_utests_oa - - j17_build - - start_j17_utests_long: - type: approval - - j17_utests_long: - requires: - - start_j17_utests_long - - j17_build - - start_j17_utests_cdc: - type: approval - - j17_utests_cdc: - requires: - - start_j17_utests_cdc - - j17_build - - start_j17_utests_compression: - type: approval - - j17_utests_compression: - requires: - - start_j17_utests_compression - - j17_build - - start_j17_utests_trie: - type: approval - - j17_utests_trie: - requires: - - start_j17_utests_trie - - j17_build - - start_j17_utests_stress: - type: approval - - j17_utests_stress: - requires: - - start_j17_utests_stress - - j17_build - - start_j17_utests_fqltool: - type: approval - - j17_utests_fqltool: - requires: - - start_j17_utests_fqltool - - j17_build - - start_j17_utests_system_keyspace_directory: - type: approval - - j17_utests_system_keyspace_directory: - requires: - - start_j17_utests_system_keyspace_directory - - j17_build - java17_pre-commit_tests: - jobs: - - start_pre-commit_tests: - type: approval - - j17_build: - requires: - - start_pre-commit_tests - - j17_unit_tests: - requires: - - j17_build - - j17_utests_oa: - requires: - - j17_build - - j17_jvm_dtests: - requires: - - j17_build - - j17_jvm_dtests_vnode: - requires: - - j17_build - - j17_cqlshlib_tests: - requires: - - j17_build - - j17_cqlshlib_cython_tests: - requires: - - j17_build - - j17_dtests: - requires: - - j17_build - - j17_dtests_vnode: - requires: - - j17_build - - start_j17_dtests_offheap: - type: approval - - j17_dtests_offheap: - requires: - - start_j17_dtests_offheap - - j17_build - - start_j17_dtests_large: - type: approval - - j17_dtests_large: - requires: - - start_j17_dtests_large - - j17_build - - j17_dtests_large_vnode: - requires: - - start_j17_dtests_large - - j17_build - - j17_cqlsh_dtests_py3: - requires: - - j17_build - - j17_cqlsh_dtests_py3_vnode: - requires: - - j17_build - - j17_cqlsh_dtests_py38: - requires: - - j17_build - - j17_cqlsh_dtests_py311: - requires: - - j17_build - - j17_cqlsh_dtests_py38_vnode: - requires: - - j17_build - - j17_cqlsh_dtests_py311_vnode: - requires: - - j17_build - - start_j17_cqlsh-dtests-offheap: - type: approval - - j17_cqlsh_dtests_py3_offheap: - requires: - - start_j17_cqlsh-dtests-offheap - - j17_build - - j17_cqlsh_dtests_py38_offheap: - requires: - - start_j17_cqlsh-dtests-offheap - - j17_build - - j17_cqlsh_dtests_py311_offheap: - requires: - - start_j17_cqlsh-dtests-offheap - - j17_build - - start_utests_long: - type: approval - - j17_utests_long: - requires: - - start_utests_long - - j17_build - - start_utests_cdc: - type: approval - - j17_utests_cdc: - requires: - - start_utests_cdc - - j17_build - - start_utests_compression: - type: approval - - j17_utests_compression: - requires: - - start_utests_compression - - j17_build - - start_utests_trie: - type: approval - - j17_utests_trie: - requires: - - start_utests_trie - - j17_build - - start_utests_stress: - type: approval - - j17_utests_stress: - requires: - - start_utests_stress - - j17_build - - start_utests_fqltool: - type: approval - - j17_utests_fqltool: - requires: - - start_utests_fqltool - - j17_build - - start_utests_system_keyspace_directory: - type: approval - - j17_utests_system_keyspace_directory: - requires: - - start_utests_system_keyspace_directory - - j17_build diff --git a/.circleci/config_11_and_17.yml.FREE b/.circleci/config_11_and_17.yml.FREE deleted file mode 100644 index 0c247fbc85..0000000000 --- a/.circleci/config_11_and_17.yml.FREE +++ /dev/null @@ -1,10968 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -version: 2 -jobs: - j11_jvm_upgrade_dtests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_JVM_UPGRADE_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_JVM_UPGRADE_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_JVM_UPGRADE_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-jvm-dtest-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-jvm-dtest-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_dtests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_without_vnodes_raw /tmp/all_dtest_tests_j17_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_without_vnodes_raw > /tmp/all_dtest_tests_j17_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_without_vnodes > /tmp/split_dtest_tests_j17_without_vnodes.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes_final.txt\n" - - run: - name: Run dtests (j17_without_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j17_without_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j17_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_cqlshlib_cython_tests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run cqlshlib Unit Tests - command: | - export PATH=$JAVA_HOME/bin:$PATH - export cython="yes" - time mv ~/cassandra /tmp - cd /tmp/cassandra/ - ant jar -Dno-checkstyle=true -Drat.skip=true -Dant.gen-doc.skip=true -Djavadoc.skip=true - ./pylib/cassandra-cqlsh-tests.sh $(pwd) - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/pylib - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_cqlsh_dtests_py311_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_dtests_offheap_raw /tmp/all_dtest_tests_j17_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j17_dtests_offheap_raw > /tmp/all_dtest_tests_j17_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_dtests_offheap > /tmp/split_dtest_tests_j17_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j17_dtests_offheap) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt" - cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt - - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then - export CQLSH_PYTHON=/usr/bin/python3.11 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_jvm_dtests_vnode_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_JVM_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_JVM_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_JVM_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=true\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-jvm-dtest-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-jvm-dtest-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_utests_fqltool_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_FQLTOOL_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_FQLTOOL_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS_FQLTOOL} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=fqltool-test\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant fqltool-test $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_cqlshlib_cython_tests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run cqlshlib Unit Tests - command: | - export PATH=$JAVA_HOME/bin:$PATH - export cython="yes" - time mv ~/cassandra /tmp - cd /tmp/cassandra/ - ant jar -Dno-checkstyle=true -Drat.skip=true -Dant.gen-doc.skip=true -Djavadoc.skip=true - ./pylib/cassandra-cqlsh-tests.sh $(pwd) - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/pylib - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_cqlsh_dtests_py3_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_dtests_offheap_raw /tmp/all_dtest_tests_j17_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j17_dtests_offheap_raw > /tmp/all_dtest_tests_j17_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_dtests_offheap > /tmp/split_dtest_tests_j17_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j17_dtests_offheap) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt" - cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then - export CQLSH_PYTHON=/usr/bin/python3.6 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_utests_compression: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-compression) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-compression -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_cqlsh_dtests_py38_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_with_vnodes_raw /tmp/all_dtest_tests_j17_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_with_vnodes_raw > /tmp/all_dtest_tests_j17_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_with_vnodes > /tmp/split_dtest_tests_j17_with_vnodes.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes_final.txt\n" - - run: - name: Run dtests (j17_with_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt" - cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt - - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then - export CQLSH_PYTHON=/usr/bin/python3.8 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_dtests_vnode_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if true; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_dtests_offheap_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if true; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 --use-off-heap-memtables --skip-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_dtests_vnode_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if true; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_system_keyspace_directory: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-system-keyspace-directory) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-system-keyspace-directory -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_cqlsh_dtests_py3: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_without_vnodes_raw /tmp/all_dtest_tests_j17_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_without_vnodes_raw > /tmp/all_dtest_tests_j17_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_without_vnodes > /tmp/split_dtest_tests_j17_without_vnodes.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes_final.txt\n" - - run: - name: Run dtests (j17_without_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt" - cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then - export CQLSH_PYTHON=/usr/bin/python3.6 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_utests_stress_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_STRESS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_STRESS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS_STRESS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=stress-test-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant stress-test-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_unit_tests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_utests_system_keyspace_directory_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-system-keyspace-directory\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-system-keyspace-directory $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_cqlsh_dtests_py311: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_without_vnodes_raw /tmp/all_dtest_tests_j11_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_without_vnodes_raw > /tmp/all_dtest_tests_j11_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_without_vnodes > /tmp/split_dtest_tests_j11_without_vnodes.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\n" - - run: - name: Run dtests (j11_without_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt" - cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt - - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then - export CQLSH_PYTHON=/usr/bin/python3.11 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_dtests_large_vnode_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_LARGE_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_LARGE_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_LARGE_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_LARGE_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_LARGE_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_LARGE_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_LARGE_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if true; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 --only-resource-intensive-tests --force-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_dtests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if false; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_unit_tests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_cqlsh_dtests_py311: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_without_vnodes_raw /tmp/all_dtest_tests_j17_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_without_vnodes_raw > /tmp/all_dtest_tests_j17_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_without_vnodes > /tmp/split_dtest_tests_j17_without_vnodes.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes_final.txt\n" - - run: - name: Run dtests (j17_without_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt" - cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt - - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then - export CQLSH_PYTHON=/usr/bin/python3.11 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_cqlsh_dtests_py38: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_without_vnodes_raw /tmp/all_dtest_tests_j11_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_without_vnodes_raw > /tmp/all_dtest_tests_j11_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_without_vnodes > /tmp/split_dtest_tests_j11_without_vnodes.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\n" - - run: - name: Run dtests (j11_without_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt" - cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt - - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then - export CQLSH_PYTHON=/usr/bin/python3.8 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_utests_stress_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_STRESS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_STRESS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS_STRESS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=stress-test-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant stress-test-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_utests_compression_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-compression\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-compression $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_utests_oa: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-oa) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-oa -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_repeated_ant_test: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run repeated JUnit test - no_output_timeout: 15m - command: | - if [ "${REPEATED_ANT_TEST_CLASS}" == "" ]; then - echo "Repeated utest class name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_ANT_TEST_COUNT}" == "" ]; then - echo "Repeated utest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_ANT_TEST_COUNT}" -le 0 ]; then - echo "Repeated utest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_ANT_TEST_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_ANT_TEST_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_ANT_TEST_TARGET} ${REPEATED_ANT_TEST_CLASS} ${REPEATED_ANT_TEST_METHODS} ${REPEATED_ANT_TEST_COUNT} times" - - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - - target=${REPEATED_ANT_TEST_TARGET} - class_path=${REPEATED_ANT_TEST_CLASS} - class_name="${class_path##*.}" - - # Prepare the -Dtest.name argument. - # It can be the fully qualified class name or the short class name, depending on the target. - if [[ $target == "test" || \ - $target == "test-cdc" || \ - $target == "test-compression" || \ - $target == "test-trie" || \ - $target == "test-oa" || \ - $target == "test-system-keyspace-directory" || \ - $target == "fqltool-test" || \ - $target == "long-test" || \ - $target == "stress-test" || \ - $target == "test-simulator-dtest" ]]; then - name="-Dtest.name=$class_name" - else - name="-Dtest.name=$class_path" - fi - - # Prepare the -Dtest.methods argument, which is optional - if [ "${REPEATED_ANT_TEST_METHODS}" == "" ]; then - methods="" - else - methods="-Dtest.methods=${REPEATED_ANT_TEST_METHODS}" - fi - - # Prepare the JVM dtests vnodes argument, which is optional - vnodes_args="" - if ${REPEATED_ANT_TEST_VNODES}; then - vnodes_args="-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'" - fi - - # Run the test target as many times as requested collecting the exit code, - # stopping the iteration only if stop_on_failure is set. - exit_code="$?" - for i in $(seq -w 1 $count); do - - echo "Running test iteration $i of $count" - - # run the test - status="passes" - if !( set -o pipefail && ant $target $name $methods $vnodes_args -Dno-build-test=true | tee stdout.txt ); then - status="fails" - exit_code=1 - fi - - # move the stdout output file - dest=/tmp/results/repeated_utest/stdout/${status}/${i} - mkdir -p $dest - mv stdout.txt $dest/${REPEATED_ANT_TEST_TARGET}-${REPEATED_ANT_TEST_CLASS}.txt - - # move the XML output files - source=build/test/output - dest=/tmp/results/repeated_utest/output/${status}/${i} - mkdir -p $dest - if [[ -d $source && -n "$(ls $source)" ]]; then - mv $source/* $dest/ - fi - - # move the log files - source=build/test/logs - dest=/tmp/results/repeated_utest/logs/${status}/${i} - mkdir -p $dest - if [[ -d $source && -n "$(ls $source)" ]]; then - mv $source/* $dest/ - fi - - # maybe stop iterations on test failure - if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then - break - fi - done - - (exit ${exit_code}) - fi - fi - - store_test_results: - path: /tmp/results/repeated_utest/output - - store_artifacts: - path: /tmp/results/repeated_utest/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utest/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utest/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_dtests_large_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_large_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_large_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --only-resource-intensive-tests --force-resource-intensive-tests --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_large_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_large_with_vnodes_raw /tmp/all_dtest_tests_j11_large_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_large_with_vnodes_raw > /tmp/all_dtest_tests_j11_large_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_large_with_vnodes > /tmp/split_dtest_tests_j11_large_with_vnodes.txt\ncat /tmp/split_dtest_tests_j11_large_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_large_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_large_with_vnodes_final.txt\n" - - run: - name: Run dtests (j11_large_with_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j11_large_with_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j11_large_with_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_large_with_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --only-resource-intensive-tests --force-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j11_large_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_large_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_large_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_dtests_large_vnode_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_LARGE_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_LARGE_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_LARGE_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_LARGE_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_LARGE_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_LARGE_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_LARGE_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if true; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 --only-resource-intensive-tests --force-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_utests_trie: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-trie) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-trie -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_cqlsh_dtests_py38_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_dtests_offheap_raw /tmp/all_dtest_tests_j11_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j11_dtests_offheap_raw > /tmp/all_dtest_tests_j11_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_dtests_offheap > /tmp/split_dtest_tests_j11_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j11_dtests_offheap) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt" - cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt - - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then - export CQLSH_PYTHON=/usr/bin/python3.8 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_dtests_large: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_large_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_large_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --only-resource-intensive-tests --force-resource-intensive-tests --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_large_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_large_without_vnodes_raw /tmp/all_dtest_tests_j11_large_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_large_without_vnodes_raw > /tmp/all_dtest_tests_j11_large_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_large_without_vnodes > /tmp/split_dtest_tests_j11_large_without_vnodes.txt\ncat /tmp/split_dtest_tests_j11_large_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_large_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_large_without_vnodes_final.txt\n" - - run: - name: Run dtests (j11_large_without_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j11_large_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j11_large_without_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_large_without_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --only-resource-intensive-tests --force-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j11_large_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_large_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_large_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_system_keyspace_directory_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-system-keyspace-directory\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-system-keyspace-directory $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_oa: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-oa) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-oa -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_upgrade_dtests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_UPGRADE_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_UPGRADE_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_UPGRADE_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_UPGRADE_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_UPGRADE_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_UPGRADE_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_UPGRADE_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if false; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if true; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_jvm_dtests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine distributed Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/distributed/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/distributed/;;g" | grep "Test\.java$" | grep -v upgrade > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.distributed.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=distributed -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_repeated_ant_test: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run repeated JUnit test - no_output_timeout: 15m - command: | - if [ "${REPEATED_ANT_TEST_CLASS}" == "" ]; then - echo "Repeated utest class name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_ANT_TEST_COUNT}" == "" ]; then - echo "Repeated utest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_ANT_TEST_COUNT}" -le 0 ]; then - echo "Repeated utest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_ANT_TEST_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_ANT_TEST_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_ANT_TEST_TARGET} ${REPEATED_ANT_TEST_CLASS} ${REPEATED_ANT_TEST_METHODS} ${REPEATED_ANT_TEST_COUNT} times" - - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - - target=${REPEATED_ANT_TEST_TARGET} - class_path=${REPEATED_ANT_TEST_CLASS} - class_name="${class_path##*.}" - - # Prepare the -Dtest.name argument. - # It can be the fully qualified class name or the short class name, depending on the target. - if [[ $target == "test" || \ - $target == "test-cdc" || \ - $target == "test-compression" || \ - $target == "test-trie" || \ - $target == "test-oa" || \ - $target == "test-system-keyspace-directory" || \ - $target == "fqltool-test" || \ - $target == "long-test" || \ - $target == "stress-test" || \ - $target == "test-simulator-dtest" ]]; then - name="-Dtest.name=$class_name" - else - name="-Dtest.name=$class_path" - fi - - # Prepare the -Dtest.methods argument, which is optional - if [ "${REPEATED_ANT_TEST_METHODS}" == "" ]; then - methods="" - else - methods="-Dtest.methods=${REPEATED_ANT_TEST_METHODS}" - fi - - # Prepare the JVM dtests vnodes argument, which is optional - vnodes_args="" - if ${REPEATED_ANT_TEST_VNODES}; then - vnodes_args="-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'" - fi - - # Run the test target as many times as requested collecting the exit code, - # stopping the iteration only if stop_on_failure is set. - exit_code="$?" - for i in $(seq -w 1 $count); do - - echo "Running test iteration $i of $count" - - # run the test - status="passes" - if !( set -o pipefail && ant $target $name $methods $vnodes_args -Dno-build-test=true | tee stdout.txt ); then - status="fails" - exit_code=1 - fi - - # move the stdout output file - dest=/tmp/results/repeated_utest/stdout/${status}/${i} - mkdir -p $dest - mv stdout.txt $dest/${REPEATED_ANT_TEST_TARGET}-${REPEATED_ANT_TEST_CLASS}.txt - - # move the XML output files - source=build/test/output - dest=/tmp/results/repeated_utest/output/${status}/${i} - mkdir -p $dest - if [[ -d $source && -n "$(ls $source)" ]]; then - mv $source/* $dest/ - fi - - # move the log files - source=build/test/logs - dest=/tmp/results/repeated_utest/logs/${status}/${i} - mkdir -p $dest - if [[ -d $source && -n "$(ls $source)" ]]; then - mv $source/* $dest/ - fi - - # maybe stop iterations on test failure - if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then - break - fi - done - - (exit ${exit_code}) - fi - fi - - store_test_results: - path: /tmp/results/repeated_utest/output - - store_artifacts: - path: /tmp/results/repeated_utest/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utest/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utest/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_cqlsh_dtests_py3: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_without_vnodes_raw /tmp/all_dtest_tests_j11_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_without_vnodes_raw > /tmp/all_dtest_tests_j11_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_without_vnodes > /tmp/split_dtest_tests_j11_without_vnodes.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\n" - - run: - name: Run dtests (j11_without_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt" - cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then - export CQLSH_PYTHON=/usr/bin/python3.6 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_build: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Clone Cassandra Repository (via git) - command: | - git clone --single-branch --depth 1 --branch $CIRCLE_BRANCH https://github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME.git ~/cassandra - - run: - name: Build Cassandra - command: | - export PATH=$JAVA_HOME/bin:$PATH - cd ~/cassandra - # Loop to prevent failure due to maven-ant-tasks not downloading a jar.. - for x in $(seq 1 3); do - ${ANT_HOME}/bin/ant clean realclean jar - RETURN="$?" - if [ "${RETURN}" -eq "0" ]; then - break - fi - done - # Exit, if we didn't build successfully - if [ "${RETURN}" -ne "0" ]; then - echo "Build failed with exit code: ${RETURN}" - exit ${RETURN} - fi - no_output_timeout: 15m - - run: - name: Run static code analysis - command: | - export PATH=$JAVA_HOME/bin:$PATH - cd ~/cassandra - ant check - - persist_to_workspace: - root: /home/cassandra - paths: - - cassandra - - .m2 - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_utests_cdc: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-cdc) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-cdc -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_utests_cdc_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-cdc\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-cdc $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_utests_fqltool: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run Unit Tests (fqltool-test) - command: | - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant fqltool-test -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_dtests_offheap_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if true; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 --use-off-heap-memtables --skip-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_jvm_dtests_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine distributed Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/distributed/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/distributed/;;g" | grep "Test\.java$" | grep -v upgrade > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.distributed.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist -Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16' -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=distributed -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_dtest_jars_build: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Build Cassandra DTest jars - command: | - export PATH=$JAVA_HOME/bin:$PATH - cd ~/cassandra - mkdir ~/dtest_jars - git remote add apache https://github.com/apache/cassandra.git - for branch in cassandra-4.0 cassandra-4.1 trunk; do - # check out the correct cassandra version: - git remote set-branches --add apache '$branch' - git fetch --depth 1 apache $branch - git checkout $branch - git clean -fd - # Loop to prevent failure due to maven-ant-tasks not downloading a jar.. - for x in $(seq 1 3); do - ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar -Dno-checkstyle=true -Drat.skip=true - RETURN="$?" - if [ "${RETURN}" -eq "0" ]; then - cp build/dtest*.jar ~/dtest_jars - break - fi - done - # Exit, if we didn't build successfully - if [ "${RETURN}" -ne "0" ]; then - echo "Build failed with exit code: ${RETURN}" - exit ${RETURN} - fi - done - # and build the dtest-jar for the branch under test - ${ANT_HOME}/bin/ant realclean - git checkout origin/$CIRCLE_BRANCH - git clean -fd - for x in $(seq 1 3); do - ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar -Dno-checkstyle=true -Drat.skip=true - RETURN="$?" - if [ "${RETURN}" -eq "0" ]; then - cp build/dtest*.jar ~/dtest_jars - break - fi - done - # Exit, if we didn't build successfully - if [ "${RETURN}" -ne "0" ]; then - echo "Build failed with exit code: ${RETURN}" - exit ${RETURN} - fi - ls -l ~/dtest_jars - no_output_timeout: 15m - - persist_to_workspace: - root: /home/cassandra - paths: - - dtest_jars - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_long: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run Unit Tests (long-test) - command: | - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant long-test -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_unit_tests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=testsome\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant testsome $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_simulator_dtests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Simulator Tests - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant test-simulator-dtest -Dno-build-test=true - no_output_timeout: 30m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_jvm_upgrade_dtests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine distributed Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/distributed/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/distributed/;;g" | grep "Test\.java$" | grep upgrade > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.distributed.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=distributed -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_stress: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run Unit Tests (stress-test) - command: | - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant stress-test -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_cdc_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-cdc\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-cdc $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_dtests_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_with_vnodes_raw /tmp/all_dtest_tests_j17_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_with_vnodes_raw > /tmp/all_dtest_tests_j17_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_with_vnodes > /tmp/split_dtest_tests_j17_with_vnodes.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes_final.txt\n" - - run: - name: Run dtests (j17_with_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j17_with_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j17_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_dtests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if false; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_compression: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-compression) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-compression -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_utests_trie_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-trie\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-trie $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_cqlsh_dtests_py3_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_dtests_offheap_raw /tmp/all_dtest_tests_j11_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j11_dtests_offheap_raw > /tmp/all_dtest_tests_j11_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_dtests_offheap > /tmp/split_dtest_tests_j11_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j11_dtests_offheap) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt" - cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then - export CQLSH_PYTHON=/usr/bin/python3.6 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_cqlsh_dtests_py311_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_dtests_offheap_raw /tmp/all_dtest_tests_j11_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j11_dtests_offheap_raw > /tmp/all_dtest_tests_j11_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_dtests_offheap > /tmp/split_dtest_tests_j11_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j11_dtests_offheap) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt" - cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt - - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then - export CQLSH_PYTHON=/usr/bin/python3.11 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_trie: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-trie) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-trie -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_upgrade_dtests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_upgradetests_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_upgradetests_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --execute-upgrade-tests-only --upgrade-target-version-only --upgrade-version-selection all --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_upgradetests_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_upgradetests_without_vnodes_raw /tmp/all_dtest_tests_j11_upgradetests_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_upgradetests_without_vnodes_raw > /tmp/all_dtest_tests_j11_upgradetests_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_upgradetests_without_vnodes > /tmp/split_dtest_tests_j11_upgradetests_without_vnodes.txt\ncat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt\n" - - run: - name: Run dtests (j11_upgradetests_without_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --execute-upgrade-tests-only --upgrade-target-version-only --upgrade-version-selection all --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j11_upgradetests_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_upgradetests_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_upgradetests_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_dtests_large_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_LARGE_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_LARGE_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_LARGE_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_LARGE_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_LARGE_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_LARGE_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_LARGE_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if false; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 --only-resource-intensive-tests --force-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_utests_compression_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-compression\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-compression $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_cqlsh_dtests_py3_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_with_vnodes_raw /tmp/all_dtest_tests_j11_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_with_vnodes_raw > /tmp/all_dtest_tests_j11_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_with_vnodes > /tmp/split_dtest_tests_j11_with_vnodes.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n" - - run: - name: Run dtests (j11_with_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt" - cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then - export CQLSH_PYTHON=/usr/bin/python3.6 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_utests_fqltool: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run Unit Tests (fqltool-test) - command: | - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant fqltool-test -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_dtests_large_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_large_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_large_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --only-resource-intensive-tests --force-resource-intensive-tests --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_large_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_large_with_vnodes_raw /tmp/all_dtest_tests_j17_large_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_large_with_vnodes_raw > /tmp/all_dtest_tests_j17_large_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_large_with_vnodes > /tmp/split_dtest_tests_j17_large_with_vnodes.txt\ncat /tmp/split_dtest_tests_j17_large_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_large_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_large_with_vnodes_final.txt\n" - - run: - name: Run dtests (j17_large_with_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j17_large_with_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j17_large_with_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_large_with_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --only-resource-intensive-tests --force-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j17_large_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_large_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_large_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_dtests_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_dtests_offheap_raw /tmp/all_dtest_tests_j11_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j11_dtests_offheap_raw > /tmp/all_dtest_tests_j11_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_dtests_offheap > /tmp/split_dtest_tests_j11_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j11_dtests_offheap) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\"\ncat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j11_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_cqlsh_dtests_py38_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_with_vnodes_raw /tmp/all_dtest_tests_j11_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_with_vnodes_raw > /tmp/all_dtest_tests_j11_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_with_vnodes > /tmp/split_dtest_tests_j11_with_vnodes.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n" - - run: - name: Run dtests (j11_with_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt" - cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt - - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then - export CQLSH_PYTHON=/usr/bin/python3.8 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_trie_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-trie\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-trie $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_simulator_dtests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_SIMULATOR_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_SIMULATOR_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_SIMULATOR_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-simulator-dtest\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-simulator-dtest $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_jvm_dtests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_JVM_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_JVM_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_JVM_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-jvm-dtest-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-jvm-dtest-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_cqlsh_dtests_py38_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_dtests_offheap_raw /tmp/all_dtest_tests_j17_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j17_dtests_offheap_raw > /tmp/all_dtest_tests_j17_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_dtests_offheap > /tmp/split_dtest_tests_j17_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j17_dtests_offheap) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt" - cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt - - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then - export CQLSH_PYTHON=/usr/bin/python3.8 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_cqlshlib_tests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run cqlshlib Unit Tests - command: | - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra/ - ant jar -Dno-checkstyle=true -Drat.skip=true -Dant.gen-doc.skip=true -Djavadoc.skip=true - ./pylib/cassandra-cqlsh-tests.sh $(pwd) - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/pylib - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_cqlsh_dtests_py311_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_with_vnodes_raw /tmp/all_dtest_tests_j11_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_with_vnodes_raw > /tmp/all_dtest_tests_j11_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_with_vnodes > /tmp/split_dtest_tests_j11_with_vnodes.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n" - - run: - name: Run dtests (j11_with_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt" - cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt - - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then - export CQLSH_PYTHON=/usr/bin/python3.11 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_utests_system_keyspace_directory: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-system-keyspace-directory) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-system-keyspace-directory -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_cqlsh_dtests_py3_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_with_vnodes_raw /tmp/all_dtest_tests_j17_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_with_vnodes_raw > /tmp/all_dtest_tests_j17_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_with_vnodes > /tmp/split_dtest_tests_j17_with_vnodes.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes_final.txt\n" - - run: - name: Run dtests (j17_with_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt" - cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then - export CQLSH_PYTHON=/usr/bin/python3.6 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_cqlsh_dtests_py311_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_with_vnodes_raw /tmp/all_dtest_tests_j17_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_with_vnodes_raw > /tmp/all_dtest_tests_j17_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_with_vnodes > /tmp/split_dtest_tests_j17_with_vnodes.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes_final.txt\n" - - run: - name: Run dtests (j17_with_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt" - cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt - - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then - export CQLSH_PYTHON=/usr/bin/python3.11 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_jvm_dtests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine distributed Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/distributed/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/distributed/;;g" | grep "Test\.java$" | grep -v upgrade > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.distributed.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=distributed -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_utests_stress: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run Unit Tests (stress-test) - command: | - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant stress-test -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_jvm_dtests_vnode_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_JVM_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_JVM_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_JVM_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=true\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-jvm-dtest-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-jvm-dtest-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_build: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Clone Cassandra Repository (via git) - command: | - git clone --single-branch --depth 1 --branch $CIRCLE_BRANCH https://github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME.git ~/cassandra - - run: - name: Build Cassandra - command: | - export PATH=$JAVA_HOME/bin:$PATH - cd ~/cassandra - # Loop to prevent failure due to maven-ant-tasks not downloading a jar.. - for x in $(seq 1 3); do - ${ANT_HOME}/bin/ant clean realclean jar - RETURN="$?" - if [ "${RETURN}" -eq "0" ]; then - break - fi - done - # Exit, if we didn't build successfully - if [ "${RETURN}" -ne "0" ]; then - echo "Build failed with exit code: ${RETURN}" - exit ${RETURN} - fi - no_output_timeout: 15m - - run: - name: Run static code analysis - command: | - export PATH=$JAVA_HOME/bin:$PATH - cd ~/cassandra - ant check - - persist_to_workspace: - root: /home/cassandra - paths: - - cassandra - - .m2 - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_oa_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-oa\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-oa $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_cqlshlib_tests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run cqlshlib Unit Tests - command: | - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra/ - ant jar -Dno-checkstyle=true -Drat.skip=true -Dant.gen-doc.skip=true -Djavadoc.skip=true - ./pylib/cassandra-cqlsh-tests.sh $(pwd) - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/pylib - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_dtests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_without_vnodes_raw /tmp/all_dtest_tests_j11_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_without_vnodes_raw > /tmp/all_dtest_tests_j11_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_without_vnodes > /tmp/split_dtest_tests_j11_without_vnodes.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\n" - - run: - name: Run dtests (j11_without_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j11_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_jvm_dtests_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine distributed Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/distributed/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/distributed/;;g" | grep "Test\.java$" | grep -v upgrade > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.distributed.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist -Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16' -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=distributed -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_cqlsh_dtests_py38: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_without_vnodes_raw /tmp/all_dtest_tests_j17_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_without_vnodes_raw > /tmp/all_dtest_tests_j17_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_without_vnodes > /tmp/split_dtest_tests_j17_without_vnodes.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes_final.txt\n" - - run: - name: Run dtests (j17_without_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt" - cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt - - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then - export CQLSH_PYTHON=/usr/bin/python3.8 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_utests_cdc: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-cdc) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-cdc -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_utests_fqltool_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_FQLTOOL_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_FQLTOOL_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS_FQLTOOL} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=fqltool-test\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant fqltool-test $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_dtests_large: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_large_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_large_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --only-resource-intensive-tests --force-resource-intensive-tests --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_large_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_large_without_vnodes_raw /tmp/all_dtest_tests_j17_large_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_large_without_vnodes_raw > /tmp/all_dtest_tests_j17_large_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_large_without_vnodes > /tmp/split_dtest_tests_j17_large_without_vnodes.txt\ncat /tmp/split_dtest_tests_j17_large_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_large_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_large_without_vnodes_final.txt\n" - - run: - name: Run dtests (j17_large_without_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j17_large_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j17_large_without_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_large_without_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --only-resource-intensive-tests --force-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j17_large_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_large_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_large_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_unit_tests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=testsome\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant testsome $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_utests_long: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run Unit Tests (long-test) - command: | - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant long-test -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_utests_oa_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-oa\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-oa $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_dtests_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_with_vnodes_raw /tmp/all_dtest_tests_j11_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_with_vnodes_raw > /tmp/all_dtest_tests_j11_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_with_vnodes > /tmp/split_dtest_tests_j11_with_vnodes.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n" - - run: - name: Run dtests (j11_with_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j11_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_jvm_dtests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_JVM_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_JVM_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_JVM_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-jvm-dtest-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-jvm-dtest-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_dtests_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_dtests_offheap_raw /tmp/all_dtest_tests_j17_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j17_dtests_offheap_raw > /tmp/all_dtest_tests_j17_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_dtests_offheap > /tmp/split_dtest_tests_j17_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j17_dtests_offheap) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\"\ncat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j17_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_dtests_large_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_LARGE_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_LARGE_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_LARGE_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_LARGE_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_LARGE_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_LARGE_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_LARGE_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if false; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 --only-resource-intensive-tests --force-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_utests_long_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_LONG_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_LONG_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS_LONG} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=long-testsome\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant long-testsome $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_utests_long_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_LONG_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_LONG_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS_LONG} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=long-testsome\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant long-testsome $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true -workflows: - version: 2 - java11_separate_tests: - jobs: - - start_j11_build: - type: approval - - j11_build: - requires: - - start_j11_build - - start_j11_unit_tests: - type: approval - - j11_unit_tests: - requires: - - start_j11_unit_tests - - j11_build - - start_j11_jvm_dtests: - type: approval - - j11_jvm_dtests: - requires: - - start_j11_jvm_dtests - - j11_build - - start_j11_jvm_dtests_vnode: - type: approval - - j11_jvm_dtests_vnode: - requires: - - start_j11_jvm_dtests_vnode - - j11_build - - start_j17_jvm_dtests: - type: approval - - j17_jvm_dtests: - requires: - - start_j17_jvm_dtests - - j11_build - - start_j17_jvm_dtests_vnode: - type: approval - - j17_jvm_dtests_vnode: - requires: - - start_j17_jvm_dtests_vnode - - j11_build - - start_j11_simulator_dtests: - type: approval - - j11_simulator_dtests: - requires: - - start_j11_simulator_dtests - - j11_build - - start_j11_cqlshlib_tests: - type: approval - - j11_cqlshlib_tests: - requires: - - start_j11_cqlshlib_tests - - j11_build - - start_j11_cqlshlib_cython_tests: - type: approval - - j11_cqlshlib_cython_tests: - requires: - - start_j11_cqlshlib_cython_tests - - j11_build - - start_j17_cqlshlib_tests: - type: approval - - j17_cqlshlib_tests: - requires: - - start_j17_cqlshlib_tests - - j11_build - - start_j17_cqlshlib_cython_tests: - type: approval - - j17_cqlshlib_cython_tests: - requires: - - start_j17_cqlshlib_cython_tests - - j11_build - - start_j17_unit_tests: - type: approval - - j17_unit_tests: - requires: - - start_j17_unit_tests - - j11_build - - start_j11_utests_oa: - type: approval - - j11_utests_oa: - requires: - - start_j11_utests_oa - - j11_build - - start_j17_utests_oa: - type: approval - - j17_utests_oa: - requires: - - start_j17_utests_oa - - j11_build - - start_j11_utests_long: - type: approval - - j11_utests_long: - requires: - - start_j11_utests_long - - j11_build - - start_j17_utests_long: - type: approval - - j17_utests_long: - requires: - - start_j17_utests_long - - j11_build - - start_j11_utests_cdc: - type: approval - - j11_utests_cdc: - requires: - - start_j11_utests_cdc - - j11_build - - start_j17_utests_cdc: - type: approval - - j17_utests_cdc: - requires: - - start_j17_utests_cdc - - j11_build - - start_j11_utests_compression: - type: approval - - j11_utests_compression: - requires: - - start_j11_utests_compression - - j11_build - - start_j17_utests_compression: - type: approval - - j17_utests_compression: - requires: - - start_j17_utests_compression - - j11_build - - start_j11_utests_trie: - type: approval - - j11_utests_trie: - requires: - - start_j11_utests_trie - - j11_build - - start_j17_utests_trie: - type: approval - - j17_utests_trie: - requires: - - start_j17_utests_trie - - j11_build - - start_j11_utests_stress: - type: approval - - j11_utests_stress: - requires: - - start_j11_utests_stress - - j11_build - - start_j17_utests_stress: - type: approval - - j17_utests_stress: - requires: - - start_j17_utests_stress - - j11_build - - start_j11_utests_fqltool: - type: approval - - j11_utests_fqltool: - requires: - - start_j11_utests_fqltool - - j11_build - - start_j17_utests_fqltool: - type: approval - - j17_utests_fqltool: - requires: - - start_j17_utests_fqltool - - j11_build - - start_j11_utests_system_keyspace_directory: - type: approval - - j11_utests_system_keyspace_directory: - requires: - - start_j11_utests_system_keyspace_directory - - j11_build - - start_j17_utests_system_keyspace_directory: - type: approval - - j17_utests_system_keyspace_directory: - requires: - - start_j17_utests_system_keyspace_directory - - j11_build - - start_j11_dtest_jars_build: - type: approval - - j11_dtest_jars_build: - requires: - - j11_build - - start_j11_dtest_jars_build - - start_jvm_upgrade_dtests: - type: approval - - j11_jvm_upgrade_dtests: - requires: - - start_jvm_upgrade_dtests - - j11_dtest_jars_build - - start_j11_dtests: - type: approval - - j11_dtests: - requires: - - start_j11_dtests - - j11_build - - start_j11_dtests_vnode: - type: approval - - j11_dtests_vnode: - requires: - - start_j11_dtests_vnode - - j11_build - - start_j11_dtests_offheap: - type: approval - - j11_dtests_offheap: - requires: - - start_j11_dtests_offheap - - j11_build - - start_j17_dtests: - type: approval - - j17_dtests: - requires: - - start_j17_dtests - - j11_build - - start_j17_dtests_vnode: - type: approval - - j17_dtests_vnode: - requires: - - start_j17_dtests_vnode - - j11_build - - start_j17_dtests_offheap: - type: approval - - j17_dtests_offheap: - requires: - - start_j17_dtests_offheap - - j11_build - - start_j11_dtests_large: - type: approval - - j11_dtests_large: - requires: - - start_j11_dtests_large - - j11_build - - start_j11_dtests_large_vnode: - type: approval - - j11_dtests_large_vnode: - requires: - - start_j11_dtests_large_vnode - - j11_build - - start_j17_dtests_large: - type: approval - - j17_dtests_large: - requires: - - start_j17_dtests_large - - j11_build - - start_j17_dtests_large_vnode: - type: approval - - j17_dtests_large_vnode: - requires: - - start_j17_dtests_large_vnode - - j11_build - - start_j11_cqlsh_tests: - type: approval - - j11_cqlsh_dtests_py3: - requires: - - start_j11_cqlsh_tests - - j11_build - - j11_cqlsh_dtests_py3_vnode: - requires: - - start_j11_cqlsh_tests - - j11_build - - j11_cqlsh_dtests_py38: - requires: - - start_j11_cqlsh_tests - - j11_build - - j11_cqlsh_dtests_py311: - requires: - - start_j11_cqlsh_tests - - j11_build - - j11_cqlsh_dtests_py38_vnode: - requires: - - start_j11_cqlsh_tests - - j11_build - - j11_cqlsh_dtests_py311_vnode: - requires: - - start_j11_cqlsh_tests - - j11_build - - start_j11_cqlsh_tests_offheap: - type: approval - - j11_cqlsh_dtests_py3_offheap: - requires: - - start_j11_cqlsh_tests_offheap - - j11_build - - j11_cqlsh_dtests_py38_offheap: - requires: - - start_j11_cqlsh_tests_offheap - - j11_build - - j11_cqlsh_dtests_py311_offheap: - requires: - - start_j11_cqlsh_tests_offheap - - j11_build - - start_j17_cqlsh_tests: - type: approval - - j17_cqlsh_dtests_py3: - requires: - - start_j17_cqlsh_tests - - j11_build - - j17_cqlsh_dtests_py3_vnode: - requires: - - start_j17_cqlsh_tests - - j11_build - - j17_cqlsh_dtests_py38: - requires: - - start_j17_cqlsh_tests - - j11_build - - j17_cqlsh_dtests_py311: - requires: - - start_j17_cqlsh_tests - - j11_build - - j17_cqlsh_dtests_py38_vnode: - requires: - - start_j17_cqlsh_tests - - j11_build - - j17_cqlsh_dtests_py311_vnode: - requires: - - start_j17_cqlsh_tests - - j11_build - - start_j17_cqlsh_tests_offheap: - type: approval - - j17_cqlsh_dtests_py3_offheap: - requires: - - start_j17_cqlsh_tests_offheap - - j11_build - - j17_cqlsh_dtests_py38_offheap: - requires: - - start_j17_cqlsh_tests_offheap - - j11_build - - j17_cqlsh_dtests_py311_offheap: - requires: - - start_j17_cqlsh_tests_offheap - - j11_build - - start_j11_upgrade_dtests: - type: approval - - j11_upgrade_dtests: - requires: - - start_j11_upgrade_dtests - - j11_build - java11_pre-commit_tests: - jobs: - - start_pre-commit_tests: - type: approval - - j11_build: - requires: - - start_pre-commit_tests - - j11_unit_tests: - requires: - - j11_build - - j11_utests_oa: - requires: - - j11_build - - j11_simulator_dtests: - requires: - - j11_build - - j11_jvm_dtests: - requires: - - j11_build - - j11_jvm_dtests_vnode: - requires: - - j11_build - - j17_jvm_dtests: - requires: - - j11_build - - j17_jvm_dtests_vnode: - requires: - - j11_build - - j11_cqlshlib_tests: - requires: - - j11_build - - j11_cqlshlib_cython_tests: - requires: - - j11_build - - j17_cqlshlib_tests: - requires: - - j11_build - - j17_cqlshlib_cython_tests: - requires: - - j11_build - - j17_unit_tests: - requires: - - j11_build - - j17_utests_oa: - requires: - - j11_build - - start_utests_long: - type: approval - - j11_utests_long: - requires: - - start_utests_long - - j11_build - - j17_utests_long: - requires: - - start_utests_long - - j11_build - - start_utests_cdc: - type: approval - - j11_utests_cdc: - requires: - - start_utests_cdc - - j11_build - - j17_utests_cdc: - requires: - - start_utests_cdc - - j11_build - - start_utests_compression: - type: approval - - j11_utests_compression: - requires: - - start_utests_compression - - j11_build - - j17_utests_compression: - requires: - - start_utests_compression - - j11_build - - start_utests_trie: - type: approval - - j11_utests_trie: - requires: - - start_utests_trie - - j11_build - - j17_utests_trie: - requires: - - start_utests_trie - - j11_build - - start_utests_stress: - type: approval - - j11_utests_stress: - requires: - - start_utests_stress - - j11_build - - j17_utests_stress: - requires: - - start_utests_stress - - j11_build - - start_utests_fqltool: - type: approval - - j11_utests_fqltool: - requires: - - start_utests_fqltool - - j11_build - - j17_utests_fqltool: - requires: - - start_utests_fqltool - - j11_build - - start_utests_system_keyspace_directory: - type: approval - - j11_utests_system_keyspace_directory: - requires: - - j11_build - - j17_utests_system_keyspace_directory: - requires: - - start_utests_system_keyspace_directory - - j11_build - - start_jvm_upgrade_dtests: - type: approval - - j11_dtest_jars_build: - requires: - - j11_build - - start_jvm_upgrade_dtests - - j11_jvm_upgrade_dtests: - requires: - - j11_dtest_jars_build - - j11_dtests: - requires: - - j11_build - - j11_dtests_vnode: - requires: - - j11_build - - start_j11_dtests_offheap: - type: approval - - j11_dtests_offheap: - requires: - - start_j11_dtests_offheap - - j11_build - - j17_dtests: - requires: - - j11_build - - j17_dtests_vnode: - requires: - - j11_build - - start_j17_dtests_offheap: - type: approval - - j17_dtests_offheap: - requires: - - start_j17_dtests_offheap - - j11_build - - start_j11_dtests_large: - type: approval - - j11_dtests_large: - requires: - - start_j11_dtests_large - - j11_build - - j11_dtests_large_vnode: - requires: - - start_j11_dtests_large - - j11_build - - start_j17_dtests_large: - type: approval - - j17_dtests_large: - requires: - - start_j17_dtests_large - - j11_build - - j17_dtests_large_vnode: - requires: - - start_j17_dtests_large - - j11_build - - j11_cqlsh_dtests_py3: - requires: - - j11_build - - j11_cqlsh_dtests_py3_vnode: - requires: - - j11_build - - j11_cqlsh_dtests_py38: - requires: - - j11_build - - j11_cqlsh_dtests_py311: - requires: - - j11_build - - j11_cqlsh_dtests_py38_vnode: - requires: - - j11_build - - j11_cqlsh_dtests_py311_vnode: - requires: - - j11_build - - start_j11_cqlsh_dtests_offheap: - type: approval - - j11_cqlsh_dtests_py3_offheap: - requires: - - start_j11_cqlsh_dtests_offheap - - j11_build - - j11_cqlsh_dtests_py38_offheap: - requires: - - start_j11_cqlsh_dtests_offheap - - j11_build - - j11_cqlsh_dtests_py311_offheap: - requires: - - start_j11_cqlsh_dtests_offheap - - j11_build - - j17_cqlsh_dtests_py3: - requires: - - j11_build - - j17_cqlsh_dtests_py3_vnode: - requires: - - j11_build - - j17_cqlsh_dtests_py38: - requires: - - j11_build - - j17_cqlsh_dtests_py311: - requires: - - j11_build - - j17_cqlsh_dtests_py38_vnode: - requires: - - j11_build - - j17_cqlsh_dtests_py311_vnode: - requires: - - j11_build - - start_j17_cqlsh-dtests-offheap: - type: approval - - j17_cqlsh_dtests_py3_offheap: - requires: - - start_j17_cqlsh-dtests-offheap - - j11_build - - j17_cqlsh_dtests_py38_offheap: - requires: - - start_j17_cqlsh-dtests-offheap - - j11_build - - j17_cqlsh_dtests_py311_offheap: - requires: - - start_j17_cqlsh-dtests-offheap - - j11_build - - start_j11_upgrade_dtests: - type: approval - - j11_upgrade_dtests: - requires: - - j11_build - - start_j11_upgrade_dtests - java17_separate_tests: - jobs: - - start_j17_build: - type: approval - - j17_build: - requires: - - start_j17_build - - start_j17_unit_tests: - type: approval - - j17_unit_tests: - requires: - - start_j17_unit_tests - - j17_build - - start_j17_jvm_dtests: - type: approval - - j17_jvm_dtests: - requires: - - start_j17_jvm_dtests - - j17_build - - start_j17_jvm_dtests_vnode: - type: approval - - j17_jvm_dtests_vnode: - requires: - - start_j17_jvm_dtests_vnode - - j17_build - - start_j17_cqlshlib_tests: - type: approval - - j17_cqlshlib_tests: - requires: - - start_j17_cqlshlib_tests - - j17_build - - start_j17_cqlshlib_cython_tests: - type: approval - - j17_cqlshlib_cython_tests: - requires: - - start_j17_cqlshlib_cython_tests - - j17_build - - start_j17_dtests: - type: approval - - j17_dtests: - requires: - - start_j17_dtests - - j17_build - - start_j17_dtests_vnode: - type: approval - - j17_dtests_vnode: - requires: - - start_j17_dtests_vnode - - j17_build - - start_j17_dtests_offheap: - type: approval - - j17_dtests_offheap: - requires: - - start_j17_dtests_offheap - - j17_build - - start_j17_dtests_large: - type: approval - - j17_dtests_large: - requires: - - start_j17_dtests_large - - j17_build - - start_j17_dtests_large_vnode: - type: approval - - j17_dtests_large_vnode: - requires: - - start_j17_dtests_large_vnode - - j17_build - - start_j17_cqlsh_tests: - type: approval - - j17_cqlsh_dtests_py3: - requires: - - start_j17_cqlsh_tests - - j17_build - - j17_cqlsh_dtests_py3_vnode: - requires: - - start_j17_cqlsh_tests - - j17_build - - j17_cqlsh_dtests_py38: - requires: - - start_j17_cqlsh_tests - - j17_build - - j17_cqlsh_dtests_py311: - requires: - - start_j17_cqlsh_tests - - j17_build - - j17_cqlsh_dtests_py38_vnode: - requires: - - start_j17_cqlsh_tests - - j17_build - - j17_cqlsh_dtests_py311_vnode: - requires: - - start_j17_cqlsh_tests - - j17_build - - start_j17_cqlsh-dtests-offheap: - type: approval - - j17_cqlsh_dtests_py3_offheap: - requires: - - start_j17_cqlsh-dtests-offheap - - j17_build - - j17_cqlsh_dtests_py38_offheap: - requires: - - start_j17_cqlsh-dtests-offheap - - j17_build - - j17_cqlsh_dtests_py311_offheap: - requires: - - start_j17_cqlsh-dtests-offheap - - j17_build - - start_j17_utests_oa: - type: approval - - j17_utests_oa: - requires: - - start_j17_utests_oa - - j17_build - - start_j17_utests_long: - type: approval - - j17_utests_long: - requires: - - start_j17_utests_long - - j17_build - - start_j17_utests_cdc: - type: approval - - j17_utests_cdc: - requires: - - start_j17_utests_cdc - - j17_build - - start_j17_utests_compression: - type: approval - - j17_utests_compression: - requires: - - start_j17_utests_compression - - j17_build - - start_j17_utests_trie: - type: approval - - j17_utests_trie: - requires: - - start_j17_utests_trie - - j17_build - - start_j17_utests_stress: - type: approval - - j17_utests_stress: - requires: - - start_j17_utests_stress - - j17_build - - start_j17_utests_fqltool: - type: approval - - j17_utests_fqltool: - requires: - - start_j17_utests_fqltool - - j17_build - - start_j17_utests_system_keyspace_directory: - type: approval - - j17_utests_system_keyspace_directory: - requires: - - start_j17_utests_system_keyspace_directory - - j17_build - java17_pre-commit_tests: - jobs: - - start_pre-commit_tests: - type: approval - - j17_build: - requires: - - start_pre-commit_tests - - j17_unit_tests: - requires: - - j17_build - - j17_utests_oa: - requires: - - j17_build - - j17_jvm_dtests: - requires: - - j17_build - - j17_jvm_dtests_vnode: - requires: - - j17_build - - j17_cqlshlib_tests: - requires: - - j17_build - - j17_cqlshlib_cython_tests: - requires: - - j17_build - - j17_dtests: - requires: - - j17_build - - j17_dtests_vnode: - requires: - - j17_build - - start_j17_dtests_offheap: - type: approval - - j17_dtests_offheap: - requires: - - start_j17_dtests_offheap - - j17_build - - start_j17_dtests_large: - type: approval - - j17_dtests_large: - requires: - - start_j17_dtests_large - - j17_build - - j17_dtests_large_vnode: - requires: - - start_j17_dtests_large - - j17_build - - j17_cqlsh_dtests_py3: - requires: - - j17_build - - j17_cqlsh_dtests_py3_vnode: - requires: - - j17_build - - j17_cqlsh_dtests_py38: - requires: - - j17_build - - j17_cqlsh_dtests_py311: - requires: - - j17_build - - j17_cqlsh_dtests_py38_vnode: - requires: - - j17_build - - j17_cqlsh_dtests_py311_vnode: - requires: - - j17_build - - start_j17_cqlsh-dtests-offheap: - type: approval - - j17_cqlsh_dtests_py3_offheap: - requires: - - start_j17_cqlsh-dtests-offheap - - j17_build - - j17_cqlsh_dtests_py38_offheap: - requires: - - start_j17_cqlsh-dtests-offheap - - j17_build - - j17_cqlsh_dtests_py311_offheap: - requires: - - start_j17_cqlsh-dtests-offheap - - j17_build - - start_utests_long: - type: approval - - j17_utests_long: - requires: - - start_utests_long - - j17_build - - start_utests_cdc: - type: approval - - j17_utests_cdc: - requires: - - start_utests_cdc - - j17_build - - start_utests_compression: - type: approval - - j17_utests_compression: - requires: - - start_utests_compression - - j17_build - - start_utests_trie: - type: approval - - j17_utests_trie: - requires: - - start_utests_trie - - j17_build - - start_utests_stress: - type: approval - - j17_utests_stress: - requires: - - start_utests_stress - - j17_build - - start_utests_fqltool: - type: approval - - j17_utests_fqltool: - requires: - - start_utests_fqltool - - j17_build - - start_utests_system_keyspace_directory: - type: approval - - j17_utests_system_keyspace_directory: - requires: - - start_utests_system_keyspace_directory - - j17_build diff --git a/.circleci/config_11_and_17.yml.PAID b/.circleci/config_11_and_17.yml.PAID deleted file mode 100644 index b27b59eb74..0000000000 --- a/.circleci/config_11_and_17.yml.PAID +++ /dev/null @@ -1,10968 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -version: 2 -jobs: - j11_jvm_upgrade_dtests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_JVM_UPGRADE_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_JVM_UPGRADE_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_JVM_UPGRADE_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-jvm-dtest-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-jvm-dtest-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_dtests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 50 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_without_vnodes_raw /tmp/all_dtest_tests_j17_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_without_vnodes_raw > /tmp/all_dtest_tests_j17_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_without_vnodes > /tmp/split_dtest_tests_j17_without_vnodes.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes_final.txt\n" - - run: - name: Run dtests (j17_without_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j17_without_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j17_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_cqlshlib_cython_tests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run cqlshlib Unit Tests - command: | - export PATH=$JAVA_HOME/bin:$PATH - export cython="yes" - time mv ~/cassandra /tmp - cd /tmp/cassandra/ - ant jar -Dno-checkstyle=true -Drat.skip=true -Dant.gen-doc.skip=true -Djavadoc.skip=true - ./pylib/cassandra-cqlsh-tests.sh $(pwd) - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/pylib - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_cqlsh_dtests_py311_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 50 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_dtests_offheap_raw /tmp/all_dtest_tests_j17_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j17_dtests_offheap_raw > /tmp/all_dtest_tests_j17_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_dtests_offheap > /tmp/split_dtest_tests_j17_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j17_dtests_offheap) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt" - cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt - - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then - export CQLSH_PYTHON=/usr/bin/python3.11 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_jvm_dtests_vnode_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_JVM_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_JVM_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_JVM_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=true\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-jvm-dtest-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-jvm-dtest-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_utests_fqltool_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_FQLTOOL_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_FQLTOOL_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS_FQLTOOL} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=fqltool-test\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant fqltool-test $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_cqlshlib_cython_tests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run cqlshlib Unit Tests - command: | - export PATH=$JAVA_HOME/bin:$PATH - export cython="yes" - time mv ~/cassandra /tmp - cd /tmp/cassandra/ - ant jar -Dno-checkstyle=true -Drat.skip=true -Dant.gen-doc.skip=true -Djavadoc.skip=true - ./pylib/cassandra-cqlsh-tests.sh $(pwd) - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/pylib - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_cqlsh_dtests_py3_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 50 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_dtests_offheap_raw /tmp/all_dtest_tests_j17_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j17_dtests_offheap_raw > /tmp/all_dtest_tests_j17_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_dtests_offheap > /tmp/split_dtest_tests_j17_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j17_dtests_offheap) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt" - cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then - export CQLSH_PYTHON=/usr/bin/python3.6 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_utests_compression: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-compression) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-compression -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_cqlsh_dtests_py38_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 50 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_with_vnodes_raw /tmp/all_dtest_tests_j17_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_with_vnodes_raw > /tmp/all_dtest_tests_j17_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_with_vnodes > /tmp/split_dtest_tests_j17_with_vnodes.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes_final.txt\n" - - run: - name: Run dtests (j17_with_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt" - cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt - - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then - export CQLSH_PYTHON=/usr/bin/python3.8 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_dtests_vnode_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if true; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_dtests_offheap_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if true; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 --use-off-heap-memtables --skip-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_dtests_vnode_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if true; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_system_keyspace_directory: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-system-keyspace-directory) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-system-keyspace-directory -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_cqlsh_dtests_py3: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 50 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_without_vnodes_raw /tmp/all_dtest_tests_j17_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_without_vnodes_raw > /tmp/all_dtest_tests_j17_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_without_vnodes > /tmp/split_dtest_tests_j17_without_vnodes.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes_final.txt\n" - - run: - name: Run dtests (j17_without_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt" - cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then - export CQLSH_PYTHON=/usr/bin/python3.6 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_utests_stress_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_STRESS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_STRESS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS_STRESS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=stress-test-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant stress-test-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_unit_tests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_utests_system_keyspace_directory_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-system-keyspace-directory\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-system-keyspace-directory $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_cqlsh_dtests_py311: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 50 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_without_vnodes_raw /tmp/all_dtest_tests_j11_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_without_vnodes_raw > /tmp/all_dtest_tests_j11_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_without_vnodes > /tmp/split_dtest_tests_j11_without_vnodes.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\n" - - run: - name: Run dtests (j11_without_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt" - cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt - - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then - export CQLSH_PYTHON=/usr/bin/python3.11 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_dtests_large_vnode_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_LARGE_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_LARGE_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_LARGE_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_LARGE_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_LARGE_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_LARGE_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_LARGE_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if true; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 --only-resource-intensive-tests --force-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_dtests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if false; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_unit_tests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_cqlsh_dtests_py311: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 50 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_without_vnodes_raw /tmp/all_dtest_tests_j17_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_without_vnodes_raw > /tmp/all_dtest_tests_j17_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_without_vnodes > /tmp/split_dtest_tests_j17_without_vnodes.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes_final.txt\n" - - run: - name: Run dtests (j17_without_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt" - cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt - - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then - export CQLSH_PYTHON=/usr/bin/python3.11 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_cqlsh_dtests_py38: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 50 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_without_vnodes_raw /tmp/all_dtest_tests_j11_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_without_vnodes_raw > /tmp/all_dtest_tests_j11_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_without_vnodes > /tmp/split_dtest_tests_j11_without_vnodes.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\n" - - run: - name: Run dtests (j11_without_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt" - cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt - - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then - export CQLSH_PYTHON=/usr/bin/python3.8 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_utests_stress_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_STRESS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_STRESS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS_STRESS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=stress-test-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant stress-test-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_utests_compression_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-compression\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-compression $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_utests_oa: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-oa) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-oa -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_repeated_ant_test: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run repeated JUnit test - no_output_timeout: 15m - command: | - if [ "${REPEATED_ANT_TEST_CLASS}" == "" ]; then - echo "Repeated utest class name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_ANT_TEST_COUNT}" == "" ]; then - echo "Repeated utest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_ANT_TEST_COUNT}" -le 0 ]; then - echo "Repeated utest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_ANT_TEST_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_ANT_TEST_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_ANT_TEST_TARGET} ${REPEATED_ANT_TEST_CLASS} ${REPEATED_ANT_TEST_METHODS} ${REPEATED_ANT_TEST_COUNT} times" - - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - - target=${REPEATED_ANT_TEST_TARGET} - class_path=${REPEATED_ANT_TEST_CLASS} - class_name="${class_path##*.}" - - # Prepare the -Dtest.name argument. - # It can be the fully qualified class name or the short class name, depending on the target. - if [[ $target == "test" || \ - $target == "test-cdc" || \ - $target == "test-compression" || \ - $target == "test-trie" || \ - $target == "test-oa" || \ - $target == "test-system-keyspace-directory" || \ - $target == "fqltool-test" || \ - $target == "long-test" || \ - $target == "stress-test" || \ - $target == "test-simulator-dtest" ]]; then - name="-Dtest.name=$class_name" - else - name="-Dtest.name=$class_path" - fi - - # Prepare the -Dtest.methods argument, which is optional - if [ "${REPEATED_ANT_TEST_METHODS}" == "" ]; then - methods="" - else - methods="-Dtest.methods=${REPEATED_ANT_TEST_METHODS}" - fi - - # Prepare the JVM dtests vnodes argument, which is optional - vnodes_args="" - if ${REPEATED_ANT_TEST_VNODES}; then - vnodes_args="-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'" - fi - - # Run the test target as many times as requested collecting the exit code, - # stopping the iteration only if stop_on_failure is set. - exit_code="$?" - for i in $(seq -w 1 $count); do - - echo "Running test iteration $i of $count" - - # run the test - status="passes" - if !( set -o pipefail && ant $target $name $methods $vnodes_args -Dno-build-test=true | tee stdout.txt ); then - status="fails" - exit_code=1 - fi - - # move the stdout output file - dest=/tmp/results/repeated_utest/stdout/${status}/${i} - mkdir -p $dest - mv stdout.txt $dest/${REPEATED_ANT_TEST_TARGET}-${REPEATED_ANT_TEST_CLASS}.txt - - # move the XML output files - source=build/test/output - dest=/tmp/results/repeated_utest/output/${status}/${i} - mkdir -p $dest - if [[ -d $source && -n "$(ls $source)" ]]; then - mv $source/* $dest/ - fi - - # move the log files - source=build/test/logs - dest=/tmp/results/repeated_utest/logs/${status}/${i} - mkdir -p $dest - if [[ -d $source && -n "$(ls $source)" ]]; then - mv $source/* $dest/ - fi - - # maybe stop iterations on test failure - if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then - break - fi - done - - (exit ${exit_code}) - fi - fi - - store_test_results: - path: /tmp/results/repeated_utest/output - - store_artifacts: - path: /tmp/results/repeated_utest/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utest/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utest/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_dtests_large_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: xlarge - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_large_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_large_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --only-resource-intensive-tests --force-resource-intensive-tests --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_large_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_large_with_vnodes_raw /tmp/all_dtest_tests_j11_large_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_large_with_vnodes_raw > /tmp/all_dtest_tests_j11_large_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_large_with_vnodes > /tmp/split_dtest_tests_j11_large_with_vnodes.txt\ncat /tmp/split_dtest_tests_j11_large_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_large_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_large_with_vnodes_final.txt\n" - - run: - name: Run dtests (j11_large_with_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j11_large_with_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j11_large_with_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_large_with_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --only-resource-intensive-tests --force-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j11_large_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_large_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_large_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_dtests_large_vnode_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_LARGE_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_LARGE_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_LARGE_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_LARGE_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_LARGE_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_LARGE_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_LARGE_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if true; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 --only-resource-intensive-tests --force-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_utests_trie: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-trie) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-trie -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_cqlsh_dtests_py38_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 50 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_dtests_offheap_raw /tmp/all_dtest_tests_j11_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j11_dtests_offheap_raw > /tmp/all_dtest_tests_j11_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_dtests_offheap > /tmp/split_dtest_tests_j11_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j11_dtests_offheap) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt" - cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt - - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then - export CQLSH_PYTHON=/usr/bin/python3.8 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_dtests_large: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: xlarge - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_large_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_large_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --only-resource-intensive-tests --force-resource-intensive-tests --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_large_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_large_without_vnodes_raw /tmp/all_dtest_tests_j11_large_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_large_without_vnodes_raw > /tmp/all_dtest_tests_j11_large_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_large_without_vnodes > /tmp/split_dtest_tests_j11_large_without_vnodes.txt\ncat /tmp/split_dtest_tests_j11_large_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_large_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_large_without_vnodes_final.txt\n" - - run: - name: Run dtests (j11_large_without_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j11_large_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j11_large_without_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_large_without_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --only-resource-intensive-tests --force-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j11_large_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_large_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_large_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_system_keyspace_directory_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-system-keyspace-directory\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-system-keyspace-directory $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_oa: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-oa) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-oa -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_upgrade_dtests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: xlarge - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_UPGRADE_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_UPGRADE_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_UPGRADE_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_UPGRADE_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_UPGRADE_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_UPGRADE_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_UPGRADE_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if false; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if true; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_jvm_dtests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 10 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine distributed Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/distributed/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/distributed/;;g" | grep "Test\.java$" | grep -v upgrade > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.distributed.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=distributed -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_repeated_ant_test: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run repeated JUnit test - no_output_timeout: 15m - command: | - if [ "${REPEATED_ANT_TEST_CLASS}" == "" ]; then - echo "Repeated utest class name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_ANT_TEST_COUNT}" == "" ]; then - echo "Repeated utest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_ANT_TEST_COUNT}" -le 0 ]; then - echo "Repeated utest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_ANT_TEST_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_ANT_TEST_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_ANT_TEST_TARGET} ${REPEATED_ANT_TEST_CLASS} ${REPEATED_ANT_TEST_METHODS} ${REPEATED_ANT_TEST_COUNT} times" - - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - - target=${REPEATED_ANT_TEST_TARGET} - class_path=${REPEATED_ANT_TEST_CLASS} - class_name="${class_path##*.}" - - # Prepare the -Dtest.name argument. - # It can be the fully qualified class name or the short class name, depending on the target. - if [[ $target == "test" || \ - $target == "test-cdc" || \ - $target == "test-compression" || \ - $target == "test-trie" || \ - $target == "test-oa" || \ - $target == "test-system-keyspace-directory" || \ - $target == "fqltool-test" || \ - $target == "long-test" || \ - $target == "stress-test" || \ - $target == "test-simulator-dtest" ]]; then - name="-Dtest.name=$class_name" - else - name="-Dtest.name=$class_path" - fi - - # Prepare the -Dtest.methods argument, which is optional - if [ "${REPEATED_ANT_TEST_METHODS}" == "" ]; then - methods="" - else - methods="-Dtest.methods=${REPEATED_ANT_TEST_METHODS}" - fi - - # Prepare the JVM dtests vnodes argument, which is optional - vnodes_args="" - if ${REPEATED_ANT_TEST_VNODES}; then - vnodes_args="-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'" - fi - - # Run the test target as many times as requested collecting the exit code, - # stopping the iteration only if stop_on_failure is set. - exit_code="$?" - for i in $(seq -w 1 $count); do - - echo "Running test iteration $i of $count" - - # run the test - status="passes" - if !( set -o pipefail && ant $target $name $methods $vnodes_args -Dno-build-test=true | tee stdout.txt ); then - status="fails" - exit_code=1 - fi - - # move the stdout output file - dest=/tmp/results/repeated_utest/stdout/${status}/${i} - mkdir -p $dest - mv stdout.txt $dest/${REPEATED_ANT_TEST_TARGET}-${REPEATED_ANT_TEST_CLASS}.txt - - # move the XML output files - source=build/test/output - dest=/tmp/results/repeated_utest/output/${status}/${i} - mkdir -p $dest - if [[ -d $source && -n "$(ls $source)" ]]; then - mv $source/* $dest/ - fi - - # move the log files - source=build/test/logs - dest=/tmp/results/repeated_utest/logs/${status}/${i} - mkdir -p $dest - if [[ -d $source && -n "$(ls $source)" ]]; then - mv $source/* $dest/ - fi - - # maybe stop iterations on test failure - if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then - break - fi - done - - (exit ${exit_code}) - fi - fi - - store_test_results: - path: /tmp/results/repeated_utest/output - - store_artifacts: - path: /tmp/results/repeated_utest/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utest/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utest/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_cqlsh_dtests_py3: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 50 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_without_vnodes_raw /tmp/all_dtest_tests_j11_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_without_vnodes_raw > /tmp/all_dtest_tests_j11_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_without_vnodes > /tmp/split_dtest_tests_j11_without_vnodes.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\n" - - run: - name: Run dtests (j11_without_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt" - cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then - export CQLSH_PYTHON=/usr/bin/python3.6 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_build: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Clone Cassandra Repository (via git) - command: | - git clone --single-branch --depth 1 --branch $CIRCLE_BRANCH https://github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME.git ~/cassandra - - run: - name: Build Cassandra - command: | - export PATH=$JAVA_HOME/bin:$PATH - cd ~/cassandra - # Loop to prevent failure due to maven-ant-tasks not downloading a jar.. - for x in $(seq 1 3); do - ${ANT_HOME}/bin/ant clean realclean jar - RETURN="$?" - if [ "${RETURN}" -eq "0" ]; then - break - fi - done - # Exit, if we didn't build successfully - if [ "${RETURN}" -ne "0" ]; then - echo "Build failed with exit code: ${RETURN}" - exit ${RETURN} - fi - no_output_timeout: 15m - - run: - name: Run static code analysis - command: | - export PATH=$JAVA_HOME/bin:$PATH - cd ~/cassandra - ant check - - persist_to_workspace: - root: /home/cassandra - paths: - - cassandra - - .m2 - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_utests_cdc: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-cdc) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-cdc -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_utests_cdc_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-cdc\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-cdc $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_utests_fqltool: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run Unit Tests (fqltool-test) - command: | - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant fqltool-test -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_dtests_offheap_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if true; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 --use-off-heap-memtables --skip-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_jvm_dtests_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 10 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine distributed Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/distributed/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/distributed/;;g" | grep "Test\.java$" | grep -v upgrade > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.distributed.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist -Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16' -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=distributed -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_dtest_jars_build: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Build Cassandra DTest jars - command: | - export PATH=$JAVA_HOME/bin:$PATH - cd ~/cassandra - mkdir ~/dtest_jars - git remote add apache https://github.com/apache/cassandra.git - for branch in cassandra-4.0 cassandra-4.1 trunk; do - # check out the correct cassandra version: - git remote set-branches --add apache '$branch' - git fetch --depth 1 apache $branch - git checkout $branch - git clean -fd - # Loop to prevent failure due to maven-ant-tasks not downloading a jar.. - for x in $(seq 1 3); do - ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar -Dno-checkstyle=true -Drat.skip=true - RETURN="$?" - if [ "${RETURN}" -eq "0" ]; then - cp build/dtest*.jar ~/dtest_jars - break - fi - done - # Exit, if we didn't build successfully - if [ "${RETURN}" -ne "0" ]; then - echo "Build failed with exit code: ${RETURN}" - exit ${RETURN} - fi - done - # and build the dtest-jar for the branch under test - ${ANT_HOME}/bin/ant realclean - git checkout origin/$CIRCLE_BRANCH - git clean -fd - for x in $(seq 1 3); do - ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar -Dno-checkstyle=true -Drat.skip=true - RETURN="$?" - if [ "${RETURN}" -eq "0" ]; then - cp build/dtest*.jar ~/dtest_jars - break - fi - done - # Exit, if we didn't build successfully - if [ "${RETURN}" -ne "0" ]; then - echo "Build failed with exit code: ${RETURN}" - exit ${RETURN} - fi - ls -l ~/dtest_jars - no_output_timeout: 15m - - persist_to_workspace: - root: /home/cassandra - paths: - - dtest_jars - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_long: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run Unit Tests (long-test) - command: | - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant long-test -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_unit_tests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=testsome\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant testsome $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_simulator_dtests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Simulator Tests - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant test-simulator-dtest -Dno-build-test=true - no_output_timeout: 30m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_jvm_upgrade_dtests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: xlarge - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine distributed Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/distributed/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/distributed/;;g" | grep "Test\.java$" | grep upgrade > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.distributed.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=distributed -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_stress: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run Unit Tests (stress-test) - command: | - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant stress-test -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_cdc_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-cdc\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-cdc $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_dtests_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 50 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_with_vnodes_raw /tmp/all_dtest_tests_j17_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_with_vnodes_raw > /tmp/all_dtest_tests_j17_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_with_vnodes > /tmp/split_dtest_tests_j17_with_vnodes.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes_final.txt\n" - - run: - name: Run dtests (j17_with_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j17_with_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j17_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_dtests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if false; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_compression: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-compression) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-compression -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_utests_trie_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-trie\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-trie $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_cqlsh_dtests_py3_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 50 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_dtests_offheap_raw /tmp/all_dtest_tests_j11_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j11_dtests_offheap_raw > /tmp/all_dtest_tests_j11_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_dtests_offheap > /tmp/split_dtest_tests_j11_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j11_dtests_offheap) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt" - cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then - export CQLSH_PYTHON=/usr/bin/python3.6 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_cqlsh_dtests_py311_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 50 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_dtests_offheap_raw /tmp/all_dtest_tests_j11_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j11_dtests_offheap_raw > /tmp/all_dtest_tests_j11_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_dtests_offheap > /tmp/split_dtest_tests_j11_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j11_dtests_offheap) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt" - cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt - - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then - export CQLSH_PYTHON=/usr/bin/python3.11 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_trie: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-trie) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-trie -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_upgrade_dtests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 100 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_upgradetests_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_upgradetests_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --execute-upgrade-tests-only --upgrade-target-version-only --upgrade-version-selection all --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_upgradetests_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_upgradetests_without_vnodes_raw /tmp/all_dtest_tests_j11_upgradetests_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_upgradetests_without_vnodes_raw > /tmp/all_dtest_tests_j11_upgradetests_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_upgradetests_without_vnodes > /tmp/split_dtest_tests_j11_upgradetests_without_vnodes.txt\ncat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt\n" - - run: - name: Run dtests (j11_upgradetests_without_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_upgradetests_without_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --execute-upgrade-tests-only --upgrade-target-version-only --upgrade-version-selection all --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j11_upgradetests_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_upgradetests_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_upgradetests_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_dtests_large_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_LARGE_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_LARGE_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_LARGE_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_LARGE_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_LARGE_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_LARGE_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_LARGE_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if false; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 --only-resource-intensive-tests --force-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_utests_compression_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-compression\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-compression $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_cqlsh_dtests_py3_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 50 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_with_vnodes_raw /tmp/all_dtest_tests_j11_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_with_vnodes_raw > /tmp/all_dtest_tests_j11_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_with_vnodes > /tmp/split_dtest_tests_j11_with_vnodes.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n" - - run: - name: Run dtests (j11_with_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt" - cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then - export CQLSH_PYTHON=/usr/bin/python3.6 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_utests_fqltool: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run Unit Tests (fqltool-test) - command: | - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant fqltool-test -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_dtests_large_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: xlarge - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_large_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_large_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --only-resource-intensive-tests --force-resource-intensive-tests --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_large_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_large_with_vnodes_raw /tmp/all_dtest_tests_j17_large_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_large_with_vnodes_raw > /tmp/all_dtest_tests_j17_large_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_large_with_vnodes > /tmp/split_dtest_tests_j17_large_with_vnodes.txt\ncat /tmp/split_dtest_tests_j17_large_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_large_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_large_with_vnodes_final.txt\n" - - run: - name: Run dtests (j17_large_with_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j17_large_with_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j17_large_with_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_large_with_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --only-resource-intensive-tests --force-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j17_large_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_large_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_large_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_dtests_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 50 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_dtests_offheap_raw /tmp/all_dtest_tests_j11_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j11_dtests_offheap_raw > /tmp/all_dtest_tests_j11_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_dtests_offheap > /tmp/split_dtest_tests_j11_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j11_dtests_offheap) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\"\ncat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_dtests_offheap_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j11_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_cqlsh_dtests_py38_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 50 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_with_vnodes_raw /tmp/all_dtest_tests_j11_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_with_vnodes_raw > /tmp/all_dtest_tests_j11_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_with_vnodes > /tmp/split_dtest_tests_j11_with_vnodes.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n" - - run: - name: Run dtests (j11_with_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt" - cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt - - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then - export CQLSH_PYTHON=/usr/bin/python3.8 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_trie_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-trie\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-trie $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_simulator_dtests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_SIMULATOR_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_SIMULATOR_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_SIMULATOR_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-simulator-dtest\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-simulator-dtest $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_jvm_dtests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_JVM_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_JVM_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_JVM_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-jvm-dtest-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-jvm-dtest-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_cqlsh_dtests_py38_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 50 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_dtests_offheap_raw /tmp/all_dtest_tests_j17_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j17_dtests_offheap_raw > /tmp/all_dtest_tests_j17_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_dtests_offheap > /tmp/split_dtest_tests_j17_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j17_dtests_offheap) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt" - cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt - - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then - export CQLSH_PYTHON=/usr/bin/python3.8 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_cqlshlib_tests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run cqlshlib Unit Tests - command: | - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra/ - ant jar -Dno-checkstyle=true -Drat.skip=true -Dant.gen-doc.skip=true -Djavadoc.skip=true - ./pylib/cassandra-cqlsh-tests.sh $(pwd) - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/pylib - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_cqlsh_dtests_py311_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 50 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_with_vnodes_raw /tmp/all_dtest_tests_j11_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_with_vnodes_raw > /tmp/all_dtest_tests_j11_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_with_vnodes > /tmp/split_dtest_tests_j11_with_vnodes.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n" - - run: - name: Run dtests (j11_with_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt" - cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt - - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then - export CQLSH_PYTHON=/usr/bin/python3.11 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j11_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_utests_system_keyspace_directory: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-system-keyspace-directory) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-system-keyspace-directory -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_cqlsh_dtests_py3_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 50 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_with_vnodes_raw /tmp/all_dtest_tests_j17_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_with_vnodes_raw > /tmp/all_dtest_tests_j17_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_with_vnodes > /tmp/split_dtest_tests_j17_with_vnodes.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes_final.txt\n" - - run: - name: Run dtests (j17_with_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt" - cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.6' ]; then - export CQLSH_PYTHON=/usr/bin/python3.6 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_cqlsh_dtests_py311_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 50 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.11/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_with_vnodes_raw /tmp/all_dtest_tests_j17_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_with_vnodes_raw > /tmp/all_dtest_tests_j17_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_with_vnodes > /tmp/split_dtest_tests_j17_with_vnodes.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_with_vnodes_final.txt\n" - - run: - name: Run dtests (j17_with_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt" - cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt - - source ~/env3.11/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.11' ]; then - export CQLSH_PYTHON=/usr/bin/python3.11 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_with_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_jvm_dtests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 10 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine distributed Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/distributed/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/distributed/;;g" | grep "Test\.java$" | grep -v upgrade > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.distributed.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=distributed -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_utests_stress: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run Unit Tests (stress-test) - command: | - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant stress-test -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_jvm_dtests_vnode_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_JVM_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_JVM_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_JVM_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=true\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-jvm-dtest-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-jvm-dtest-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_build: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Clone Cassandra Repository (via git) - command: | - git clone --single-branch --depth 1 --branch $CIRCLE_BRANCH https://github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME.git ~/cassandra - - run: - name: Build Cassandra - command: | - export PATH=$JAVA_HOME/bin:$PATH - cd ~/cassandra - # Loop to prevent failure due to maven-ant-tasks not downloading a jar.. - for x in $(seq 1 3); do - ${ANT_HOME}/bin/ant clean realclean jar - RETURN="$?" - if [ "${RETURN}" -eq "0" ]; then - break - fi - done - # Exit, if we didn't build successfully - if [ "${RETURN}" -ne "0" ]; then - echo "Build failed with exit code: ${RETURN}" - exit ${RETURN} - fi - no_output_timeout: 15m - - run: - name: Run static code analysis - command: | - export PATH=$JAVA_HOME/bin:$PATH - cd ~/cassandra - ant check - - persist_to_workspace: - root: /home/cassandra - paths: - - cassandra - - .m2 - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_utests_oa_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-oa\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-oa $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_cqlshlib_tests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run cqlshlib Unit Tests - command: | - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra/ - ant jar -Dno-checkstyle=true -Drat.skip=true -Dant.gen-doc.skip=true -Djavadoc.skip=true - ./pylib/cassandra-cqlsh-tests.sh $(pwd) - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/pylib - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j11_dtests: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 50 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_without_vnodes_raw /tmp/all_dtest_tests_j11_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_without_vnodes_raw > /tmp/all_dtest_tests_j11_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_without_vnodes > /tmp/split_dtest_tests_j11_without_vnodes.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\n" - - run: - name: Run dtests (j11_without_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j11_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_jvm_dtests_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 10 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine distributed Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/distributed/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/distributed/;;g" | grep "Test\.java$" | grep -v upgrade > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.distributed.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist -Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16' -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=distributed -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_cqlsh_dtests_py38: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 50 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.8/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --skip-resource-intensive-tests --pytest-options '-k cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_without_vnodes_raw /tmp/all_dtest_tests_j17_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_without_vnodes_raw > /tmp/all_dtest_tests_j17_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_without_vnodes > /tmp/split_dtest_tests_j17_without_vnodes.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_without_vnodes_final.txt\n" - - run: - name: Run dtests (j17_without_vnodes) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt" - cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt - - source ~/env3.8/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n 'CQLSH_PYTHON=/usr/bin/python3.8' ]; then - export CQLSH_PYTHON=/usr/bin/python3.8 - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_without_vnodes_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_j17_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_utests_cdc: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Determine unit Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/unit/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/unit/;;g" | grep "Test\.java$" > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - no_output_timeout: 15m - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Run Unit Tests (testclasslist-cdc) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.unit.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant testclasslist-cdc -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=unit -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_utests_fqltool_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_FQLTOOL_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_FQLTOOL_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS_FQLTOOL} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=fqltool-test\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant fqltool-test $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_dtests_large: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: xlarge - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 4 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_large_without_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_large_without_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --only-resource-intensive-tests --force-resource-intensive-tests --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_large_without_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_large_without_vnodes_raw /tmp/all_dtest_tests_j17_large_without_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j17_large_without_vnodes_raw > /tmp/all_dtest_tests_j17_large_without_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_large_without_vnodes > /tmp/split_dtest_tests_j17_large_without_vnodes.txt\ncat /tmp/split_dtest_tests_j17_large_without_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_large_without_vnodes_final.txt\ncat /tmp/split_dtest_tests_j17_large_without_vnodes_final.txt\n" - - run: - name: Run dtests (j17_large_without_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j17_large_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j17_large_without_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_large_without_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --only-resource-intensive-tests --force-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j17_large_without_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_large_without_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_large_without_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_unit_tests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=testsome\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant testsome $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_utests_long: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Run Unit Tests (long-test) - command: | - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant long-test -Dno-build-test=true - no_output_timeout: 15m - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_utests_oa_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-oa\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-oa $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_dtests_vnode: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 50 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j11_with_vnodes) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j11_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j11_with_vnodes_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_with_vnodes_raw /tmp/all_dtest_tests_j11_with_vnodes\nelse\n grep -e '' /tmp/all_dtest_tests_j11_with_vnodes_raw > /tmp/all_dtest_tests_j11_with_vnodes || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j11_with_vnodes > /tmp/split_dtest_tests_j11_with_vnodes.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_with_vnodes_final.txt\ncat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n" - - run: - name: Run dtests (j11_with_vnodes) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j11_with_vnodes.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j11_with_vnodes - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j11_with_vnodes_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true - j17_jvm_dtests_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_JVM_DTESTS_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_JVM_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_JVM_DTESTS} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=test-jvm-dtest-some\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant test-jvm-dtest-some $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_dtests_offheap: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 50 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Determine Tests to Run (j17_dtests_offheap) - no_output_timeout: 5m - command: "# reminder: this code (along with all the steps) is independently executed on every circle container\n# so the goal here is to get the circleci script to return the tests *this* container will run\n# which we do via the `circleci` cli tool.\n\ncd cassandra-dtest\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\necho \"***Collected DTests (j17_dtests_offheap)***\"\nset -eo pipefail && ./run_dtests.py --use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k not cql' --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_j17_dtests_offheap_raw --cassandra-dir=../cassandra\nif [ -z '' ]; then\n mv /tmp/all_dtest_tests_j17_dtests_offheap_raw /tmp/all_dtest_tests_j17_dtests_offheap\nelse\n grep -e '' /tmp/all_dtest_tests_j17_dtests_offheap_raw > /tmp/all_dtest_tests_j17_dtests_offheap || { echo \"Filter did not match any tests! Exiting build.\"; exit 0; }\nfi\nset -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_j17_dtests_offheap > /tmp/split_dtest_tests_j17_dtests_offheap.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\ncat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\n" - - run: - name: Run dtests (j17_dtests_offheap) - no_output_timeout: 15m - command: "echo \"cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\"\ncat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt\n\nsource ~/env3.6/bin/activate\nexport PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\njava -version\ncd ~/cassandra-dtest\nmkdir -p /tmp/dtest\n\necho \"env: $(env)\"\necho \"** done env\"\nmkdir -p /tmp/results/dtests\n# 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\nexport SPLIT_TESTS=`cat /tmp/split_dtest_tests_j17_dtests_offheap_final.txt`\nif [ ! -z \"$SPLIT_TESTS\" ]; then\n set -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests --log-level=\"DEBUG\" --junit-xml=/tmp/results/dtests/pytest_result_j17_dtests_offheap.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt\nelse\n echo \"Tune your parallelism, there are more containers than test classes. Nothing to do in this container\"\n (exit 1)\nfi\n" - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_j17_dtests_offheap - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_j17_dtests_offheap_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_dtests_large_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: large - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "${REPEATED_LARGE_DTESTS}" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "${REPEATED_LARGE_DTESTS_COUNT}" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "${REPEATED_LARGE_DTESTS_COUNT}" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((${REPEATED_LARGE_DTESTS_COUNT} / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (${REPEATED_LARGE_DTESTS_COUNT} % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running ${REPEATED_LARGE_DTESTS} $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo ${REPEATED_LARGE_DTESTS} | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if ${REPEATED_TESTS_STOP_ON_FAILURE}; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if false; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if false; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 --only-resource-intensive-tests --force-resource-intensive-tests $tests_arg | tee /tmp/dtest/stdout.txt - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j17_utests_long_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_LONG_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_LONG_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS_LONG} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=long-testsome\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant long-testsome $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - j11_utests_long_repeat: - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: medium - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - parallelism: 25 - steps: - - attach_workspace: - at: /home/cassandra - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: "set -x\nexport PATH=$JAVA_HOME/bin:$PATH\ntime mv ~/cassandra /tmp\ncd /tmp/cassandra\nif [ -d ~/dtest_jars ]; then\n cp ~/dtest_jars/dtest* /tmp/cassandra/build/\nfi\n\n# Calculate the number of test iterations to be run by the current parallel runner.\ncount=$((${REPEATED_UTESTS_LONG_COUNT} / CIRCLE_NODE_TOTAL))\nif (($CIRCLE_NODE_INDEX < (${REPEATED_UTESTS_LONG_COUNT} % CIRCLE_NODE_TOTAL))); then\n count=$((count+1))\nfi\n\n# Put manually specified tests and automatically detected tests together, removing duplicates\ntests=$(echo ${REPEATED_UTESTS_LONG} | sed -e \"s///\" | sed -e \"s/ //\" | tr \",\" \"\\n\" | tr \" \" \"\\n\" | sort -n | uniq -u)\necho \"Tests to be repeated: ${tests}\"\n\n# Prepare the JVM dtests vnodes argument, which is optional.\nvnodes=false\nvnodes_args=\"\"\nif [ \"$vnodes\" = true ] ; then\n vnodes_args=\"-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'\"\nfi\n\n# Prepare the testtag for the target, used by the test macro in build.xml to group the output files\ntarget=long-testsome\ntesttag=\"\"\nif [[ $target == \"test-cdc\" ]]; then\n testtag=\"cdc\"\nelif [[ $target == \"test-compression\" ]]; then\n testtag=\"compression\"\nelif [[ $target == \"test-system-keyspace-directory\" ]]; then\n testtag=\"system_keyspace_directory\"\nelif [[ $target == \"test-trie\" ]]; then\n testtag=\"trie\"\nelif [[ $target == \"test-oa\" ]]; then\n testtag=\"oa\"\nfi\n\n# Run each test class as many times as requested.\nexit_code=\"$?\"\nfor test in $tests; do\n\n # Split class and method names from the test name\n if [[ $test =~ \"#\" ]]; then\n class=${test%\"#\"*}\n method=${test#*\"#\"}\n else\n class=$test\n method=\"\"\n fi\n\n # Prepare the -Dtest.name argument.\n # It can be the fully qualified class name or the short class name, depending on the target.\n if [[ $target == \"test\" || \\\n $target == \"test-cdc\" || \\\n $target == \"test-compression\" || \\\n $target == \"test-trie\" || \\\n $target == \"test-oa\" || \\\n $target == \"test-system-keyspace-directory\" || \\\n $target == \"fqltool-test\" || \\\n $target == \"long-test\" || \\\n $target == \"stress-test\" || \\\n $target == \"test-simulator-dtest\" ]]; then\n name_arg=\"-Dtest.name=${class##*.}\"\n else\n name_arg=\"-Dtest.name=$class\"\n fi\n\n # Prepare the -Dtest.methods argument, which is optional\n if [[ $method == \"\" ]]; then\n methods_arg=\"\"\n else\n methods_arg=\"-Dtest.methods=$method\"\n fi\n\n for i in $(seq -w 1 $count); do\n echo \"Running test $test, iteration $i of $count\"\n\n # run the test\n status=\"passes\"\n if !( set -o pipefail && \\\n ant long-testsome $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \\\n tee stdout.txt \\\n ); then\n status=\"fails\"\n exit_code=1\n fi\n\n # move the stdout output file\n dest=/tmp/results/repeated_utests/stdout/${status}/${i}\n mkdir -p $dest\n mv stdout.txt $dest/${test}.txt\n\n # move the XML output files\n source=build/test/output/${testtag}\n dest=/tmp/results/repeated_utests/output/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n\n # move the log files\n source=build/test/logs/${testtag}\n dest=/tmp/results/repeated_utests/logs/${status}/${i}\n mkdir -p $dest\n if [[ -d $source && -n \"$(ls $source)\" ]]; then\n mv $source/* $dest/\n fi\n \n # maybe stop iterations on test failure\n if [[ ${REPEATED_TESTS_STOP_ON_FAILURE} = true ]] && (( $exit_code > 0 )); then\n break\n fi\n done\ndone\n(exit ${exit_code})\n" - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - environment: - - ANT_HOME: /usr/share/ant - - LANG: en_US.UTF-8 - - KEEP_TEST_DIR: true - - DEFAULT_DIR: /home/cassandra/cassandra-dtest - - PYTHONIOENCODING: utf-8 - - PYTHONUNBUFFERED: true - - CASS_DRIVER_NO_EXTENSIONS: true - - CASS_DRIVER_NO_CYTHON: true - - CASSANDRA_SKIP_SYNC: true - - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - - DTEST_BRANCH: trunk - - CCM_MAX_HEAP_SIZE: 1024M - - CCM_HEAP_NEWSIZE: 256M - - REPEATED_TESTS_STOP_ON_FAILURE: false - - REPEATED_UTESTS: null - - REPEATED_UTESTS_COUNT: 500 - - REPEATED_UTESTS_FQLTOOL: null - - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - REPEATED_UTESTS_LONG: null - - REPEATED_UTESTS_LONG_COUNT: 100 - - REPEATED_UTESTS_STRESS: null - - REPEATED_UTESTS_STRESS_COUNT: 500 - - REPEATED_SIMULATOR_DTESTS: null - - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - REPEATED_JVM_DTESTS: null - - REPEATED_JVM_DTESTS_COUNT: 500 - - REPEATED_JVM_UPGRADE_DTESTS: null - - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - REPEATED_DTESTS: null - - REPEATED_DTESTS_COUNT: 500 - - REPEATED_LARGE_DTESTS: null - - REPEATED_LARGE_DTESTS_COUNT: 100 - - REPEATED_UPGRADE_DTESTS: null - - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - REPEATED_ANT_TEST_TARGET: testsome - - REPEATED_ANT_TEST_CLASS: null - - REPEATED_ANT_TEST_METHODS: null - - REPEATED_ANT_TEST_VNODES: false - - REPEATED_ANT_TEST_COUNT: 500 - - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - - CASSANDRA_USE_JDK11: true -workflows: - version: 2 - java11_separate_tests: - jobs: - - start_j11_build: - type: approval - - j11_build: - requires: - - start_j11_build - - start_j11_unit_tests: - type: approval - - j11_unit_tests: - requires: - - start_j11_unit_tests - - j11_build - - start_j11_jvm_dtests: - type: approval - - j11_jvm_dtests: - requires: - - start_j11_jvm_dtests - - j11_build - - start_j11_jvm_dtests_vnode: - type: approval - - j11_jvm_dtests_vnode: - requires: - - start_j11_jvm_dtests_vnode - - j11_build - - start_j17_jvm_dtests: - type: approval - - j17_jvm_dtests: - requires: - - start_j17_jvm_dtests - - j11_build - - start_j17_jvm_dtests_vnode: - type: approval - - j17_jvm_dtests_vnode: - requires: - - start_j17_jvm_dtests_vnode - - j11_build - - start_j11_simulator_dtests: - type: approval - - j11_simulator_dtests: - requires: - - start_j11_simulator_dtests - - j11_build - - start_j11_cqlshlib_tests: - type: approval - - j11_cqlshlib_tests: - requires: - - start_j11_cqlshlib_tests - - j11_build - - start_j11_cqlshlib_cython_tests: - type: approval - - j11_cqlshlib_cython_tests: - requires: - - start_j11_cqlshlib_cython_tests - - j11_build - - start_j17_cqlshlib_tests: - type: approval - - j17_cqlshlib_tests: - requires: - - start_j17_cqlshlib_tests - - j11_build - - start_j17_cqlshlib_cython_tests: - type: approval - - j17_cqlshlib_cython_tests: - requires: - - start_j17_cqlshlib_cython_tests - - j11_build - - start_j17_unit_tests: - type: approval - - j17_unit_tests: - requires: - - start_j17_unit_tests - - j11_build - - start_j11_utests_oa: - type: approval - - j11_utests_oa: - requires: - - start_j11_utests_oa - - j11_build - - start_j17_utests_oa: - type: approval - - j17_utests_oa: - requires: - - start_j17_utests_oa - - j11_build - - start_j11_utests_long: - type: approval - - j11_utests_long: - requires: - - start_j11_utests_long - - j11_build - - start_j17_utests_long: - type: approval - - j17_utests_long: - requires: - - start_j17_utests_long - - j11_build - - start_j11_utests_cdc: - type: approval - - j11_utests_cdc: - requires: - - start_j11_utests_cdc - - j11_build - - start_j17_utests_cdc: - type: approval - - j17_utests_cdc: - requires: - - start_j17_utests_cdc - - j11_build - - start_j11_utests_compression: - type: approval - - j11_utests_compression: - requires: - - start_j11_utests_compression - - j11_build - - start_j17_utests_compression: - type: approval - - j17_utests_compression: - requires: - - start_j17_utests_compression - - j11_build - - start_j11_utests_trie: - type: approval - - j11_utests_trie: - requires: - - start_j11_utests_trie - - j11_build - - start_j17_utests_trie: - type: approval - - j17_utests_trie: - requires: - - start_j17_utests_trie - - j11_build - - start_j11_utests_stress: - type: approval - - j11_utests_stress: - requires: - - start_j11_utests_stress - - j11_build - - start_j17_utests_stress: - type: approval - - j17_utests_stress: - requires: - - start_j17_utests_stress - - j11_build - - start_j11_utests_fqltool: - type: approval - - j11_utests_fqltool: - requires: - - start_j11_utests_fqltool - - j11_build - - start_j17_utests_fqltool: - type: approval - - j17_utests_fqltool: - requires: - - start_j17_utests_fqltool - - j11_build - - start_j11_utests_system_keyspace_directory: - type: approval - - j11_utests_system_keyspace_directory: - requires: - - start_j11_utests_system_keyspace_directory - - j11_build - - start_j17_utests_system_keyspace_directory: - type: approval - - j17_utests_system_keyspace_directory: - requires: - - start_j17_utests_system_keyspace_directory - - j11_build - - start_j11_dtest_jars_build: - type: approval - - j11_dtest_jars_build: - requires: - - j11_build - - start_j11_dtest_jars_build - - start_jvm_upgrade_dtests: - type: approval - - j11_jvm_upgrade_dtests: - requires: - - start_jvm_upgrade_dtests - - j11_dtest_jars_build - - start_j11_dtests: - type: approval - - j11_dtests: - requires: - - start_j11_dtests - - j11_build - - start_j11_dtests_vnode: - type: approval - - j11_dtests_vnode: - requires: - - start_j11_dtests_vnode - - j11_build - - start_j11_dtests_offheap: - type: approval - - j11_dtests_offheap: - requires: - - start_j11_dtests_offheap - - j11_build - - start_j17_dtests: - type: approval - - j17_dtests: - requires: - - start_j17_dtests - - j11_build - - start_j17_dtests_vnode: - type: approval - - j17_dtests_vnode: - requires: - - start_j17_dtests_vnode - - j11_build - - start_j17_dtests_offheap: - type: approval - - j17_dtests_offheap: - requires: - - start_j17_dtests_offheap - - j11_build - - start_j11_dtests_large: - type: approval - - j11_dtests_large: - requires: - - start_j11_dtests_large - - j11_build - - start_j11_dtests_large_vnode: - type: approval - - j11_dtests_large_vnode: - requires: - - start_j11_dtests_large_vnode - - j11_build - - start_j17_dtests_large: - type: approval - - j17_dtests_large: - requires: - - start_j17_dtests_large - - j11_build - - start_j17_dtests_large_vnode: - type: approval - - j17_dtests_large_vnode: - requires: - - start_j17_dtests_large_vnode - - j11_build - - start_j11_cqlsh_tests: - type: approval - - j11_cqlsh_dtests_py3: - requires: - - start_j11_cqlsh_tests - - j11_build - - j11_cqlsh_dtests_py3_vnode: - requires: - - start_j11_cqlsh_tests - - j11_build - - j11_cqlsh_dtests_py38: - requires: - - start_j11_cqlsh_tests - - j11_build - - j11_cqlsh_dtests_py311: - requires: - - start_j11_cqlsh_tests - - j11_build - - j11_cqlsh_dtests_py38_vnode: - requires: - - start_j11_cqlsh_tests - - j11_build - - j11_cqlsh_dtests_py311_vnode: - requires: - - start_j11_cqlsh_tests - - j11_build - - start_j11_cqlsh_tests_offheap: - type: approval - - j11_cqlsh_dtests_py3_offheap: - requires: - - start_j11_cqlsh_tests_offheap - - j11_build - - j11_cqlsh_dtests_py38_offheap: - requires: - - start_j11_cqlsh_tests_offheap - - j11_build - - j11_cqlsh_dtests_py311_offheap: - requires: - - start_j11_cqlsh_tests_offheap - - j11_build - - start_j17_cqlsh_tests: - type: approval - - j17_cqlsh_dtests_py3: - requires: - - start_j17_cqlsh_tests - - j11_build - - j17_cqlsh_dtests_py3_vnode: - requires: - - start_j17_cqlsh_tests - - j11_build - - j17_cqlsh_dtests_py38: - requires: - - start_j17_cqlsh_tests - - j11_build - - j17_cqlsh_dtests_py311: - requires: - - start_j17_cqlsh_tests - - j11_build - - j17_cqlsh_dtests_py38_vnode: - requires: - - start_j17_cqlsh_tests - - j11_build - - j17_cqlsh_dtests_py311_vnode: - requires: - - start_j17_cqlsh_tests - - j11_build - - start_j17_cqlsh_tests_offheap: - type: approval - - j17_cqlsh_dtests_py3_offheap: - requires: - - start_j17_cqlsh_tests_offheap - - j11_build - - j17_cqlsh_dtests_py38_offheap: - requires: - - start_j17_cqlsh_tests_offheap - - j11_build - - j17_cqlsh_dtests_py311_offheap: - requires: - - start_j17_cqlsh_tests_offheap - - j11_build - - start_j11_upgrade_dtests: - type: approval - - j11_upgrade_dtests: - requires: - - start_j11_upgrade_dtests - - j11_build - java11_pre-commit_tests: - jobs: - - start_pre-commit_tests: - type: approval - - j11_build: - requires: - - start_pre-commit_tests - - j11_unit_tests: - requires: - - j11_build - - j11_utests_oa: - requires: - - j11_build - - j11_simulator_dtests: - requires: - - j11_build - - j11_jvm_dtests: - requires: - - j11_build - - j11_jvm_dtests_vnode: - requires: - - j11_build - - j17_jvm_dtests: - requires: - - j11_build - - j17_jvm_dtests_vnode: - requires: - - j11_build - - j11_cqlshlib_tests: - requires: - - j11_build - - j11_cqlshlib_cython_tests: - requires: - - j11_build - - j17_cqlshlib_tests: - requires: - - j11_build - - j17_cqlshlib_cython_tests: - requires: - - j11_build - - j17_unit_tests: - requires: - - j11_build - - j17_utests_oa: - requires: - - j11_build - - start_utests_long: - type: approval - - j11_utests_long: - requires: - - start_utests_long - - j11_build - - j17_utests_long: - requires: - - start_utests_long - - j11_build - - start_utests_cdc: - type: approval - - j11_utests_cdc: - requires: - - start_utests_cdc - - j11_build - - j17_utests_cdc: - requires: - - start_utests_cdc - - j11_build - - start_utests_compression: - type: approval - - j11_utests_compression: - requires: - - start_utests_compression - - j11_build - - j17_utests_compression: - requires: - - start_utests_compression - - j11_build - - start_utests_trie: - type: approval - - j11_utests_trie: - requires: - - start_utests_trie - - j11_build - - j17_utests_trie: - requires: - - start_utests_trie - - j11_build - - start_utests_stress: - type: approval - - j11_utests_stress: - requires: - - start_utests_stress - - j11_build - - j17_utests_stress: - requires: - - start_utests_stress - - j11_build - - start_utests_fqltool: - type: approval - - j11_utests_fqltool: - requires: - - start_utests_fqltool - - j11_build - - j17_utests_fqltool: - requires: - - start_utests_fqltool - - j11_build - - start_utests_system_keyspace_directory: - type: approval - - j11_utests_system_keyspace_directory: - requires: - - j11_build - - j17_utests_system_keyspace_directory: - requires: - - start_utests_system_keyspace_directory - - j11_build - - start_jvm_upgrade_dtests: - type: approval - - j11_dtest_jars_build: - requires: - - j11_build - - start_jvm_upgrade_dtests - - j11_jvm_upgrade_dtests: - requires: - - j11_dtest_jars_build - - j11_dtests: - requires: - - j11_build - - j11_dtests_vnode: - requires: - - j11_build - - start_j11_dtests_offheap: - type: approval - - j11_dtests_offheap: - requires: - - start_j11_dtests_offheap - - j11_build - - j17_dtests: - requires: - - j11_build - - j17_dtests_vnode: - requires: - - j11_build - - start_j17_dtests_offheap: - type: approval - - j17_dtests_offheap: - requires: - - start_j17_dtests_offheap - - j11_build - - start_j11_dtests_large: - type: approval - - j11_dtests_large: - requires: - - start_j11_dtests_large - - j11_build - - j11_dtests_large_vnode: - requires: - - start_j11_dtests_large - - j11_build - - start_j17_dtests_large: - type: approval - - j17_dtests_large: - requires: - - start_j17_dtests_large - - j11_build - - j17_dtests_large_vnode: - requires: - - start_j17_dtests_large - - j11_build - - j11_cqlsh_dtests_py3: - requires: - - j11_build - - j11_cqlsh_dtests_py3_vnode: - requires: - - j11_build - - j11_cqlsh_dtests_py38: - requires: - - j11_build - - j11_cqlsh_dtests_py311: - requires: - - j11_build - - j11_cqlsh_dtests_py38_vnode: - requires: - - j11_build - - j11_cqlsh_dtests_py311_vnode: - requires: - - j11_build - - start_j11_cqlsh_dtests_offheap: - type: approval - - j11_cqlsh_dtests_py3_offheap: - requires: - - start_j11_cqlsh_dtests_offheap - - j11_build - - j11_cqlsh_dtests_py38_offheap: - requires: - - start_j11_cqlsh_dtests_offheap - - j11_build - - j11_cqlsh_dtests_py311_offheap: - requires: - - start_j11_cqlsh_dtests_offheap - - j11_build - - j17_cqlsh_dtests_py3: - requires: - - j11_build - - j17_cqlsh_dtests_py3_vnode: - requires: - - j11_build - - j17_cqlsh_dtests_py38: - requires: - - j11_build - - j17_cqlsh_dtests_py311: - requires: - - j11_build - - j17_cqlsh_dtests_py38_vnode: - requires: - - j11_build - - j17_cqlsh_dtests_py311_vnode: - requires: - - j11_build - - start_j17_cqlsh-dtests-offheap: - type: approval - - j17_cqlsh_dtests_py3_offheap: - requires: - - start_j17_cqlsh-dtests-offheap - - j11_build - - j17_cqlsh_dtests_py38_offheap: - requires: - - start_j17_cqlsh-dtests-offheap - - j11_build - - j17_cqlsh_dtests_py311_offheap: - requires: - - start_j17_cqlsh-dtests-offheap - - j11_build - - start_j11_upgrade_dtests: - type: approval - - j11_upgrade_dtests: - requires: - - j11_build - - start_j11_upgrade_dtests - java17_separate_tests: - jobs: - - start_j17_build: - type: approval - - j17_build: - requires: - - start_j17_build - - start_j17_unit_tests: - type: approval - - j17_unit_tests: - requires: - - start_j17_unit_tests - - j17_build - - start_j17_jvm_dtests: - type: approval - - j17_jvm_dtests: - requires: - - start_j17_jvm_dtests - - j17_build - - start_j17_jvm_dtests_vnode: - type: approval - - j17_jvm_dtests_vnode: - requires: - - start_j17_jvm_dtests_vnode - - j17_build - - start_j17_cqlshlib_tests: - type: approval - - j17_cqlshlib_tests: - requires: - - start_j17_cqlshlib_tests - - j17_build - - start_j17_cqlshlib_cython_tests: - type: approval - - j17_cqlshlib_cython_tests: - requires: - - start_j17_cqlshlib_cython_tests - - j17_build - - start_j17_dtests: - type: approval - - j17_dtests: - requires: - - start_j17_dtests - - j17_build - - start_j17_dtests_vnode: - type: approval - - j17_dtests_vnode: - requires: - - start_j17_dtests_vnode - - j17_build - - start_j17_dtests_offheap: - type: approval - - j17_dtests_offheap: - requires: - - start_j17_dtests_offheap - - j17_build - - start_j17_dtests_large: - type: approval - - j17_dtests_large: - requires: - - start_j17_dtests_large - - j17_build - - start_j17_dtests_large_vnode: - type: approval - - j17_dtests_large_vnode: - requires: - - start_j17_dtests_large_vnode - - j17_build - - start_j17_cqlsh_tests: - type: approval - - j17_cqlsh_dtests_py3: - requires: - - start_j17_cqlsh_tests - - j17_build - - j17_cqlsh_dtests_py3_vnode: - requires: - - start_j17_cqlsh_tests - - j17_build - - j17_cqlsh_dtests_py38: - requires: - - start_j17_cqlsh_tests - - j17_build - - j17_cqlsh_dtests_py311: - requires: - - start_j17_cqlsh_tests - - j17_build - - j17_cqlsh_dtests_py38_vnode: - requires: - - start_j17_cqlsh_tests - - j17_build - - j17_cqlsh_dtests_py311_vnode: - requires: - - start_j17_cqlsh_tests - - j17_build - - start_j17_cqlsh-dtests-offheap: - type: approval - - j17_cqlsh_dtests_py3_offheap: - requires: - - start_j17_cqlsh-dtests-offheap - - j17_build - - j17_cqlsh_dtests_py38_offheap: - requires: - - start_j17_cqlsh-dtests-offheap - - j17_build - - j17_cqlsh_dtests_py311_offheap: - requires: - - start_j17_cqlsh-dtests-offheap - - j17_build - - start_j17_utests_oa: - type: approval - - j17_utests_oa: - requires: - - start_j17_utests_oa - - j17_build - - start_j17_utests_long: - type: approval - - j17_utests_long: - requires: - - start_j17_utests_long - - j17_build - - start_j17_utests_cdc: - type: approval - - j17_utests_cdc: - requires: - - start_j17_utests_cdc - - j17_build - - start_j17_utests_compression: - type: approval - - j17_utests_compression: - requires: - - start_j17_utests_compression - - j17_build - - start_j17_utests_trie: - type: approval - - j17_utests_trie: - requires: - - start_j17_utests_trie - - j17_build - - start_j17_utests_stress: - type: approval - - j17_utests_stress: - requires: - - start_j17_utests_stress - - j17_build - - start_j17_utests_fqltool: - type: approval - - j17_utests_fqltool: - requires: - - start_j17_utests_fqltool - - j17_build - - start_j17_utests_system_keyspace_directory: - type: approval - - j17_utests_system_keyspace_directory: - requires: - - start_j17_utests_system_keyspace_directory - - j17_build - java17_pre-commit_tests: - jobs: - - start_pre-commit_tests: - type: approval - - j17_build: - requires: - - start_pre-commit_tests - - j17_unit_tests: - requires: - - j17_build - - j17_utests_oa: - requires: - - j17_build - - j17_jvm_dtests: - requires: - - j17_build - - j17_jvm_dtests_vnode: - requires: - - j17_build - - j17_cqlshlib_tests: - requires: - - j17_build - - j17_cqlshlib_cython_tests: - requires: - - j17_build - - j17_dtests: - requires: - - j17_build - - j17_dtests_vnode: - requires: - - j17_build - - start_j17_dtests_offheap: - type: approval - - j17_dtests_offheap: - requires: - - start_j17_dtests_offheap - - j17_build - - start_j17_dtests_large: - type: approval - - j17_dtests_large: - requires: - - start_j17_dtests_large - - j17_build - - j17_dtests_large_vnode: - requires: - - start_j17_dtests_large - - j17_build - - j17_cqlsh_dtests_py3: - requires: - - j17_build - - j17_cqlsh_dtests_py3_vnode: - requires: - - j17_build - - j17_cqlsh_dtests_py38: - requires: - - j17_build - - j17_cqlsh_dtests_py311: - requires: - - j17_build - - j17_cqlsh_dtests_py38_vnode: - requires: - - j17_build - - j17_cqlsh_dtests_py311_vnode: - requires: - - j17_build - - start_j17_cqlsh-dtests-offheap: - type: approval - - j17_cqlsh_dtests_py3_offheap: - requires: - - start_j17_cqlsh-dtests-offheap - - j17_build - - j17_cqlsh_dtests_py38_offheap: - requires: - - start_j17_cqlsh-dtests-offheap - - j17_build - - j17_cqlsh_dtests_py311_offheap: - requires: - - start_j17_cqlsh-dtests-offheap - - j17_build - - start_utests_long: - type: approval - - j17_utests_long: - requires: - - start_utests_long - - j17_build - - start_utests_cdc: - type: approval - - j17_utests_cdc: - requires: - - start_utests_cdc - - j17_build - - start_utests_compression: - type: approval - - j17_utests_compression: - requires: - - start_utests_compression - - j17_build - - start_utests_trie: - type: approval - - j17_utests_trie: - requires: - - start_utests_trie - - j17_build - - start_utests_stress: - type: approval - - j17_utests_stress: - requires: - - start_utests_stress - - j17_build - - start_utests_fqltool: - type: approval - - j17_utests_fqltool: - requires: - - start_utests_fqltool - - j17_build - - start_utests_system_keyspace_directory: - type: approval - - j17_utests_system_keyspace_directory: - requires: - - start_utests_system_keyspace_directory - - j17_build diff --git a/.circleci/config_template.yml b/.circleci/config_template.yml index b1a2d7927f..ab6d5a2d2f 100644 --- a/.circleci/config_template.yml +++ b/.circleci/config_template.yml @@ -154,36 +154,6 @@ default_env_vars: &default_env_vars # The number of times that the repeated JUnit test should be run. REPEATED_ANT_TEST_COUNT: 500 -j8_par_executor: &j8_par_executor - executor: - name: java8-executor - #exec_resource_class: xlarge - parallelism: 4 - -j8_small_par_executor: &j8_small_par_executor - executor: - name: java8-executor - #exec_resource_class: xlarge - parallelism: 1 - -j8_small_executor: &j8_small_executor - executor: - name: java8-executor - exec_resource_class: medium - parallelism: 1 - -j8_medium_par_executor: &j8_medium_par_executor - executor: - name: java8-executor - #exec_resource_class: xlarge - parallelism: 1 - -j8_seq_executor: &j8_seq_executor - executor: - name: java8-executor - #exec_resource_class: xlarge - parallelism: 1 # sequential, single container tests: no parallelism benefits - j11_par_executor: &j11_par_executor executor: name: java11-executor @@ -199,7 +169,7 @@ j11_small_par_executor: &j11_small_par_executor j11_small_executor: &j11_small_executor executor: name: java11-executor - #exec_resource_class: medium + exec_resource_class: medium parallelism: 1 j11_medium_par_executor: &j11_medium_par_executor @@ -212,22 +182,38 @@ j11_seq_executor: &j11_seq_executor executor: name: java11-executor #exec_resource_class: xlarge + exec_resource_class: medium parallelism: 1 # sequential, single container tests: no parallelism benefits -j8_repeated_utest_executor: &j8_repeated_utest_executor +j17_par_executor: &j17_par_executor executor: - name: java8-executor + name: java17-executor + #exec_resource_class: xlarge parallelism: 4 -j8_repeated_dtest_executor: &j8_repeated_dtest_executor +j17_small_par_executor: &j17_small_par_executor executor: - name: java8-executor - parallelism: 4 + name: java17-executor + #exec_resource_class: xlarge + parallelism: 1 -j11_repeated_upgrade_dtest_executor: &j11_repeated_upgrade_dtest_executor +j17_small_executor: &j17_small_executor executor: - name: java11-executor - parallelism: 4 + name: java17-executor + #exec_resource_class: medium + parallelism: 1 + +j17_medium_par_executor: &j17_medium_par_executor + executor: + name: java17-executor + #exec_resource_class: xlarge + parallelism: 1 + +j17_seq_executor: &j17_seq_executor + executor: + name: java17-executor + #exec_resource_class: xlarge + parallelism: 1 # sequential, single container tests: no parallelism benefits j11_repeated_jvm_upgrade_dtest_executor: &j11_repeated_jvm_upgrade_dtest_executor executor: @@ -244,893 +230,20 @@ j11_repeated_dtest_executor: &j11_repeated_dtest_executor name: java11-executor parallelism: 4 -j8_separate_jobs: &j8_separate_jobs - jobs: - - start_j8_build: - type: approval - - j8_build: - requires: - - start_j8_build - # Java 8 unit tests - - start_j8_unit_tests: - type: approval - - j8_unit_tests: - requires: - - start_j8_unit_tests - - j8_build - - start_j8_unit_tests_repeat: - type: approval - - j8_unit_tests_repeat: - requires: - - start_j8_unit_tests_repeat - - j8_build - - start_j8_jvm_dtests: - type: approval - - j8_jvm_dtests: - requires: - - start_j8_jvm_dtests - - j8_build - - start_j8_jvm_dtests_vnode: - type: approval - - j8_jvm_dtests_vnode: - requires: - - start_j8_jvm_dtests_vnode - - j8_build - - start_j8_jvm_dtests_repeat: - type: approval - - j8_jvm_dtests_repeat: - requires: - - start_j8_jvm_dtests_repeat - - j8_build - - start_j8_jvm_dtests_vnode_repeat: - type: approval - - j8_jvm_dtests_vnode_repeat: - requires: - - start_j8_jvm_dtests_vnode_repeat - - j8_build - - start_j11_jvm_dtests: - type: approval - - j11_jvm_dtests: - requires: - - start_j11_jvm_dtests - - j8_build - - start_j11_jvm_dtests_vnode: - type: approval - - j11_jvm_dtests_vnode: - requires: - - start_j11_jvm_dtests_vnode - - j8_build - - start_j11_jvm_dtests_repeat: - type: approval - - j11_jvm_dtests_repeat: - requires: - - start_j11_jvm_dtests_repeat - - j8_build - - start_j11_jvm_dtests_vnode_repeat: - type: approval - - j11_jvm_dtests_vnode_repeat: - requires: - - start_j11_jvm_dtests_vnode_repeat - - j8_build - - start_j8_simulator_dtests: - type: approval - - j8_simulator_dtests: - requires: - - start_j8_simulator_dtests - - j8_build - - start_j8_simulator_dtests_repeat: - type: approval - - j8_simulator_dtests_repeat: - requires: - - start_j8_simulator_dtests_repeat - - j8_build - - start_j8_cqlshlib_tests: - type: approval - - j8_cqlshlib_tests: - requires: - - start_j8_cqlshlib_tests - - j8_build - - start_j8_cqlshlib_cython_tests: - type: approval - - j8_cqlshlib_cython_tests: - requires: - - start_j8_cqlshlib_cython_tests - - j8_build - - start_j11_cqlshlib_tests: - type: approval - - j11_cqlshlib_tests: - requires: - - start_j11_cqlshlib_tests - - j8_build - - start_j11_cqlshlib_cython_tests: - type: approval - - j11_cqlshlib_cython_tests: - requires: - - start_j11_cqlshlib_cython_tests - - j8_build - # Java 11 unit tests - - start_j11_unit_tests: - type: approval - - j11_unit_tests: - requires: - - start_j11_unit_tests - - j8_build - - start_j11_unit_tests_repeat: - type: approval - - j11_unit_tests_repeat: - requires: - - start_j11_unit_tests_repeat - - j8_build - # specialized unit tests (all run on request) - - start_j8_utests_oa: - type: approval - - j8_utests_oa: - requires: - - start_j8_utests_oa - - j8_build - - start_j8_utests_oa_repeat: - type: approval - - j8_utests_oa_repeat: - requires: - - start_j8_utests_oa_repeat - - j8_build - - start_j11_utests_oa: - type: approval - - j11_utests_oa: - requires: - - start_j11_utests_oa - - j8_build - - start_j11_utests_oa_repeat: - type: approval - - j11_utests_oa_repeat: - requires: - - start_j11_utests_oa_repeat - - j8_build - - start_j8_utests_long: - type: approval - - j8_utests_long: - requires: - - start_j8_utests_long - - j8_build - - start_j11_utests_long: - type: approval - - j11_utests_long: - requires: - - start_j11_utests_long - - j8_build - - start_j8_utests_long_repeat: - type: approval - - j8_utests_long_repeat: - requires: - - start_j8_utests_long_repeat - - j8_build - - start_j11_utests_long_repeat: - type: approval - - j11_utests_long_repeat: - requires: - - start_j11_utests_long_repeat - - j8_build - - start_j8_utests_cdc: - type: approval - - j8_utests_cdc: - requires: - - start_j8_utests_cdc - - j8_build - - start_j11_utests_cdc: - type: approval - - j11_utests_cdc: - requires: - - start_j11_utests_cdc - - j8_build - - start_j8_utests_cdc_repeat: - type: approval - - j8_utests_cdc_repeat: - requires: - - start_j8_utests_cdc_repeat - - j8_build - - start_j11_utests_cdc_repeat: - type: approval - - j11_utests_cdc_repeat: - requires: - - start_j11_utests_cdc_repeat - - j8_build - - start_j8_utests_compression: - type: approval - - j8_utests_compression: - requires: - - start_j8_utests_compression - - j8_build - - start_j11_utests_compression: - type: approval - - j11_utests_compression: - requires: - - start_j11_utests_compression - - j8_build - - start_j8_utests_compression_repeat: - type: approval - - j8_utests_compression_repeat: - requires: - - start_j8_utests_compression_repeat - - j8_build - - start_j11_utests_compression_repeat: - type: approval - - j11_utests_compression_repeat: - requires: - - start_j11_utests_compression_repeat - - j8_build - - start_j8_utests_trie: - type: approval - - j8_utests_trie: - requires: - - start_j8_utests_trie - - j8_build - - start_j11_utests_trie: - type: approval - - j11_utests_trie: - requires: - - start_j11_utests_trie - - j8_build - - start_j8_utests_trie_repeat: - type: approval - - j8_utests_trie_repeat: - requires: - - start_j8_utests_trie_repeat - - j8_build - - start_j11_utests_trie_repeat: - type: approval - - j11_utests_trie_repeat: - requires: - - start_j11_utests_trie_repeat - - j8_build - - start_j8_utests_stress: - type: approval - - j8_utests_stress: - requires: - - start_j8_utests_stress - - j8_build - - start_j11_utests_stress: - type: approval - - j11_utests_stress: - requires: - - start_j11_utests_stress - - j8_build - - start_j8_utests_stress_repeat: - type: approval - - j8_utests_stress_repeat: - requires: - - start_j8_utests_stress_repeat - - j8_build - - start_j11_utests_stress_repeat: - type: approval - - j11_utests_stress_repeat: - requires: - - start_j11_utests_stress_repeat - - j8_build - - start_j8_utests_fqltool: - type: approval - - j8_utests_fqltool: - requires: - - start_j8_utests_fqltool - - j8_build - - start_j11_utests_fqltool: - type: approval - - j11_utests_fqltool: - requires: - - start_j11_utests_fqltool - - j8_build - - start_j8_utests_fqltool_repeat: - type: approval - - j8_utests_fqltool_repeat: - requires: - - start_j8_utests_fqltool_repeat - - j8_build - - start_j11_utests_fqltool_repeat: - type: approval - - j11_utests_fqltool_repeat: - requires: - - start_j11_utests_fqltool_repeat - - j8_build - - start_j8_utests_system_keyspace_directory: - type: approval - - j8_utests_system_keyspace_directory: - requires: - - start_j8_utests_system_keyspace_directory - - j8_build - - start_j11_utests_system_keyspace_directory: - type: approval - - j11_utests_system_keyspace_directory: - requires: - - start_j11_utests_system_keyspace_directory - - j8_build - - start_j8_utests_system_keyspace_directory_repeat: - type: approval - - j8_utests_system_keyspace_directory_repeat: - requires: - - start_j8_utests_system_keyspace_directory_repeat - - j8_build - - start_j11_utests_system_keyspace_directory_repeat: - type: approval - - j11_utests_system_keyspace_directory_repeat: - requires: - - start_j11_utests_system_keyspace_directory_repeat - - j8_build - # Python DTests - - start_j8_dtests: - type: approval - - j8_dtests: - requires: - - start_j8_dtests - - j8_build - - start_j8_dtests_vnode: - type: approval - - j8_dtests_vnode: - requires: - - start_j8_dtests_vnode - - j8_build - # Java 8 off-heap dtests - - start_j8_dtests_offheap: - type: approval - - j8_dtests_offheap: - requires: - - start_j8_dtests_offheap - - j8_build - - start_j8_dtests_offheap_repeat: - type: approval - - j8_dtests_offheap_repeat: - requires: - - start_j8_dtests_offheap_repeat - - j8_build - # Java 11 dtests - - start_j11_dtests: - type: approval - - j11_dtests: - requires: - - start_j11_dtests - - j8_build - - start_j11_dtests_vnode: - type: approval - - j11_dtests_vnode: - requires: - - start_j11_dtests_vnode - - j8_build - # Java 11 off-heap dtests - - start_j11_dtests_offheap: - type: approval - - j11_dtests_offheap: - requires: - - start_j11_dtests_offheap - - j8_build - - start_j11_dtests_offheap_repeat: - type: approval - - j11_dtests_offheap_repeat: - requires: - - start_j11_dtests_offheap_repeat - - j8_build - # Python large DTests - - start_j8_dtests_large: - type: approval - - j8_dtests_large: - requires: - - start_j8_dtests_large - - j8_build - - start_j8_dtests_large_repeat: - type: approval - - j8_dtests_large_repeat: - requires: - - start_j8_dtests_large_repeat - - j8_build - - start_j8_dtests_large_vnode: - type: approval - - j8_dtests_large_vnode: - requires: - - start_j8_dtests_large_vnode - - j8_build - - start_j8_dtests_large_vnode_repeat: - type: approval - - j8_dtests_large_vnode_repeat: - requires: - - start_j8_dtests_large_vnode_repeat - - j8_build - - start_j11_dtests_large: - type: approval - - j11_dtests_large: - requires: - - start_j11_dtests_large - - j8_build - - start_j11_dtests_large_repeat: - type: approval - - j11_dtests_large_repeat: - requires: - - start_j11_dtests_large_repeat - - j8_build - - start_j11_dtests_large_vnode: - type: approval - - j11_dtests_large_vnode: - requires: - - start_j11_dtests_large_vnode - - j8_build - - start_j11_dtests_large_vnode_repeat: - type: approval - - j11_dtests_large_vnode_repeat: - requires: - - start_j11_dtests_large_vnode_repeat - - j8_build - # Java 8 cqlsh dtests - - start_j8_cqlsh_tests: - type: approval - - j8_cqlsh_dtests_py3: - requires: - - start_j8_cqlsh_tests - - j8_build - - j8_cqlsh_dtests_py3_vnode: - requires: - - start_j8_cqlsh_tests - - j8_build - - j8_cqlsh_dtests_py38: - requires: - - start_j8_cqlsh_tests - - j8_build - - j8_cqlsh_dtests_py311: - requires: - - start_j8_cqlsh_tests - - j8_build - - j8_cqlsh_dtests_py38_vnode: - requires: - - start_j8_cqlsh_tests - - j8_build - - j8_cqlsh_dtests_py311_vnode: - requires: - - start_j8_cqlsh_tests - - j8_build - # Java 8 cqlsh offheap dtests offheap - - start_j8_cqlsh_tests_offheap: - type: approval - - j8_cqlsh_dtests_py3_offheap: - requires: - - start_j8_cqlsh_tests_offheap - - j8_build - - j8_cqlsh_dtests_py38_offheap: - requires: - - start_j8_cqlsh_tests_offheap - - j8_build - - j8_cqlsh_dtests_py311_offheap: - requires: - - start_j8_cqlsh_tests_offheap - - j8_build - # Java 11 cqlsh dtests - - start_j11_cqlsh_tests: - type: approval - - j11_cqlsh_dtests_py3: - requires: - - start_j11_cqlsh_tests - - j8_build - - j11_cqlsh_dtests_py3_vnode: - requires: - - start_j11_cqlsh_tests - - j8_build - - j11_cqlsh_dtests_py38: - requires: - - start_j11_cqlsh_tests - - j8_build - - j11_cqlsh_dtests_py311: - requires: - - start_j11_cqlsh_tests - - j8_build - - j11_cqlsh_dtests_py38_vnode: - requires: - - start_j11_cqlsh_tests - - j8_build - - j11_cqlsh_dtests_py311_vnode: - requires: - - start_j11_cqlsh_tests - - j8_build - # Java 11 cqlsh dtests off-heap - - start_j11_cqlsh_tests_offheap: - type: approval - - j11_cqlsh_dtests_py3_offheap: - requires: - - start_j11_cqlsh_tests_offheap - - j8_build - - j11_cqlsh_dtests_py38_offheap: - requires: - - start_j11_cqlsh_tests_offheap - - j8_build - - j11_cqlsh_dtests_py311_offheap: - requires: - - start_j11_cqlsh_tests_offheap - - j8_build - # Java 8 repeated utest - - start_j8_repeated_ant_test: - type: approval - - j8_repeated_ant_test: - requires: - - start_j8_repeated_ant_test - - j8_build - # Java 11 repeated utest - - start_j11_repeated_ant_test: - type: approval - - j11_repeated_ant_test: - requires: - - start_j11_repeated_ant_test - - j8_build - # Java 8 repeated dtest - - start_j8_dtests_repeat: - type: approval - - j8_dtests_repeat: - requires: - - start_j8_dtests_repeat - - j8_build - - start_j8_dtests_vnode_repeat: - type: approval - - j8_dtests_vnode_repeat: - requires: - - start_j8_dtests_vnode_repeat - - j8_build - # Java 11 repeated dtest - - start_j11_dtests_repeat: - type: approval - - j11_dtests_repeat: - requires: - - start_j11_dtests_repeat - - j8_build - - start_j11_dtests_vnode_repeat: - type: approval - - j11_dtests_vnode_repeat: - requires: - - start_j11_dtests_vnode_repeat - - j8_build +j17_repeated_utest_executor: &j17_repeated_utest_executor + executor: + name: java17-executor + parallelism: 4 -j8_pre-commit_jobs: &j8_pre-commit_jobs - jobs: - - start_pre-commit_tests: - type: approval - - j8_build: - requires: - - start_pre-commit_tests - # Java 8 unit tests - - j8_unit_tests: - requires: - - j8_build - - j8_utests_oa: - requires: - - j8_build - - j8_utests_oa_repeat: - requires: - - j8_build - - j11_utests_oa_repeat: - requires: - - j8_build - - j8_unit_tests_repeat: - requires: - - j8_build - - j8_simulator_dtests: - requires: - - j8_build - - j8_simulator_dtests_repeat: - requires: - - j8_build - - j8_jvm_dtests: - requires: - - j8_build - - j8_jvm_dtests_repeat: - requires: - - j8_build - - j8_jvm_dtests_vnode: - requires: - - j8_build - - j8_jvm_dtests_vnode_repeat: - requires: - - j8_build - - j11_jvm_dtests: - requires: - - j8_build - - j11_jvm_dtests_repeat: - requires: - - j8_build - - j11_jvm_dtests_vnode: - requires: - - j8_build - - j11_jvm_dtests_vnode_repeat: - requires: - - j8_build - - j8_cqlshlib_tests: - requires: - - j8_build - - j8_cqlshlib_cython_tests: - requires: - - j8_build - - j11_cqlshlib_tests: - requires: - - j8_build - - j11_cqlshlib_cython_tests: - requires: - - j8_build - # Java 11 unit tests - - j11_unit_tests: - requires: - - j8_build - - j11_utests_oa: - requires: - - j8_build - - j11_unit_tests_repeat: - requires: - - j8_build - # specialized unit tests (all run on request) - - start_utests_long: - type: approval - - j8_utests_long: - requires: - - start_utests_long - - j8_build - - j11_utests_long: - requires: - - start_utests_long - - j8_build - - j8_utests_long_repeat: - requires: - - start_utests_long - - j8_build - - j11_utests_long_repeat: - requires: - - start_utests_long - - j8_build - - start_utests_cdc: - type: approval - - j8_utests_cdc: - requires: - - start_utests_cdc - - j8_build - - j11_utests_cdc: - requires: - - start_utests_cdc - - j8_build - - j8_utests_cdc_repeat: - requires: - - start_utests_cdc - - j8_build - - j11_utests_cdc_repeat: - requires: - - start_utests_cdc - - j8_build - - start_utests_compression: - type: approval - - j8_utests_compression: - requires: - - start_utests_compression - - j8_build - - j11_utests_compression: - requires: - - start_utests_compression - - j8_build - - j8_utests_compression_repeat: - requires: - - start_utests_compression - - j8_build - - j11_utests_compression_repeat: - requires: - - start_utests_compression - - j8_build - - start_utests_trie: - type: approval - - j8_utests_trie: - requires: - - start_utests_trie - - j8_build - - j11_utests_trie: - requires: - - start_utests_trie - - j8_build - - j8_utests_trie_repeat: - requires: - - start_utests_trie - - j8_build - - j11_utests_trie_repeat: - requires: - - start_utests_trie - - j8_build - - start_utests_stress: - type: approval - - j8_utests_stress: - requires: - - start_utests_stress - - j8_build - - j11_utests_stress: - requires: - - start_utests_stress - - j8_build - - j8_utests_stress_repeat: - requires: - - start_utests_stress - - j8_build - - j11_utests_stress_repeat: - requires: - - start_utests_stress - - j8_build - - start_utests_fqltool: - type: approval - - j8_utests_fqltool: - requires: - - start_utests_fqltool - - j8_build - - j11_utests_fqltool: - requires: - - start_utests_fqltool - - j8_build - - j8_utests_fqltool_repeat: - requires: - - start_utests_fqltool - - j8_build - - j11_utests_fqltool_repeat: - requires: - - start_utests_fqltool - - j8_build - - start_utests_system_keyspace_directory: - type: approval - - j8_utests_system_keyspace_directory: - requires: - - j8_build - - j11_utests_system_keyspace_directory: - requires: - - start_utests_system_keyspace_directory - - j8_build - - j8_utests_system_keyspace_directory_repeat: - requires: - - j8_build - - j11_utests_system_keyspace_directory_repeat: - requires: - - start_utests_system_keyspace_directory - - j8_build - # Python DTests - - j8_dtests: - requires: - - j8_build - - j8_dtests_repeat: - requires: - - j8_build - - j8_dtests_vnode: - requires: - - j8_build - - j8_dtests_vnode_repeat: - requires: - - j8_build - - start_j8_dtests_offheap: - type: approval - - j8_dtests_offheap: - requires: - - start_j8_dtests_offheap - - j8_build - - j8_dtests_offheap_repeat: - requires: - - start_j8_dtests_offheap - - j8_build - # Java 11 dtests - - j11_dtests: - requires: - - j8_build - - j11_dtests_repeat: - requires: - - j8_build - - j11_dtests_vnode: - requires: - - j8_build - - j11_dtests_vnode_repeat: - requires: - - j8_build - - start_j11_dtests_offheap: - type: approval - - j11_dtests_offheap: - requires: - - start_j11_dtests_offheap - - j8_build - - j11_dtests_offheap_repeat: - requires: - - start_j11_dtests_offheap - - j8_build - # Large Python DTests - - start_j8_dtests_large: - type: approval - - j8_dtests_large: - requires: - - start_j8_dtests_large - - j8_build - - j8_dtests_large_repeat: - requires: - - start_j8_dtests_large - - j8_build - - j8_dtests_large_vnode: - requires: - - start_j8_dtests_large - - j8_build - - j8_dtests_large_vnode_repeat: - requires: - - start_j8_dtests_large - - j8_build - - start_j11_dtests_large: - type: approval - - j11_dtests_large: - requires: - - start_j11_dtests_large - - j8_build - - j11_dtests_large_repeat: - requires: - - start_j11_dtests_large - - j8_build - - j11_dtests_large_vnode: - requires: - - start_j11_dtests_large - - j8_build - - j11_dtests_large_vnode_repeat: - requires: - - start_j11_dtests_large - - j8_build - # Java 8 cqlsh dtests - - j8_cqlsh_dtests_py3: - requires: - - j8_build - - j8_cqlsh_dtests_py3_vnode: - requires: - - j8_build - - j8_cqlsh_dtests_py38: - requires: - - j8_build - - j8_cqlsh_dtests_py311: - requires: - - j8_build - - j8_cqlsh_dtests_py38_vnode: - requires: - - j8_build - - j8_cqlsh_dtests_py311_vnode: - requires: - - j8_build - # Java 8 cqlsh dtests offheap - - start_j8_cqlsh_dtests_offheap: - type: approval - - j8_cqlsh_dtests_py3_offheap: - requires: - - start_j8_cqlsh_dtests_offheap - - j8_build - - j8_cqlsh_dtests_py38_offheap: - requires: - - start_j8_cqlsh_dtests_offheap - - j8_build - - j8_cqlsh_dtests_py311_offheap: - requires: - - start_j8_cqlsh_dtests_offheap - - j8_build - # Java 11 cqlsh dtests - - j11_cqlsh_dtests_py3: - requires: - - j8_build - - j11_cqlsh_dtests_py3_vnode: - requires: - - j8_build - - j11_cqlsh_dtests_py38: - requires: - - j8_build - - j11_cqlsh_dtests_py311: - requires: - - j8_build - - j11_cqlsh_dtests_py38_vnode: - requires: - - j8_build - - j11_cqlsh_dtests_py311_vnode: - requires: - - j8_build - # Java 11 cqlsh dtests off-heap - - start_j11_cqlsh-dtests-offheap: - type: approval - - j11_cqlsh_dtests_py3_offheap: - requires: - - start_j11_cqlsh-dtests-offheap - - j8_build - - j11_cqlsh_dtests_py38_offheap: - requires: - - start_j11_cqlsh-dtests-offheap - - j8_build - - j11_cqlsh_dtests_py311_offheap: - requires: - - start_j11_cqlsh-dtests-offheap - - j8_build +j17_repeated_dtest_executor: &j17_repeated_dtest_executor + executor: + name: java17-executor + parallelism: 4 + +j11_repeated_upgrade_dtest_executor: &j11_repeated_upgrade_dtest_executor + executor: + name: java11-executor + parallelism: 4 j11_separate_jobs: &j11_separate_jobs jobs: @@ -1176,6 +289,30 @@ j11_separate_jobs: &j11_separate_jobs requires: - start_j11_jvm_dtests_vnode_repeat - j11_build + - start_j17_jvm_dtests: + type: approval + - j17_jvm_dtests: + requires: + - start_j17_jvm_dtests + - j11_build + - start_j17_jvm_dtests_vnode: + type: approval + - j17_jvm_dtests_vnode: + requires: + - start_j17_jvm_dtests_vnode + - j11_build + - start_j17_jvm_dtests_repeat: + type: approval + - j17_jvm_dtests_repeat: + requires: + - start_j17_jvm_dtests_repeat + - j11_build + - start_j17_jvm_dtests_vnode_repeat: + type: approval + - j17_jvm_dtests_vnode_repeat: + requires: + - start_j17_jvm_dtests_vnode_repeat + - j11_build - start_j11_simulator_dtests: type: approval - j11_simulator_dtests: @@ -1200,7 +337,244 @@ j11_separate_jobs: &j11_separate_jobs requires: - start_j11_cqlshlib_cython_tests - j11_build - # Java 11 dtests + - start_j17_cqlshlib_tests: + type: approval + - j17_cqlshlib_tests: + requires: + - start_j17_cqlshlib_tests + - j11_build + - start_j17_cqlshlib_cython_tests: + type: approval + - j17_cqlshlib_cython_tests: + requires: + - start_j17_cqlshlib_cython_tests + - j11_build + # Java 17 unit tests + - start_j17_unit_tests: + type: approval + - j17_unit_tests: + requires: + - start_j17_unit_tests + - j11_build + - start_j17_unit_tests_repeat: + type: approval + - j17_unit_tests_repeat: + requires: + - start_j17_unit_tests_repeat + - j11_build + # specialized unit tests (all run on request) + - start_j11_utests_oa: + type: approval + - j11_utests_oa: + requires: + - start_j11_utests_oa + - j11_build + - start_j11_utests_oa_repeat: + type: approval + - j11_utests_oa_repeat: + requires: + - start_j11_utests_oa_repeat + - j11_build + - start_j17_utests_oa: + type: approval + - j17_utests_oa: + requires: + - start_j17_utests_oa + - j11_build + - start_j17_utests_oa_repeat: + type: approval + - j17_utests_oa_repeat: + requires: + - start_j17_utests_oa_repeat + - j11_build + - start_j11_utests_long: + type: approval + - j11_utests_long: + requires: + - start_j11_utests_long + - j11_build + - start_j17_utests_long: + type: approval + - j17_utests_long: + requires: + - start_j17_utests_long + - j11_build + - start_j11_utests_long_repeat: + type: approval + - j11_utests_long_repeat: + requires: + - start_j11_utests_long_repeat + - j11_build + - start_j17_utests_long_repeat: + type: approval + - j17_utests_long_repeat: + requires: + - start_j17_utests_long_repeat + - j11_build + - start_j11_utests_cdc: + type: approval + - j11_utests_cdc: + requires: + - start_j11_utests_cdc + - j11_build + - start_j17_utests_cdc: + type: approval + - j17_utests_cdc: + requires: + - start_j17_utests_cdc + - j11_build + - start_j11_utests_cdc_repeat: + type: approval + - j11_utests_cdc_repeat: + requires: + - start_j11_utests_cdc_repeat + - j11_build + - start_j17_utests_cdc_repeat: + type: approval + - j17_utests_cdc_repeat: + requires: + - start_j17_utests_cdc_repeat + - j11_build + - start_j11_utests_compression: + type: approval + - j11_utests_compression: + requires: + - start_j11_utests_compression + - j11_build + - start_j17_utests_compression: + type: approval + - j17_utests_compression: + requires: + - start_j17_utests_compression + - j11_build + - start_j11_utests_compression_repeat: + type: approval + - j11_utests_compression_repeat: + requires: + - start_j11_utests_compression_repeat + - j11_build + - start_j17_utests_compression_repeat: + type: approval + - j17_utests_compression_repeat: + requires: + - start_j17_utests_compression_repeat + - j11_build + - start_j11_utests_trie: + type: approval + - j11_utests_trie: + requires: + - start_j11_utests_trie + - j11_build + - start_j17_utests_trie: + type: approval + - j17_utests_trie: + requires: + - start_j17_utests_trie + - j11_build + - start_j11_utests_trie_repeat: + type: approval + - j11_utests_trie_repeat: + requires: + - start_j11_utests_trie_repeat + - j11_build + - start_j17_utests_trie_repeat: + type: approval + - j17_utests_trie_repeat: + requires: + - start_j17_utests_trie_repeat + - j11_build + - start_j11_utests_stress: + type: approval + - j11_utests_stress: + requires: + - start_j11_utests_stress + - j11_build + - start_j17_utests_stress: + type: approval + - j17_utests_stress: + requires: + - start_j17_utests_stress + - j11_build + - start_j11_utests_stress_repeat: + type: approval + - j11_utests_stress_repeat: + requires: + - start_j11_utests_stress_repeat + - j11_build + - start_j17_utests_stress_repeat: + type: approval + - j17_utests_stress_repeat: + requires: + - start_j17_utests_stress_repeat + - j11_build + - start_j11_utests_fqltool: + type: approval + - j11_utests_fqltool: + requires: + - start_j11_utests_fqltool + - j11_build + - start_j17_utests_fqltool: + type: approval + - j17_utests_fqltool: + requires: + - start_j17_utests_fqltool + - j11_build + - start_j11_utests_fqltool_repeat: + type: approval + - j11_utests_fqltool_repeat: + requires: + - start_j11_utests_fqltool_repeat + - j11_build + - start_j17_utests_fqltool_repeat: + type: approval + - j17_utests_fqltool_repeat: + requires: + - start_j17_utests_fqltool_repeat + - j11_build + - start_j11_utests_system_keyspace_directory: + type: approval + - j11_utests_system_keyspace_directory: + requires: + - start_j11_utests_system_keyspace_directory + - j11_build + - start_j17_utests_system_keyspace_directory: + type: approval + - j17_utests_system_keyspace_directory: + requires: + - start_j17_utests_system_keyspace_directory + - j11_build + - start_j11_utests_system_keyspace_directory_repeat: + type: approval + - j11_utests_system_keyspace_directory_repeat: + requires: + - start_j11_utests_system_keyspace_directory_repeat + - j11_build + - start_j17_utests_system_keyspace_directory_repeat: + type: approval + - j17_utests_system_keyspace_directory_repeat: + requires: + - start_j17_utests_system_keyspace_directory_repeat + - j11_build + # Java upgrade tests + - start_j11_dtest_jars_build: + type: approval + - j11_dtest_jars_build: + requires: + - j11_build + - start_j11_dtest_jars_build + - start_jvm_upgrade_dtests: + type: approval + - j11_jvm_upgrade_dtests: + requires: + - start_jvm_upgrade_dtests + - j11_dtest_jars_build + - start_jvm_upgrade_dtests_repeat: + type: approval + - j11_jvm_upgrade_dtests_repeat: + requires: + - start_jvm_upgrade_dtests_repeat + - j11_dtest_jars_build + # Python DTests - start_j11_dtests: type: approval - j11_dtests: @@ -1213,6 +587,7 @@ j11_separate_jobs: &j11_separate_jobs requires: - start_j11_dtests_vnode - j11_build + # Java 11 off-heap dtests - start_j11_dtests_offheap: type: approval - j11_dtests_offheap: @@ -1225,6 +600,33 @@ j11_separate_jobs: &j11_separate_jobs requires: - start_j11_dtests_offheap_repeat - j11_build + # Java 17 dtests + - start_j17_dtests: + type: approval + - j17_dtests: + requires: + - start_j17_dtests + - j11_build + - start_j17_dtests_vnode: + type: approval + - j17_dtests_vnode: + requires: + - start_j17_dtests_vnode + - j11_build + # Java 17 off-heap dtests + - start_j17_dtests_offheap: + type: approval + - j17_dtests_offheap: + requires: + - start_j17_dtests_offheap + - j11_build + - start_j17_dtests_offheap_repeat: + type: approval + - j17_dtests_offheap_repeat: + requires: + - start_j17_dtests_offheap_repeat + - j11_build + # Python large DTests - start_j11_dtests_large: type: approval - j11_dtests_large: @@ -1249,6 +651,31 @@ j11_separate_jobs: &j11_separate_jobs requires: - start_j11_dtests_large_vnode_repeat - j11_build + - start_j17_dtests_large: + type: approval + - j17_dtests_large: + requires: + - start_j17_dtests_large + - j11_build + - start_j17_dtests_large_repeat: + type: approval + - j17_dtests_large_repeat: + requires: + - start_j17_dtests_large_repeat + - j11_build + - start_j17_dtests_large_vnode: + type: approval + - j17_dtests_large_vnode: + requires: + - start_j17_dtests_large_vnode + - j11_build + - start_j17_dtests_large_vnode_repeat: + type: approval + - j17_dtests_large_vnode_repeat: + requires: + - start_j17_dtests_large_vnode_repeat + - j11_build + # Java 11 cqlsh dtests - start_j11_cqlsh_tests: type: approval - j11_cqlsh_dtests_py3: @@ -1269,142 +696,69 @@ j11_separate_jobs: &j11_separate_jobs - j11_build - j11_cqlsh_dtests_py38_vnode: requires: - - start_j11_cqlsh_tests - - j11_build + - start_j11_cqlsh_tests + - j11_build - j11_cqlsh_dtests_py311_vnode: requires: - - start_j11_cqlsh_tests - - j11_build - - start_j11_cqlsh-dtests-offheap: + - start_j11_cqlsh_tests + - j11_build + # Java 11 cqlsh offheap dtests offheap + - start_j11_cqlsh_tests_offheap: type: approval - j11_cqlsh_dtests_py3_offheap: requires: - - start_j11_cqlsh-dtests-offheap + - start_j11_cqlsh_tests_offheap - j11_build - j11_cqlsh_dtests_py38_offheap: requires: - - start_j11_cqlsh-dtests-offheap + - start_j11_cqlsh_tests_offheap - j11_build - j11_cqlsh_dtests_py311_offheap: requires: - - start_j11_cqlsh-dtests-offheap + - start_j11_cqlsh_tests_offheap - j11_build - # specialized unit tests (all run on request) - - start_j11_utests_oa: + # Java 17 cqlsh dtests + - start_j17_cqlsh_tests: type: approval - - j11_utests_oa: + - j17_cqlsh_dtests_py3: requires: - - start_j11_utests_oa + - start_j17_cqlsh_tests - j11_build - - start_j11_utests_oa_repeat: - type: approval - - j11_utests_oa_repeat: + - j17_cqlsh_dtests_py3_vnode: requires: - - start_j11_utests_oa_repeat + - start_j17_cqlsh_tests + - j11_build + - j17_cqlsh_dtests_py38: + requires: + - start_j17_cqlsh_tests - j11_build - - start_j11_utests_long: - type: approval - - j11_utests_long: + - j17_cqlsh_dtests_py311: requires: - - start_j11_utests_long + - start_j17_cqlsh_tests - j11_build - - start_j11_utests_long_repeat: - type: approval - - j11_utests_long_repeat: + - j17_cqlsh_dtests_py38_vnode: requires: - - start_j11_utests_long_repeat + - start_j17_cqlsh_tests - j11_build - - start_j11_utests_cdc: - type: approval - - j11_utests_cdc: + - j17_cqlsh_dtests_py311_vnode: requires: - - start_j11_utests_cdc + - start_j17_cqlsh_tests - j11_build - - start_j11_utests_cdc_repeat: + # Java 17 cqlsh dtests off-heap + - start_j17_cqlsh_tests_offheap: type: approval - - j11_utests_cdc_repeat: + - j17_cqlsh_dtests_py3_offheap: requires: - - start_j11_utests_cdc_repeat + - start_j17_cqlsh_tests_offheap - j11_build - - start_j11_utests_compression: - type: approval - - j11_utests_compression: + - j17_cqlsh_dtests_py38_offheap: requires: - - start_j11_utests_compression + - start_j17_cqlsh_tests_offheap - j11_build - - start_j11_utests_compression_repeat: - type: approval - - j11_utests_compression_repeat: + - j17_cqlsh_dtests_py311_offheap: requires: - - start_j11_utests_compression_repeat + - start_j17_cqlsh_tests_offheap - j11_build - - start_j11_utests_trie: - type: approval - - j11_utests_trie: - requires: - - start_j11_utests_trie - - j11_build - - start_j11_utests_trie_repeat: - type: approval - - j11_utests_trie_repeat: - requires: - - start_j11_utests_trie_repeat - - j11_build - - start_j11_utests_stress: - type: approval - - j11_utests_stress: - requires: - - start_j11_utests_stress - - j11_build - - start_j11_utests_stress_repeat: - type: approval - - j11_utests_stress_repeat: - requires: - - start_j11_utests_stress_repeat - - j11_build - - start_j11_utests_fqltool: - type: approval - - j11_utests_fqltool: - requires: - - start_j11_utests_fqltool - - j11_build - - start_j11_utests_fqltool_repeat: - type: approval - - j11_utests_fqltool_repeat: - requires: - - start_j11_utests_fqltool_repeat - - j11_build - - start_j11_utests_system_keyspace_directory: - type: approval - - j11_utests_system_keyspace_directory: - requires: - - start_j11_utests_system_keyspace_directory - - j11_build - - start_j11_utests_system_keyspace_directory_repeat: - type: approval - - j11_utests_system_keyspace_directory_repeat: - requires: - - start_j11_utests_system_keyspace_directory_repeat - - j11_build - # Java upgrade tests - - start_j11_dtest_jars_build: - type: approval - - j11_dtest_jars_build: - requires: - - j11_build - - start_j11_dtest_jars_build - - start_jvm_upgrade_dtests: - type: approval - - j11_jvm_upgrade_dtests: - requires: - - start_jvm_upgrade_dtests - - j11_dtest_jars_build - - start_jvm_upgrade_dtests_repeat: - type: approval - - j11_jvm_upgrade_dtests_repeat: - requires: - - start_jvm_upgrade_dtests_repeat - - j11_dtest_jars_build # Java 11 upgrade tests - start_j11_upgrade_dtests: type: approval @@ -1419,6 +773,13 @@ j11_separate_jobs: &j11_separate_jobs requires: - start_j11_repeated_ant_test - j11_build + # Java 17 repeated utest + - start_j17_repeated_ant_test: + type: approval + - j17_repeated_ant_test: + requires: + - start_j17_repeated_ant_test + - j11_build # Java 11 repeated dtest - start_j11_dtests_repeat: type: approval @@ -1432,6 +793,19 @@ j11_separate_jobs: &j11_separate_jobs requires: - start_j11_dtests_vnode_repeat - j11_build + # Java 17 repeated dtest + - start_j17_dtests_repeat: + type: approval + - j17_dtests_repeat: + requires: + - start_j17_dtests_repeat + - j11_build + - start_j17_dtests_vnode_repeat: + type: approval + - j17_dtests_vnode_repeat: + requires: + - start_j17_dtests_vnode_repeat + - j11_build # Repeated Python upgrade dtest - start_j11_upgrade_dtests_repeat: type: approval @@ -1447,6 +821,7 @@ j11_pre-commit_jobs: &j11_pre-commit_jobs - j11_build: requires: - start_pre-commit_tests + # Java 11 unit tests - j11_unit_tests: requires: - j11_build @@ -1456,9 +831,18 @@ j11_pre-commit_jobs: &j11_pre-commit_jobs - j11_utests_oa_repeat: requires: - j11_build + - j17_utests_oa_repeat: + requires: + - j11_build - j11_unit_tests_repeat: requires: - j11_build + - j11_simulator_dtests: + requires: + - j11_build + - j11_simulator_dtests_repeat: + requires: + - j11_build - j11_jvm_dtests: requires: - j11_build @@ -1471,10 +855,16 @@ j11_pre-commit_jobs: &j11_pre-commit_jobs - j11_jvm_dtests_vnode_repeat: requires: - j11_build - - j11_simulator_dtests: + - j17_jvm_dtests: requires: - j11_build - - j11_simulator_dtests_repeat: + - j17_jvm_dtests_repeat: + requires: + - j11_build + - j17_jvm_dtests_vnode: + requires: + - j11_build + - j17_jvm_dtests_vnode_repeat: requires: - j11_build - j11_cqlshlib_tests: @@ -1483,6 +873,161 @@ j11_pre-commit_jobs: &j11_pre-commit_jobs - j11_cqlshlib_cython_tests: requires: - j11_build + - j17_cqlshlib_tests: + requires: + - j11_build + - j17_cqlshlib_cython_tests: + requires: + - j11_build + # Java 17 unit tests + - j17_unit_tests: + requires: + - j11_build + - j17_utests_oa: + requires: + - j11_build + - j17_unit_tests_repeat: + requires: + - j11_build + # specialized unit tests (all run on request) + - start_utests_long: + type: approval + - j11_utests_long: + requires: + - start_utests_long + - j11_build + - j17_utests_long: + requires: + - start_utests_long + - j11_build + - j11_utests_long_repeat: + requires: + - start_utests_long + - j11_build + - j17_utests_long_repeat: + requires: + - start_utests_long + - j11_build + - start_utests_cdc: + type: approval + - j11_utests_cdc: + requires: + - start_utests_cdc + - j11_build + - j17_utests_cdc: + requires: + - start_utests_cdc + - j11_build + - j11_utests_cdc_repeat: + requires: + - start_utests_cdc + - j11_build + - j17_utests_cdc_repeat: + requires: + - start_utests_cdc + - j11_build + - start_utests_compression: + type: approval + - j11_utests_compression: + requires: + - start_utests_compression + - j11_build + - j17_utests_compression: + requires: + - start_utests_compression + - j11_build + - j11_utests_compression_repeat: + requires: + - start_utests_compression + - j11_build + - j17_utests_compression_repeat: + requires: + - start_utests_compression + - j11_build + - start_utests_trie: + type: approval + - j11_utests_trie: + requires: + - start_utests_trie + - j11_build + - j17_utests_trie: + requires: + - start_utests_trie + - j11_build + - j11_utests_trie_repeat: + requires: + - start_utests_trie + - j11_build + - j17_utests_trie_repeat: + requires: + - start_utests_trie + - j11_build + - start_utests_stress: + type: approval + - j11_utests_stress: + requires: + - start_utests_stress + - j11_build + - j17_utests_stress: + requires: + - start_utests_stress + - j11_build + - j11_utests_stress_repeat: + requires: + - start_utests_stress + - j11_build + - j17_utests_stress_repeat: + requires: + - start_utests_stress + - j11_build + - start_utests_fqltool: + type: approval + - j11_utests_fqltool: + requires: + - start_utests_fqltool + - j11_build + - j17_utests_fqltool: + requires: + - start_utests_fqltool + - j11_build + - j11_utests_fqltool_repeat: + requires: + - start_utests_fqltool + - j11_build + - j17_utests_fqltool_repeat: + requires: + - start_utests_fqltool + - j11_build + - start_utests_system_keyspace_directory: + type: approval + - j11_utests_system_keyspace_directory: + requires: + - j11_build + - j17_utests_system_keyspace_directory: + requires: + - start_utests_system_keyspace_directory + - j11_build + - j11_utests_system_keyspace_directory_repeat: + requires: + - j11_build + - j17_utests_system_keyspace_directory_repeat: + requires: + - start_utests_system_keyspace_directory + - j11_build + # Java upgrade tests + - start_jvm_upgrade_dtests: + type: approval + - j11_dtest_jars_build: + requires: + - j11_build + - start_jvm_upgrade_dtests + - j11_jvm_upgrade_dtests: + requires: + - j11_dtest_jars_build + - j11_jvm_upgrade_dtests_repeat: + requires: + - j11_dtest_jars_build + # Python DTests - j11_dtests: requires: - j11_build @@ -1501,12 +1046,34 @@ j11_pre-commit_jobs: &j11_pre-commit_jobs requires: - start_j11_dtests_offheap - j11_build - - start_j11_dtests_offheap_repeat: - type: approval - j11_dtests_offheap_repeat: requires: - - start_j11_dtests_offheap_repeat + - start_j11_dtests_offheap - j11_build + # Java 17 dtests + - j17_dtests: + requires: + - j11_build + - j17_dtests_repeat: + requires: + - j11_build + - j17_dtests_vnode: + requires: + - j11_build + - j17_dtests_vnode_repeat: + requires: + - j11_build + - start_j17_dtests_offheap: + type: approval + - j17_dtests_offheap: + requires: + - start_j17_dtests_offheap + - j11_build + - j17_dtests_offheap_repeat: + requires: + - start_j17_dtests_offheap + - j11_build + # Large Python DTests - start_j11_dtests_large: type: approval - j11_dtests_large: @@ -1525,6 +1092,25 @@ j11_pre-commit_jobs: &j11_pre-commit_jobs requires: - start_j11_dtests_large - j11_build + - start_j17_dtests_large: + type: approval + - j17_dtests_large: + requires: + - start_j17_dtests_large + - j11_build + - j17_dtests_large_repeat: + requires: + - start_j17_dtests_large + - j11_build + - j17_dtests_large_vnode: + requires: + - start_j17_dtests_large + - j11_build + - j17_dtests_large_vnode_repeat: + requires: + - start_j17_dtests_large + - j11_build + # Java 11 cqlsh dtests - j11_cqlsh_dtests_py3: requires: - j11_build @@ -1543,104 +1129,55 @@ j11_pre-commit_jobs: &j11_pre-commit_jobs - j11_cqlsh_dtests_py311_vnode: requires: - j11_build - - start_j11_cqlsh-dtests-offheap: + # Java 11 cqlsh dtests offheap + - start_j11_cqlsh_dtests_offheap: type: approval - j11_cqlsh_dtests_py3_offheap: requires: - - start_j11_cqlsh-dtests-offheap + - start_j11_cqlsh_dtests_offheap - j11_build - j11_cqlsh_dtests_py38_offheap: requires: - - start_j11_cqlsh-dtests-offheap + - start_j11_cqlsh_dtests_offheap - j11_build - j11_cqlsh_dtests_py311_offheap: requires: - - start_j11_cqlsh-dtests-offheap + - start_j11_cqlsh_dtests_offheap - j11_build - # specialized unit tests (all run on request) - - start_utests_long: + # Java 17 cqlsh dtests + - j17_cqlsh_dtests_py3: + requires: + - j11_build + - j17_cqlsh_dtests_py3_vnode: + requires: + - j11_build + - j17_cqlsh_dtests_py38: + requires: + - j11_build + - j17_cqlsh_dtests_py311: + requires: + - j11_build + - j17_cqlsh_dtests_py38_vnode: + requires: + - j11_build + - j17_cqlsh_dtests_py311_vnode: + requires: + - j11_build + # Java 17 cqlsh dtests off-heap + - start_j17_cqlsh-dtests-offheap: type: approval - - j11_utests_long: + - j17_cqlsh_dtests_py3_offheap: requires: - - start_utests_long + - start_j17_cqlsh-dtests-offheap - j11_build - - j11_utests_long_repeat: + - j17_cqlsh_dtests_py38_offheap: requires: - - start_utests_long + - start_j17_cqlsh-dtests-offheap - j11_build - - start_utests_cdc: - type: approval - - j11_utests_cdc: + - j17_cqlsh_dtests_py311_offheap: requires: - - start_utests_cdc + - start_j17_cqlsh-dtests-offheap - j11_build - - j11_utests_cdc_repeat: - requires: - - start_utests_cdc - - j11_build - - start_utests_compression: - type: approval - - j11_utests_compression: - requires: - - start_utests_compression - - j11_build - - j11_utests_compression_repeat: - requires: - - start_utests_compression - - j11_build - - start_utests_trie: - type: approval - - j11_utests_trie: - requires: - - start_utests_trie - - j11_build - - j11_utests_trie_repeat: - requires: - - start_utests_trie - - j11_build - - start_utests_stress: - type: approval - - j11_utests_stress: - requires: - - start_utests_stress - - j11_build - - j11_utests_stress_repeat: - requires: - - start_utests_stress - - j11_build - - start_utests_fqltool: - type: approval - - j11_utests_fqltool: - requires: - - start_utests_fqltool - - j11_build - - j11_utests_fqltool_repeat: - requires: - - start_utests_fqltool - - j11_build - - start_utests_system_keyspace_directory: - type: approval - - j11_utests_system_keyspace_directory: - requires: - - start_utests_system_keyspace_directory - - j11_build - - j11_utests_system_keyspace_directory_repeat: - requires: - - start_utests_system_keyspace_directory - - j11_build - # Java upgrade tests - - start_jvm_upgrade_dtests: - type: approval - - j11_dtest_jars_build: - requires: - - j11_build - - start_jvm_upgrade_dtests - - j11_jvm_upgrade_dtests: - requires: - - j11_dtest_jars_build - - j11_jvm_upgrade_dtests_repeat: - requires: - - j11_dtest_jars_build # Java 11 upgrade tests (on request) - start_j11_upgrade_dtests: type: approval @@ -1653,15 +1190,461 @@ j11_pre-commit_jobs: &j11_pre-commit_jobs - j11_build - start_j11_upgrade_dtests +j17_separate_jobs: &j17_separate_jobs + jobs: + - start_j17_build: + type: approval + - j17_build: + requires: + - start_j17_build + # Java 17 unit tests + - start_j17_unit_tests: + type: approval + - j17_unit_tests: + requires: + - start_j17_unit_tests + - j17_build + - start_j17_unit_tests_repeat: + type: approval + - j17_unit_tests_repeat: + requires: + - start_j17_unit_tests_repeat + - j17_build + - start_j17_jvm_dtests: + type: approval + - j17_jvm_dtests: + requires: + - start_j17_jvm_dtests + - j17_build + - start_j17_jvm_dtests_vnode: + type: approval + - j17_jvm_dtests_vnode: + requires: + - start_j17_jvm_dtests_vnode + - j17_build + - start_j17_jvm_dtests_repeat: + type: approval + - j17_jvm_dtests_repeat: + requires: + - start_j17_jvm_dtests_repeat + - j17_build + - start_j17_jvm_dtests_vnode_repeat: + type: approval + - j17_jvm_dtests_vnode_repeat: + requires: + - start_j17_jvm_dtests_vnode_repeat + - j17_build + - start_j17_cqlshlib_tests: + type: approval + - j17_cqlshlib_tests: + requires: + - start_j17_cqlshlib_tests + - j17_build + - start_j17_cqlshlib_cython_tests: + type: approval + - j17_cqlshlib_cython_tests: + requires: + - start_j17_cqlshlib_cython_tests + - j17_build + # Java 17 dtests + - start_j17_dtests: + type: approval + - j17_dtests: + requires: + - start_j17_dtests + - j17_build + - start_j17_dtests_vnode: + type: approval + - j17_dtests_vnode: + requires: + - start_j17_dtests_vnode + - j17_build + - start_j17_dtests_offheap: + type: approval + - j17_dtests_offheap: + requires: + - start_j17_dtests_offheap + - j17_build + - start_j17_dtests_offheap_repeat: + type: approval + - j17_dtests_offheap_repeat: + requires: + - start_j17_dtests_offheap_repeat + - j17_build + - start_j17_dtests_large: + type: approval + - j17_dtests_large: + requires: + - start_j17_dtests_large + - j17_build + - start_j17_dtests_large_repeat: + type: approval + - j17_dtests_large_repeat: + requires: + - start_j17_dtests_large_repeat + - j17_build + - start_j17_dtests_large_vnode: + type: approval + - j17_dtests_large_vnode: + requires: + - start_j17_dtests_large_vnode + - j17_build + - start_j17_dtests_large_vnode_repeat: + type: approval + - j17_dtests_large_vnode_repeat: + requires: + - start_j17_dtests_large_vnode_repeat + - j17_build + - start_j17_cqlsh_tests: + type: approval + - j17_cqlsh_dtests_py3: + requires: + - start_j17_cqlsh_tests + - j17_build + - j17_cqlsh_dtests_py3_vnode: + requires: + - start_j17_cqlsh_tests + - j17_build + - j17_cqlsh_dtests_py38: + requires: + - start_j17_cqlsh_tests + - j17_build + - j17_cqlsh_dtests_py311: + requires: + - start_j17_cqlsh_tests + - j17_build + - j17_cqlsh_dtests_py38_vnode: + requires: + - start_j17_cqlsh_tests + - j17_build + - j17_cqlsh_dtests_py311_vnode: + requires: + - start_j17_cqlsh_tests + - j17_build + - start_j17_cqlsh-dtests-offheap: + type: approval + - j17_cqlsh_dtests_py3_offheap: + requires: + - start_j17_cqlsh-dtests-offheap + - j17_build + - j17_cqlsh_dtests_py38_offheap: + requires: + - start_j17_cqlsh-dtests-offheap + - j17_build + - j17_cqlsh_dtests_py311_offheap: + requires: + - start_j17_cqlsh-dtests-offheap + - j17_build + # specialized unit tests (all run on request) + - start_j17_utests_oa: + type: approval + - j17_utests_oa: + requires: + - start_j17_utests_oa + - j17_build + - start_j17_utests_oa_repeat: + type: approval + - j17_utests_oa_repeat: + requires: + - start_j17_utests_oa_repeat + - j17_build + - start_j17_utests_long: + type: approval + - j17_utests_long: + requires: + - start_j17_utests_long + - j17_build + - start_j17_utests_long_repeat: + type: approval + - j17_utests_long_repeat: + requires: + - start_j17_utests_long_repeat + - j17_build + - start_j17_utests_cdc: + type: approval + - j17_utests_cdc: + requires: + - start_j17_utests_cdc + - j17_build + - start_j17_utests_cdc_repeat: + type: approval + - j17_utests_cdc_repeat: + requires: + - start_j17_utests_cdc_repeat + - j17_build + - start_j17_utests_compression: + type: approval + - j17_utests_compression: + requires: + - start_j17_utests_compression + - j17_build + - start_j17_utests_compression_repeat: + type: approval + - j17_utests_compression_repeat: + requires: + - start_j17_utests_compression_repeat + - j17_build + - start_j17_utests_trie: + type: approval + - j17_utests_trie: + requires: + - start_j17_utests_trie + - j17_build + - start_j17_utests_trie_repeat: + type: approval + - j17_utests_trie_repeat: + requires: + - start_j17_utests_trie_repeat + - j17_build + - start_j17_utests_stress: + type: approval + - j17_utests_stress: + requires: + - start_j17_utests_stress + - j17_build + - start_j17_utests_stress_repeat: + type: approval + - j17_utests_stress_repeat: + requires: + - start_j17_utests_stress_repeat + - j17_build + - start_j17_utests_fqltool: + type: approval + - j17_utests_fqltool: + requires: + - start_j17_utests_fqltool + - j17_build + - start_j17_utests_fqltool_repeat: + type: approval + - j17_utests_fqltool_repeat: + requires: + - start_j17_utests_fqltool_repeat + - j17_build + - start_j17_utests_system_keyspace_directory: + type: approval + - j17_utests_system_keyspace_directory: + requires: + - start_j17_utests_system_keyspace_directory + - j17_build + - start_j17_utests_system_keyspace_directory_repeat: + type: approval + - j17_utests_system_keyspace_directory_repeat: + requires: + - start_j17_utests_system_keyspace_directory_repeat + - j17_build + # Java 17 repeated utest + - start_j17_repeated_ant_test: + type: approval + - j17_repeated_ant_test: + requires: + - start_j17_repeated_ant_test + - j17_build + # Java 17 repeated dtest + - start_j17_dtests_repeat: + type: approval + - j17_dtests_repeat: + requires: + - start_j17_dtests_repeat + - j17_build + - start_j17_dtests_vnode_repeat: + type: approval + - j17_dtests_vnode_repeat: + requires: + - start_j17_dtests_vnode_repeat + - j17_build + +j17_pre-commit_jobs: &j17_pre-commit_jobs + jobs: + - start_pre-commit_tests: + type: approval + - j17_build: + requires: + - start_pre-commit_tests + - j17_unit_tests: + requires: + - j17_build + - j17_utests_oa: + requires: + - j17_build + - j17_utests_oa_repeat: + requires: + - j17_build + - j17_unit_tests_repeat: + requires: + - j17_build + - j17_jvm_dtests: + requires: + - j17_build + - j17_jvm_dtests_repeat: + requires: + - j17_build + - j17_jvm_dtests_vnode: + requires: + - j17_build + - j17_jvm_dtests_vnode_repeat: + requires: + - j17_build + - j17_cqlshlib_tests: + requires: + - j17_build + - j17_cqlshlib_cython_tests: + requires: + - j17_build + - j17_dtests: + requires: + - j17_build + - j17_dtests_repeat: + requires: + - j17_build + - j17_dtests_vnode: + requires: + - j17_build + - j17_dtests_vnode_repeat: + requires: + - j17_build + - start_j17_dtests_offheap: + type: approval + - j17_dtests_offheap: + requires: + - start_j17_dtests_offheap + - j17_build + - start_j17_dtests_offheap_repeat: + type: approval + - j17_dtests_offheap_repeat: + requires: + - start_j17_dtests_offheap_repeat + - j17_build + - start_j17_dtests_large: + type: approval + - j17_dtests_large: + requires: + - start_j17_dtests_large + - j17_build + - j17_dtests_large_repeat: + requires: + - start_j17_dtests_large + - j17_build + - j17_dtests_large_vnode: + requires: + - start_j17_dtests_large + - j17_build + - j17_dtests_large_vnode_repeat: + requires: + - start_j17_dtests_large + - j17_build + - j17_cqlsh_dtests_py3: + requires: + - j17_build + - j17_cqlsh_dtests_py3_vnode: + requires: + - j17_build + - j17_cqlsh_dtests_py38: + requires: + - j17_build + - j17_cqlsh_dtests_py311: + requires: + - j17_build + - j17_cqlsh_dtests_py38_vnode: + requires: + - j17_build + - j17_cqlsh_dtests_py311_vnode: + requires: + - j17_build + - start_j17_cqlsh-dtests-offheap: + type: approval + - j17_cqlsh_dtests_py3_offheap: + requires: + - start_j17_cqlsh-dtests-offheap + - j17_build + - j17_cqlsh_dtests_py38_offheap: + requires: + - start_j17_cqlsh-dtests-offheap + - j17_build + - j17_cqlsh_dtests_py311_offheap: + requires: + - start_j17_cqlsh-dtests-offheap + - j17_build + # specialized unit tests (all run on request) + - start_utests_long: + type: approval + - j17_utests_long: + requires: + - start_utests_long + - j17_build + - j17_utests_long_repeat: + requires: + - start_utests_long + - j17_build + - start_utests_cdc: + type: approval + - j17_utests_cdc: + requires: + - start_utests_cdc + - j17_build + - j17_utests_cdc_repeat: + requires: + - start_utests_cdc + - j17_build + - start_utests_compression: + type: approval + - j17_utests_compression: + requires: + - start_utests_compression + - j17_build + - j17_utests_compression_repeat: + requires: + - start_utests_compression + - j17_build + - start_utests_trie: + type: approval + - j17_utests_trie: + requires: + - start_utests_trie + - j17_build + - j17_utests_trie_repeat: + requires: + - start_utests_trie + - j17_build + - start_utests_stress: + type: approval + - j17_utests_stress: + requires: + - start_utests_stress + - j17_build + - j17_utests_stress_repeat: + requires: + - start_utests_stress + - j17_build + - start_utests_fqltool: + type: approval + - j17_utests_fqltool: + requires: + - start_utests_fqltool + - j17_build + - j17_utests_fqltool_repeat: + requires: + - start_utests_fqltool + - j17_build + - start_utests_system_keyspace_directory: + type: approval + - j17_utests_system_keyspace_directory: + requires: + - start_utests_system_keyspace_directory + - j17_build + - j17_utests_system_keyspace_directory_repeat: + requires: + - start_utests_system_keyspace_directory + - j17_build + workflows: version: 2 - java8_separate_tests: *j8_separate_jobs - java8_pre-commit_tests: *j8_pre-commit_jobs java11_separate_tests: *j11_separate_jobs java11_pre-commit_tests: *j11_pre-commit_jobs + java17_separate_tests: *j17_separate_jobs + java17_pre-commit_tests: *j17_pre-commit_jobs executors: - java8-executor: + java11-executor: parameters: exec_resource_class: type: string @@ -1673,10 +1656,11 @@ executors: shell: /bin/bash -eo pipefail -l environment: <<: *default_env_vars - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64 + JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 + CASSANDRA_USE_JDK11: true - java11-executor: + java17-executor: parameters: exec_resource_class: type: string @@ -1688,9 +1672,8 @@ executors: shell: /bin/bash -eo pipefail -l environment: <<: *default_env_vars - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - CASSANDRA_USE_JDK11: true + JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 + JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 build_common: &build_common parallelism: 1 # This job doesn't benefit from parallelism @@ -1706,14 +1689,14 @@ build_common: &build_common - .m2 jobs: - j8_build: - executor: java8-executor - <<: *build_common - j11_build: executor: java11-executor <<: *build_common + j17_build: + executor: java17-executor + <<: *build_common + j11_dtest_jars_build: executor: java11-executor parallelism: 1 @@ -1726,8 +1709,8 @@ jobs: paths: - dtest_jars - j8_unit_tests: - <<: *j8_par_executor + j11_unit_tests: + <<: *j11_par_executor steps: - attach_workspace: at: /home/cassandra @@ -1735,8 +1718,8 @@ jobs: - log_environment - run_parallel_junit_tests - j8_utests_oa: - <<: *j8_par_executor + j11_utests_oa: + <<: *j11_par_executor steps: - attach_workspace: at: /home/cassandra @@ -1745,15 +1728,6 @@ jobs: - run_parallel_junit_tests: target: "testclasslist-oa" - j8_simulator_dtests: - <<: *j8_small_executor - steps: - - attach_workspace: - at: /home/cassandra - - create_junit_containers - - log_environment - - run_simulator_tests - j11_simulator_dtests: <<: *j11_small_executor steps: @@ -1763,33 +1737,6 @@ jobs: - log_environment - run_simulator_tests - j8_jvm_dtests: - <<: *j8_small_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - create_junit_containers: - classlistprefix: distributed - extra_filters: "| grep -v upgrade" - - log_environment - - run_parallel_junit_tests: - classlistprefix: distributed - target: "testclasslist" - - j8_jvm_dtests_vnode: - <<: *j8_small_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - create_junit_containers: - classlistprefix: distributed - extra_filters: "| grep -v upgrade" - - log_environment - - run_parallel_junit_tests: - classlistprefix: distributed - target: "testclasslist" - arguments: "-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'" - j11_jvm_dtests: <<: *j11_small_par_executor steps: @@ -1817,6 +1764,19 @@ jobs: target: "testclasslist" arguments: "-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'" + j17_jvm_dtests: + <<: *j17_small_par_executor + steps: + - attach_workspace: + at: /home/cassandra + - create_junit_containers: + classlistprefix: distributed + extra_filters: "| grep -v upgrade" + - log_environment + - run_parallel_junit_tests: + classlistprefix: distributed + target: "testclasslist" + j11_jvm_upgrade_dtests: <<: *j11_medium_par_executor steps: @@ -1830,8 +1790,22 @@ jobs: classlistprefix: distributed target: "testclasslist" - j11_unit_tests: - <<: *j11_par_executor + j17_jvm_dtests_vnode: + <<: *j17_small_par_executor + steps: + - attach_workspace: + at: /home/cassandra + - create_junit_containers: + classlistprefix: distributed + extra_filters: "| grep -v upgrade" + - log_environment + - run_parallel_junit_tests: + classlistprefix: distributed + target: "testclasslist" + arguments: "-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'" + + j17_unit_tests: + <<: *j17_par_executor steps: - attach_workspace: at: /home/cassandra @@ -1839,8 +1813,8 @@ jobs: - log_environment - run_parallel_junit_tests - j11_utests_oa: - <<: *j11_par_executor + j17_utests_oa: + <<: *j17_par_executor steps: - attach_workspace: at: /home/cassandra @@ -1849,20 +1823,6 @@ jobs: - run_parallel_junit_tests: target: "testclasslist-oa" - j8_cqlshlib_tests: - <<: *j8_small_executor - steps: - - attach_workspace: - at: /home/cassandra - - run_cqlshlib_tests - - j8_cqlshlib_cython_tests: - <<: *j8_small_executor - steps: - - attach_workspace: - at: /home/cassandra - - run_cqlshlib_cython_tests - j11_cqlshlib_tests: <<: *j11_small_executor steps: @@ -1877,13 +1837,19 @@ jobs: at: /home/cassandra - run_cqlshlib_cython_tests - j8_utests_long: - <<: *j8_seq_executor + j17_cqlshlib_tests: + <<: *j17_small_executor steps: - attach_workspace: at: /home/cassandra - - run_junit_tests: - target: long-test + - run_cqlshlib_tests + + j17_cqlshlib_cython_tests: + <<: *j17_small_executor + steps: + - attach_workspace: + at: /home/cassandra + - run_cqlshlib_cython_tests j11_utests_long: <<: *j11_seq_executor @@ -1893,15 +1859,13 @@ jobs: - run_junit_tests: target: long-test - j8_utests_cdc: - <<: *j8_par_executor + j17_utests_long: + <<: *j17_seq_executor steps: - attach_workspace: at: /home/cassandra - - create_junit_containers - - log_environment - - run_parallel_junit_tests: - target: testclasslist-cdc + - run_junit_tests: + target: long-test j11_utests_cdc: <<: *j11_par_executor @@ -1913,15 +1877,15 @@ jobs: - run_parallel_junit_tests: target: testclasslist-cdc - j8_utests_compression: - <<: *j8_par_executor + j17_utests_cdc: + <<: *j17_par_executor steps: - attach_workspace: at: /home/cassandra - create_junit_containers - log_environment - run_parallel_junit_tests: - target: testclasslist-compression + target: testclasslist-cdc j11_utests_compression: <<: *j11_par_executor @@ -1933,15 +1897,15 @@ jobs: - run_parallel_junit_tests: target: testclasslist-compression - j8_utests_trie: - <<: *j8_par_executor + j17_utests_compression: + <<: *j17_par_executor steps: - attach_workspace: at: /home/cassandra - create_junit_containers - log_environment - run_parallel_junit_tests: - target: testclasslist-trie + target: testclasslist-compression j11_utests_trie: <<: *j11_par_executor @@ -1953,13 +1917,15 @@ jobs: - run_parallel_junit_tests: target: testclasslist-trie - j8_utests_stress: - <<: *j8_seq_executor + j17_utests_trie: + <<: *j17_par_executor steps: - attach_workspace: at: /home/cassandra - - run_junit_tests: - target: stress-test + - create_junit_containers + - log_environment + - run_parallel_junit_tests: + target: testclasslist-trie j11_utests_stress: <<: *j11_seq_executor @@ -1969,13 +1935,13 @@ jobs: - run_junit_tests: target: stress-test - j8_utests_fqltool: - <<: *j8_seq_executor + j17_utests_stress: + <<: *j17_seq_executor steps: - attach_workspace: at: /home/cassandra - run_junit_tests: - target: fqltool-test + target: stress-test j11_utests_fqltool: <<: *j11_seq_executor @@ -1985,15 +1951,13 @@ jobs: - run_junit_tests: target: fqltool-test - j8_utests_system_keyspace_directory: - <<: *j8_par_executor + j17_utests_fqltool: + <<: *j17_seq_executor steps: - attach_workspace: at: /home/cassandra - - create_junit_containers - - log_environment - - run_parallel_junit_tests: - target: testclasslist-system-keyspace-directory + - run_junit_tests: + target: fqltool-test j11_utests_system_keyspace_directory: <<: *j11_par_executor @@ -2005,36 +1969,46 @@ jobs: - run_parallel_junit_tests: target: testclasslist-system-keyspace-directory - j8_dtests_vnode: - <<: *j8_par_executor + j17_utests_system_keyspace_directory: + <<: *j17_par_executor steps: - attach_workspace: at: /home/cassandra - - clone_dtest - - create_venv - - create_dtest_containers: - file_tag: j8_with_vnodes - run_dtests_extra_args: "--use-vnodes --skip-resource-intensive-tests --pytest-options '-k not cql'" - - run_dtests: - file_tag: j8_with_vnodes - pytest_extra_args: '--use-vnodes --num-tokens=16 --skip-resource-intensive-tests' - - j8_dtests_offheap: - <<: *j8_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - 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 --pytest-options '-k not cql'" - - run_dtests: - file_tag: j8_dtests_offheap - pytest_extra_args: '--use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests' + - create_junit_containers + - log_environment + - run_parallel_junit_tests: + target: testclasslist-system-keyspace-directory j11_dtests_vnode: <<: *j11_par_executor + steps: + - attach_workspace: + at: /home/cassandra + - clone_dtest + - create_venv + - create_dtest_containers: + file_tag: j11_with_vnodes + run_dtests_extra_args: "--use-vnodes --skip-resource-intensive-tests --pytest-options '-k not cql'" + - run_dtests: + file_tag: j11_with_vnodes + pytest_extra_args: '--use-vnodes --num-tokens=16 --skip-resource-intensive-tests' + + j11_dtests_offheap: + <<: *j11_par_executor + steps: + - attach_workspace: + at: /home/cassandra + - clone_dtest + - create_venv + - create_dtest_containers: + file_tag: j11_dtests_offheap + run_dtests_extra_args: "--use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k not cql'" + - run_dtests: + file_tag: j11_dtests_offheap + pytest_extra_args: '--use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests' + + j17_dtests_vnode: + <<: *j17_par_executor steps: - attach_workspace: at: /home/cassandra @@ -2042,14 +2016,14 @@ jobs: - clone_dtest - create_venv - create_dtest_containers: - file_tag: j11_with_vnodes + file_tag: j17_with_vnodes run_dtests_extra_args: "--use-vnodes --skip-resource-intensive-tests --pytest-options '-k not cql'" - run_dtests: - file_tag: j11_with_vnodes + file_tag: j17_with_vnodes pytest_extra_args: '--use-vnodes --num-tokens=16 --skip-resource-intensive-tests' - j11_dtests_offheap: - <<: *j11_par_executor + j17_dtests_offheap: + <<: *j17_par_executor steps: - attach_workspace: at: /home/cassandra @@ -2057,28 +2031,28 @@ jobs: - clone_dtest - create_venv - create_dtest_containers: - file_tag: j11_dtests_offheap + file_tag: j17_dtests_offheap run_dtests_extra_args: "--use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k not cql'" - run_dtests: - file_tag: j11_dtests_offheap + file_tag: j17_dtests_offheap pytest_extra_args: '--use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests' - j8_dtests: - <<: *j8_par_executor + j11_dtests: + <<: *j11_par_executor steps: - attach_workspace: at: /home/cassandra - clone_dtest - create_venv - create_dtest_containers: - file_tag: j8_without_vnodes + file_tag: j11_without_vnodes run_dtests_extra_args: "--skip-resource-intensive-tests --pytest-options '-k not cql'" - run_dtests: - file_tag: j8_without_vnodes + file_tag: j11_without_vnodes pytest_extra_args: '--skip-resource-intensive-tests' - j11_dtests: - <<: *j11_par_executor + j17_dtests: + <<: *j17_par_executor steps: - attach_workspace: at: /home/cassandra @@ -2086,178 +2060,25 @@ jobs: - clone_dtest - create_venv - create_dtest_containers: - file_tag: j11_without_vnodes + file_tag: j17_without_vnodes run_dtests_extra_args: "--skip-resource-intensive-tests --pytest-options '-k not cql'" - run_dtests: - file_tag: j11_without_vnodes + file_tag: j17_without_vnodes pytest_extra_args: '--skip-resource-intensive-tests' j11_upgrade_dtests: <<: *j11_par_executor steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv - - create_dtest_containers: - file_tag: j11_upgradetests_without_vnodes - run_dtests_extra_args: '--execute-upgrade-tests-only --upgrade-target-version-only --upgrade-version-selection all' - - run_dtests: - file_tag: j11_upgradetests_without_vnodes - pytest_extra_args: '--execute-upgrade-tests-only --upgrade-target-version-only --upgrade-version-selection all' - - j8_cqlsh_dtests_py3_vnode: - <<: *j8_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv - - create_dtest_containers: - file_tag: j8_with_vnodes - run_dtests_extra_args: "--use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql'" - - run_dtests: - file_tag: j8_with_vnodes - pytest_extra_args: '--use-vnodes --num-tokens=16 --skip-resource-intensive-tests' - extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6' - - j8_cqlsh_dtests_py3_offheap: - <<: *j8_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - 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 --pytest-options '-k cql'" - - run_dtests: - file_tag: j8_dtests_offheap - pytest_extra_args: '--use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests' - extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6' - - j8_cqlsh_dtests_py38_vnode: - <<: *j8_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv: - python_version: '3.8' - - create_dtest_containers: - file_tag: j8_with_vnodes - run_dtests_extra_args: "--use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql'" - python_version: '3.8' - - run_dtests: - file_tag: j8_with_vnodes - pytest_extra_args: '--use-vnodes --num-tokens=16 --skip-resource-intensive-tests' - extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.8' - python_version: '3.8' - - j8_cqlsh_dtests_py311_vnode: - <<: *j8_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv: - python_version: '3.11' - - create_dtest_containers: - file_tag: j8_with_vnodes - run_dtests_extra_args: "--use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql'" - python_version: '3.11' - - run_dtests: - file_tag: j8_with_vnodes - pytest_extra_args: '--use-vnodes --num-tokens=16 --skip-resource-intensive-tests' - extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.11' - python_version: '3.11' - - j8_cqlsh_dtests_py38_offheap: - <<: *j8_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv: - python_version: '3.8' - - create_dtest_containers: - file_tag: j8_dtests_offheap - run_dtests_extra_args: "--use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql'" - python_version: '3.8' - - run_dtests: - file_tag: j8_dtests_offheap - pytest_extra_args: '--use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests' - extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.8' - python_version: '3.8' - - j8_cqlsh_dtests_py311_offheap: - <<: *j8_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv: - python_version: '3.11' - - create_dtest_containers: - file_tag: j8_dtests_offheap - run_dtests_extra_args: "--use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql'" - python_version: '3.11' - - run_dtests: - file_tag: j8_dtests_offheap - pytest_extra_args: '--use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests' - extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.11' - python_version: '3.11' - - j8_cqlsh_dtests_py3: - <<: *j8_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv - - create_dtest_containers: - file_tag: j8_without_vnodes - run_dtests_extra_args: "--skip-resource-intensive-tests --pytest-options '-k cql'" - - run_dtests: - file_tag: j8_without_vnodes - pytest_extra_args: '--skip-resource-intensive-tests' - extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6' - - j8_cqlsh_dtests_py38: - <<: *j8_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv: - python_version: '3.8' - - create_dtest_containers: - file_tag: j8_without_vnodes - run_dtests_extra_args: "--skip-resource-intensive-tests --pytest-options '-k cql'" - python_version: '3.8' - - run_dtests: - file_tag: j8_without_vnodes - pytest_extra_args: '--skip-resource-intensive-tests' - extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.8' - python_version: '3.8' - - j8_cqlsh_dtests_py311: - <<: *j8_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv: - python_version: '3.11' - - create_dtest_containers: - file_tag: j8_without_vnodes - run_dtests_extra_args: "--skip-resource-intensive-tests --pytest-options '-k cql'" - python_version: '3.11' - - run_dtests: - file_tag: j8_without_vnodes - pytest_extra_args: '--skip-resource-intensive-tests' - extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.11' - python_version: '3.11' + - attach_workspace: + at: /home/cassandra + - clone_dtest + - create_venv + - create_dtest_containers: + file_tag: j11_upgradetests_without_vnodes + run_dtests_extra_args: '--execute-upgrade-tests-only --upgrade-target-version-only --upgrade-version-selection all' + - run_dtests: + file_tag: j11_upgradetests_without_vnodes + pytest_extra_args: '--execute-upgrade-tests-only --upgrade-target-version-only --upgrade-version-selection all' j11_cqlsh_dtests_py3_vnode: <<: *j11_par_executor @@ -2412,33 +2233,158 @@ jobs: extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.11' python_version: '3.11' - j8_dtests_large_vnode: - <<: *j8_par_executor + j17_cqlsh_dtests_py3_vnode: + <<: *j17_par_executor steps: - attach_workspace: at: /home/cassandra - clone_dtest - create_venv - create_dtest_containers: - file_tag: j8_large_with_vnodes - run_dtests_extra_args: '--use-vnodes --only-resource-intensive-tests --force-resource-intensive-tests' + file_tag: j17_with_vnodes + run_dtests_extra_args: "--use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql'" - run_dtests: - file_tag: j8_large_with_vnodes - pytest_extra_args: '--use-vnodes --num-tokens=16 --only-resource-intensive-tests --force-resource-intensive-tests' + file_tag: j17_with_vnodes + pytest_extra_args: '--use-vnodes --num-tokens=16 --skip-resource-intensive-tests' + extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6' - j8_dtests_large: - <<: *j8_par_executor + j17_cqlsh_dtests_py3_offheap: + <<: *j17_par_executor steps: - attach_workspace: at: /home/cassandra - clone_dtest - create_venv - create_dtest_containers: - file_tag: j8_large_without_vnodes - run_dtests_extra_args: '--only-resource-intensive-tests --force-resource-intensive-tests' + file_tag: j17_dtests_offheap + run_dtests_extra_args: "--use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql'" - run_dtests: - file_tag: j8_large_without_vnodes - pytest_extra_args: '--only-resource-intensive-tests --force-resource-intensive-tests' + file_tag: j17_dtests_offheap + pytest_extra_args: '--use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests' + extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6' + + j17_cqlsh_dtests_py38_vnode: + <<: *j17_par_executor + steps: + - attach_workspace: + at: /home/cassandra + - clone_dtest + - create_venv: + python_version: '3.8' + - create_dtest_containers: + file_tag: j17_with_vnodes + run_dtests_extra_args: "--use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql'" + python_version: '3.8' + - run_dtests: + file_tag: j17_with_vnodes + pytest_extra_args: '--use-vnodes --num-tokens=16 --skip-resource-intensive-tests' + extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.8' + python_version: '3.8' + + j17_cqlsh_dtests_py311_vnode: + <<: *j17_par_executor + steps: + - attach_workspace: + at: /home/cassandra + - clone_dtest + - create_venv: + python_version: '3.11' + - create_dtest_containers: + file_tag: j17_with_vnodes + run_dtests_extra_args: "--use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql'" + python_version: '3.11' + - run_dtests: + file_tag: j17_with_vnodes + pytest_extra_args: '--use-vnodes --num-tokens=16 --skip-resource-intensive-tests' + extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.11' + python_version: '3.11' + + j17_cqlsh_dtests_py38_offheap: + <<: *j17_par_executor + steps: + - attach_workspace: + at: /home/cassandra + - clone_dtest + - create_venv: + python_version: '3.8' + - create_dtest_containers: + file_tag: j17_dtests_offheap + run_dtests_extra_args: "--use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql'" + python_version: '3.8' + - run_dtests: + file_tag: j17_dtests_offheap + pytest_extra_args: '--use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests' + extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.8' + python_version: '3.8' + + j17_cqlsh_dtests_py311_offheap: + <<: *j17_par_executor + steps: + - attach_workspace: + at: /home/cassandra + - clone_dtest + - create_venv: + python_version: '3.11' + - create_dtest_containers: + file_tag: j17_dtests_offheap + run_dtests_extra_args: "--use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql'" + python_version: '3.11' + - run_dtests: + file_tag: j17_dtests_offheap + pytest_extra_args: '--use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests' + extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.11' + python_version: '3.11' + + j17_cqlsh_dtests_py3: + <<: *j17_par_executor + steps: + - attach_workspace: + at: /home/cassandra + - clone_dtest + - create_venv + - create_dtest_containers: + file_tag: j17_without_vnodes + run_dtests_extra_args: "--skip-resource-intensive-tests --pytest-options '-k cql'" + - run_dtests: + file_tag: j17_without_vnodes + pytest_extra_args: '--skip-resource-intensive-tests' + extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6' + + j17_cqlsh_dtests_py38: + <<: *j17_par_executor + steps: + - attach_workspace: + at: /home/cassandra + - clone_dtest + - create_venv: + python_version: '3.8' + - create_dtest_containers: + file_tag: j17_without_vnodes + run_dtests_extra_args: "--skip-resource-intensive-tests --pytest-options '-k cql'" + python_version: '3.8' + - run_dtests: + file_tag: j17_without_vnodes + pytest_extra_args: '--skip-resource-intensive-tests' + extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.8' + python_version: '3.8' + + j17_cqlsh_dtests_py311: + <<: *j17_par_executor + steps: + - attach_workspace: + at: /home/cassandra + - clone_dtest + - create_venv: + python_version: '3.11' + - create_dtest_containers: + file_tag: j17_without_vnodes + run_dtests_extra_args: "--skip-resource-intensive-tests --pytest-options '-k cql'" + python_version: '3.11' + - run_dtests: + file_tag: j17_without_vnodes + pytest_extra_args: '--skip-resource-intensive-tests' + extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.11' + python_version: '3.11' j11_dtests_large_vnode: <<: *j11_par_executor @@ -2468,13 +2414,33 @@ jobs: file_tag: j11_large_without_vnodes pytest_extra_args: '--only-resource-intensive-tests --force-resource-intensive-tests' - j8_unit_tests_repeat: - <<: *j8_repeated_utest_executor + j17_dtests_large_vnode: + <<: *j17_par_executor steps: - attach_workspace: at: /home/cassandra - - log_environment - - run_unit_tests_repeat + - clone_dtest + - create_venv + - create_dtest_containers: + file_tag: j17_large_with_vnodes + run_dtests_extra_args: '--use-vnodes --only-resource-intensive-tests --force-resource-intensive-tests' + - run_dtests: + file_tag: j17_large_with_vnodes + pytest_extra_args: '--use-vnodes --num-tokens=16 --only-resource-intensive-tests --force-resource-intensive-tests' + + j17_dtests_large: + <<: *j17_par_executor + steps: + - attach_workspace: + at: /home/cassandra + - clone_dtest + - create_venv + - create_dtest_containers: + file_tag: j17_large_without_vnodes + run_dtests_extra_args: '--only-resource-intensive-tests --force-resource-intensive-tests' + - run_dtests: + file_tag: j17_large_without_vnodes + pytest_extra_args: '--only-resource-intensive-tests --force-resource-intensive-tests' j11_unit_tests_repeat: <<: *j11_repeated_utest_executor @@ -2484,13 +2450,13 @@ jobs: - log_environment - run_unit_tests_repeat - j8_utests_cdc_repeat: - <<: *j8_repeated_utest_executor + j17_unit_tests_repeat: + <<: *j17_repeated_utest_executor steps: - attach_workspace: at: /home/cassandra - log_environment - - run_utests_cdc_repeat + - run_unit_tests_repeat j11_utests_cdc_repeat: <<: *j11_repeated_utest_executor @@ -2500,13 +2466,13 @@ jobs: - log_environment - run_utests_cdc_repeat - j8_utests_compression_repeat: - <<: *j8_repeated_utest_executor + j17_utests_cdc_repeat: + <<: *j17_repeated_utest_executor steps: - attach_workspace: at: /home/cassandra - log_environment - - run_utests_compression_repeat + - run_utests_cdc_repeat j11_utests_compression_repeat: <<: *j11_repeated_utest_executor @@ -2516,13 +2482,13 @@ jobs: - log_environment - run_utests_compression_repeat - j8_utests_trie_repeat: - <<: *j8_repeated_utest_executor + j17_utests_compression_repeat: + <<: *j17_repeated_utest_executor steps: - attach_workspace: at: /home/cassandra - log_environment - - run_utests_trie_repeat + - run_utests_compression_repeat j11_utests_trie_repeat: <<: *j11_repeated_utest_executor @@ -2531,14 +2497,14 @@ jobs: at: /home/cassandra - log_environment - run_utests_trie_repeat - - j8_utests_oa_repeat: - <<: *j8_repeated_utest_executor + + j17_utests_trie_repeat: + <<: *j17_repeated_utest_executor steps: - attach_workspace: at: /home/cassandra - log_environment - - run_utests_oa_repeat + - run_utests_trie_repeat j11_utests_oa_repeat: <<: *j11_repeated_utest_executor @@ -2548,13 +2514,13 @@ jobs: - log_environment - run_utests_oa_repeat - j8_utests_system_keyspace_directory_repeat: - <<: *j8_repeated_utest_executor + j17_utests_oa_repeat: + <<: *j17_repeated_utest_executor steps: - attach_workspace: at: /home/cassandra - log_environment - - run_utests_system_keyspace_directory_repeat + - run_utests_oa_repeat j11_utests_system_keyspace_directory_repeat: <<: *j11_repeated_utest_executor @@ -2564,13 +2530,13 @@ jobs: - log_environment - run_utests_system_keyspace_directory_repeat - j8_utests_fqltool_repeat: - <<: *j8_repeated_utest_executor + j17_utests_system_keyspace_directory_repeat: + <<: *j17_repeated_utest_executor steps: - attach_workspace: at: /home/cassandra - log_environment - - run_utests_fqltool_repeat + - run_utests_system_keyspace_directory_repeat j11_utests_fqltool_repeat: <<: *j11_repeated_utest_executor @@ -2580,13 +2546,13 @@ jobs: - log_environment - run_utests_fqltool_repeat - j8_utests_long_repeat: - <<: *j8_repeated_utest_executor + j17_utests_fqltool_repeat: + <<: *j17_repeated_utest_executor steps: - attach_workspace: at: /home/cassandra - log_environment - - run_utests_long_repeat + - run_utests_fqltool_repeat j11_utests_long_repeat: <<: *j11_repeated_utest_executor @@ -2596,13 +2562,13 @@ jobs: - log_environment - run_utests_long_repeat - j8_utests_stress_repeat: - <<: *j8_repeated_utest_executor + j17_utests_long_repeat: + <<: *j17_repeated_utest_executor steps: - attach_workspace: at: /home/cassandra - log_environment - - run_utests_stress_repeat + - run_utests_long_repeat j11_utests_stress_repeat: <<: *j11_repeated_utest_executor @@ -2612,37 +2578,13 @@ jobs: - log_environment - run_utests_stress_repeat - j8_jvm_dtests_repeat: - <<: *j8_repeated_utest_executor + j17_utests_stress_repeat: + <<: *j17_repeated_utest_executor steps: - attach_workspace: at: /home/cassandra - log_environment - - run_jvm_dtests_repeat - - j8_jvm_dtests_vnode_repeat: - <<: *j8_repeated_utest_executor - steps: - - attach_workspace: - at: /home/cassandra - - log_environment - - run_jvm_dtests_vnode_repeat - - j8_simulator_dtests_repeat: - <<: *j8_repeated_utest_executor - steps: - - attach_workspace: - at: /home/cassandra - - log_environment - - run_simulator_dtests_repeat - - j11_simulator_dtests_repeat: - <<: *j11_repeated_utest_executor - steps: - - attach_workspace: - at: /home/cassandra - - log_environment - - run_simulator_dtests_repeat + - run_utests_stress_repeat j11_jvm_upgrade_dtests_repeat: <<: *j11_repeated_jvm_upgrade_dtest_executor @@ -2668,19 +2610,29 @@ jobs: - log_environment - run_jvm_dtests_vnode_repeat - j8_repeated_ant_test: - <<: *j8_repeated_utest_executor + j11_simulator_dtests_repeat: + <<: *j11_repeated_utest_executor steps: - attach_workspace: at: /home/cassandra - log_environment - - run_repeated_utest: - target: ${REPEATED_ANT_TEST_TARGET} - class: ${REPEATED_ANT_TEST_CLASS} - methods: ${REPEATED_ANT_TEST_METHODS} - vnodes: ${REPEATED_ANT_TEST_VNODES} - count: ${REPEATED_ANT_TEST_COUNT} - stop_on_failure: ${REPEATED_TESTS_STOP_ON_FAILURE} + - run_simulator_dtests_repeat + + j17_jvm_dtests_repeat: + <<: *j17_repeated_utest_executor + steps: + - attach_workspace: + at: /home/cassandra + - log_environment + - run_jvm_dtests_repeat + + j17_jvm_dtests_vnode_repeat: + <<: *j17_repeated_utest_executor + steps: + - attach_workspace: + at: /home/cassandra + - log_environment + - run_jvm_dtests_vnode_repeat j11_repeated_ant_test: <<: *j11_repeated_utest_executor @@ -2696,85 +2648,25 @@ jobs: count: ${REPEATED_ANT_TEST_COUNT} stop_on_failure: ${REPEATED_TESTS_STOP_ON_FAILURE} - j8_dtests_repeat: - <<: *j8_repeated_dtest_executor + j17_repeated_ant_test: + <<: *j17_repeated_utest_executor steps: - attach_workspace: at: /home/cassandra - - clone_dtest - - create_venv - - run_repeated_dtest: - tests: ${REPEATED_DTESTS} - vnodes: "false" - upgrade: "false" - count: ${REPEATED_DTESTS_COUNT} + - log_environment + - run_repeated_utest: + target: ${REPEATED_ANT_TEST_TARGET} + class: ${REPEATED_ANT_TEST_CLASS} + methods: ${REPEATED_ANT_TEST_METHODS} + vnodes: ${REPEATED_ANT_TEST_VNODES} + count: ${REPEATED_ANT_TEST_COUNT} stop_on_failure: ${REPEATED_TESTS_STOP_ON_FAILURE} - j8_dtests_vnode_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} - - 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" - - j8_dtests_large_repeat: - <<: *j8_repeated_dtest_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv - - run_repeated_dtest: - tests: ${REPEATED_LARGE_DTESTS} - vnodes: "false" - upgrade: "false" - count: ${REPEATED_LARGE_DTESTS_COUNT} - stop_on_failure: ${REPEATED_TESTS_STOP_ON_FAILURE} - extra_dtest_args: "--only-resource-intensive-tests --force-resource-intensive-tests" - - j8_dtests_large_vnode_repeat: - <<: *j8_repeated_dtest_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv - - run_repeated_dtest: - tests: ${REPEATED_LARGE_DTESTS} - vnodes: "true" - upgrade: "false" - count: ${REPEATED_LARGE_DTESTS_COUNT} - stop_on_failure: ${REPEATED_TESTS_STOP_ON_FAILURE} - extra_dtest_args: "--only-resource-intensive-tests --force-resource-intensive-tests" - j11_dtests_repeat: <<: *j11_repeated_dtest_executor steps: - attach_workspace: at: /home/cassandra - - log_environment - clone_dtest - create_venv - run_repeated_dtest: @@ -2789,7 +2681,6 @@ jobs: steps: - attach_workspace: at: /home/cassandra - - log_environment - clone_dtest - create_venv - run_repeated_dtest: @@ -2831,6 +2722,81 @@ jobs: j11_dtests_large_vnode_repeat: <<: *j11_repeated_dtest_executor + steps: + - attach_workspace: + at: /home/cassandra + - clone_dtest + - create_venv + - run_repeated_dtest: + tests: ${REPEATED_LARGE_DTESTS} + vnodes: "true" + upgrade: "false" + count: ${REPEATED_LARGE_DTESTS_COUNT} + stop_on_failure: ${REPEATED_TESTS_STOP_ON_FAILURE} + extra_dtest_args: "--only-resource-intensive-tests --force-resource-intensive-tests" + + j17_dtests_repeat: + <<: *j17_repeated_dtest_executor + steps: + - attach_workspace: + at: /home/cassandra + - log_environment + - clone_dtest + - create_venv + - run_repeated_dtest: + tests: ${REPEATED_DTESTS} + vnodes: "false" + upgrade: "false" + count: ${REPEATED_DTESTS_COUNT} + stop_on_failure: ${REPEATED_TESTS_STOP_ON_FAILURE} + + j17_dtests_vnode_repeat: + <<: *j17_repeated_dtest_executor + steps: + - attach_workspace: + at: /home/cassandra + - log_environment + - 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} + + j17_dtests_offheap_repeat: + <<: *j17_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" + + j17_dtests_large_repeat: + <<: *j17_repeated_dtest_executor + steps: + - attach_workspace: + at: /home/cassandra + - clone_dtest + - create_venv + - run_repeated_dtest: + tests: ${REPEATED_LARGE_DTESTS} + vnodes: "false" + upgrade: "false" + count: ${REPEATED_LARGE_DTESTS_COUNT} + stop_on_failure: ${REPEATED_TESTS_STOP_ON_FAILURE} + extra_dtest_args: "--only-resource-intensive-tests --force-resource-intensive-tests" + + j17_dtests_large_vnode_repeat: + <<: *j17_repeated_dtest_executor steps: - attach_workspace: at: /home/cassandra @@ -3289,7 +3255,7 @@ commands: tests: ${REPEATED_UTESTS} count: ${REPEATED_UTESTS_COUNT} stop_on_failure: ${REPEATED_TESTS_STOP_ON_FAILURE} - + run_utests_oa_repeat: steps: - run_repeated_utests: diff --git a/.circleci/config_template.yml.PAID.patch b/.circleci/config_template.yml.PAID.patch index b785e63a83..affd99d7ef 100644 --- a/.circleci/config_template.yml.PAID.patch +++ b/.circleci/config_template.yml.PAID.patch @@ -1,55 +1,6 @@ ---- config_template.yml 2023-06-16 12:35:53.260639863 +0100 -+++ config_template.yml.PAID 2023-06-16 12:37:27.215497973 +0100 +--- config_template.yml 2023-07-24 11:55:54.000000000 -0400 ++++ config_template.yml.PAID 2023-07-24 11:58:41.000000000 -0400 @@ -157,14 +157,14 @@ - j8_par_executor: &j8_par_executor - executor: - name: java8-executor -- #exec_resource_class: xlarge -- parallelism: 4 -+ exec_resource_class: medium -+ parallelism: 25 - - j8_small_par_executor: &j8_small_par_executor - executor: - name: java8-executor -- #exec_resource_class: xlarge -- parallelism: 1 -+ exec_resource_class: large -+ parallelism: 10 - - j8_small_executor: &j8_small_executor - executor: -@@ -172,29 +172,41 @@ - exec_resource_class: medium - parallelism: 1 - -+j8_large_par_executor: &j8_large_par_executor -+ executor: -+ name: java8-executor -+ exec_resource_class: large -+ parallelism: 50 -+ -+j11_very_large_par_executor: &j11_very_large_par_executor -+ executor: -+ name: java11-executor -+ exec_resource_class: large -+ parallelism: 100 -+ - j8_medium_par_executor: &j8_medium_par_executor - executor: - name: java8-executor -- #exec_resource_class: xlarge -- parallelism: 1 -+ exec_resource_class: xlarge -+ parallelism: 4 - - j8_seq_executor: &j8_seq_executor - executor: - name: java8-executor -- #exec_resource_class: xlarge -+ exec_resource_class: medium - parallelism: 1 # sequential, single container tests: no parallelism benefits - j11_par_executor: &j11_par_executor executor: name: java11-executor @@ -68,7 +19,22 @@ j11_small_executor: &j11_small_executor executor: -@@ -205,44 +217,56 @@ +@@ -172,30 +172,41 @@ + exec_resource_class: medium + parallelism: 1 + ++j11_large_par_executor: &j11_large_par_executor ++ executor: ++ name: java11-executor ++ exec_resource_class: large ++ parallelism: 50 ++ ++j11_very_large_par_executor: &j11_very_large_par_executor ++ executor: ++ name: java11-executor ++ exec_resource_class: large ++ parallelism: 100 ++ j11_medium_par_executor: &j11_medium_par_executor executor: name: java11-executor @@ -76,40 +42,53 @@ - parallelism: 1 + exec_resource_class: xlarge + parallelism: 4 -+ -+j11_large_par_executor: &j11_large_par_executor -+ executor: -+ name: java11-executor -+ exec_resource_class: large -+ parallelism: 50 j11_seq_executor: &j11_seq_executor executor: name: java11-executor - #exec_resource_class: xlarge -+ exec_resource_class: medium + exec_resource_class: medium parallelism: 1 # sequential, single container tests: no parallelism benefits - j8_repeated_utest_executor: &j8_repeated_utest_executor + j17_par_executor: &j17_par_executor executor: - name: java8-executor + name: java17-executor +- #exec_resource_class: xlarge - parallelism: 4 + exec_resource_class: medium + parallelism: 25 - j8_repeated_dtest_executor: &j8_repeated_dtest_executor + j17_small_par_executor: &j17_small_par_executor executor: - name: java8-executor -- parallelism: 4 + name: java17-executor +- #exec_resource_class: xlarge +- parallelism: 1 + exec_resource_class: large -+ parallelism: 25 ++ parallelism: 10 - j11_repeated_upgrade_dtest_executor: &j11_repeated_upgrade_dtest_executor + j17_small_executor: &j17_small_executor executor: - name: java11-executor -- parallelism: 4 +@@ -206,44 +217,56 @@ + j17_medium_par_executor: &j17_medium_par_executor + executor: + name: java17-executor +- #exec_resource_class: xlarge +- parallelism: 1 + exec_resource_class: xlarge -+ parallelism: 25 ++ parallelism: 4 ++ ++j17_large_par_executor: &j17_large_par_executor ++ executor: ++ name: java17-executor ++ exec_resource_class: large ++ parallelism: 50 + + j17_seq_executor: &j17_seq_executor + executor: + name: java17-executor +- #exec_resource_class: xlarge ++ exec_resource_class: medium + parallelism: 1 # sequential, single container tests: no parallelism benefits j11_repeated_jvm_upgrade_dtest_executor: &j11_repeated_jvm_upgrade_dtest_executor executor: @@ -132,37 +111,40 @@ + exec_resource_class: large + parallelism: 25 - j8_separate_jobs: &j8_separate_jobs + j17_repeated_utest_executor: &j17_repeated_utest_executor + executor: + name: java17-executor +- parallelism: 4 ++ exec_resource_class: medium ++ parallelism: 25 + + j17_repeated_dtest_executor: &j17_repeated_dtest_executor + executor: + name: java17-executor +- parallelism: 4 ++ exec_resource_class: large ++ parallelism: 25 + + j11_repeated_upgrade_dtest_executor: &j11_repeated_upgrade_dtest_executor + executor: + name: java11-executor +- parallelism: 4 ++ exec_resource_class: xlarge ++ parallelism: 25 + + j11_separate_jobs: &j11_separate_jobs jobs: -@@ -2006,7 +2030,7 @@ +@@ -1980,7 +2003,7 @@ target: testclasslist-system-keyspace-directory - j8_dtests_vnode: -- <<: *j8_par_executor -+ <<: *j8_large_par_executor - steps: - - attach_workspace: - at: /home/cassandra -@@ -2020,7 +2044,7 @@ - pytest_extra_args: '--use-vnodes --num-tokens=16 --skip-resource-intensive-tests' - - j8_dtests_offheap: -- <<: *j8_par_executor -+ <<: *j8_large_par_executor - steps: - - attach_workspace: - at: /home/cassandra -@@ -2034,7 +2058,7 @@ - pytest_extra_args: '--use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests' - j11_dtests_vnode: - <<: *j11_par_executor + <<: *j11_large_par_executor steps: - - attach_workspace: - at: /home/cassandra -@@ -2049,7 +2073,7 @@ - pytest_extra_args: '--use-vnodes --num-tokens=16 --skip-resource-intensive-tests' + - attach_workspace: + at: /home/cassandra +@@ -1994,7 +2017,7 @@ + pytest_extra_args: '--use-vnodes --num-tokens=16 --skip-resource-intensive-tests' j11_dtests_offheap: - <<: *j11_par_executor @@ -170,116 +152,53 @@ steps: - attach_workspace: at: /home/cassandra -@@ -2064,7 +2088,7 @@ +@@ -2008,7 +2031,7 @@ pytest_extra_args: '--use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests' - j8_dtests: -- <<: *j8_par_executor -+ <<: *j8_large_par_executor + j17_dtests_vnode: +- <<: *j17_par_executor ++ <<: *j17_large_par_executor + steps: + - attach_workspace: + at: /home/cassandra +@@ -2023,7 +2046,7 @@ + pytest_extra_args: '--use-vnodes --num-tokens=16 --skip-resource-intensive-tests' + + j17_dtests_offheap: +- <<: *j17_par_executor ++ <<: *j17_large_par_executor steps: - attach_workspace: at: /home/cassandra -@@ -2078,7 +2102,7 @@ - pytest_extra_args: '--skip-resource-intensive-tests' +@@ -2038,7 +2061,7 @@ + pytest_extra_args: '--use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests' j11_dtests: - <<: *j11_par_executor + <<: *j11_large_par_executor + steps: + - attach_workspace: + at: /home/cassandra +@@ -2052,7 +2075,7 @@ + pytest_extra_args: '--skip-resource-intensive-tests' + + j17_dtests: +- <<: *j17_par_executor ++ <<: *j17_large_par_executor steps: - attach_workspace: at: /home/cassandra -@@ -2093,7 +2117,7 @@ +@@ -2067,7 +2090,7 @@ pytest_extra_args: '--skip-resource-intensive-tests' j11_upgrade_dtests: - <<: *j11_par_executor + <<: *j11_very_large_par_executor steps: - - attach_workspace: - at: /home/cassandra -@@ -2107,7 +2131,7 @@ - pytest_extra_args: '--execute-upgrade-tests-only --upgrade-target-version-only --upgrade-version-selection all' - - j8_cqlsh_dtests_py3_vnode: -- <<: *j8_par_executor -+ <<: *j8_large_par_executor - steps: - - attach_workspace: - at: /home/cassandra -@@ -2122,7 +2146,7 @@ - extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6' - - j8_cqlsh_dtests_py3_offheap: -- <<: *j8_par_executor -+ <<: *j8_large_par_executor - steps: - - attach_workspace: - at: /home/cassandra -@@ -2137,7 +2161,7 @@ - extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6' - - j8_cqlsh_dtests_py38_vnode: -- <<: *j8_par_executor -+ <<: *j8_large_par_executor - steps: - - attach_workspace: - at: /home/cassandra -@@ -2155,7 +2179,7 @@ - python_version: '3.8' - - j8_cqlsh_dtests_py311_vnode: -- <<: *j8_par_executor -+ <<: *j8_large_par_executor - steps: - - attach_workspace: - at: /home/cassandra -@@ -2173,7 +2197,7 @@ - python_version: '3.11' - - j8_cqlsh_dtests_py38_offheap: -- <<: *j8_par_executor -+ <<: *j8_large_par_executor - steps: - - attach_workspace: - at: /home/cassandra -@@ -2191,7 +2215,7 @@ - python_version: '3.8' - - j8_cqlsh_dtests_py311_offheap: -- <<: *j8_par_executor -+ <<: *j8_large_par_executor - steps: - - attach_workspace: - at: /home/cassandra -@@ -2209,7 +2233,7 @@ - python_version: '3.11' - - j8_cqlsh_dtests_py3: -- <<: *j8_par_executor -+ <<: *j8_large_par_executor - steps: - - attach_workspace: - at: /home/cassandra -@@ -2224,7 +2248,7 @@ - extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6' - - j8_cqlsh_dtests_py38: -- <<: *j8_par_executor -+ <<: *j8_large_par_executor - steps: - - attach_workspace: - at: /home/cassandra -@@ -2242,7 +2266,7 @@ - python_version: '3.8' - - j8_cqlsh_dtests_py311: -- <<: *j8_par_executor -+ <<: *j8_large_par_executor - steps: - - attach_workspace: - at: /home/cassandra -@@ -2260,7 +2284,7 @@ - python_version: '3.11' + - attach_workspace: + at: /home/cassandra +@@ -2081,7 +2104,7 @@ + pytest_extra_args: '--execute-upgrade-tests-only --upgrade-target-version-only --upgrade-version-selection all' j11_cqlsh_dtests_py3_vnode: - <<: *j11_par_executor @@ -287,7 +206,7 @@ steps: - attach_workspace: at: /home/cassandra -@@ -2275,7 +2299,7 @@ +@@ -2096,7 +2119,7 @@ extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6' j11_cqlsh_dtests_py3_offheap: @@ -296,7 +215,7 @@ steps: - attach_workspace: at: /home/cassandra -@@ -2290,7 +2314,7 @@ +@@ -2111,7 +2134,7 @@ extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6' j11_cqlsh_dtests_py38_vnode: @@ -305,7 +224,7 @@ steps: - attach_workspace: at: /home/cassandra -@@ -2308,7 +2332,7 @@ +@@ -2129,7 +2152,7 @@ python_version: '3.8' j11_cqlsh_dtests_py311_vnode: @@ -314,7 +233,7 @@ steps: - attach_workspace: at: /home/cassandra -@@ -2326,7 +2350,7 @@ +@@ -2147,7 +2170,7 @@ python_version: '3.11' j11_cqlsh_dtests_py38_offheap: @@ -323,7 +242,7 @@ steps: - attach_workspace: at: /home/cassandra -@@ -2344,7 +2368,7 @@ +@@ -2165,7 +2188,7 @@ python_version: '3.8' j11_cqlsh_dtests_py311_offheap: @@ -332,7 +251,7 @@ steps: - attach_workspace: at: /home/cassandra -@@ -2362,7 +2386,7 @@ +@@ -2183,7 +2206,7 @@ python_version: '3.11' j11_cqlsh_dtests_py3: @@ -341,7 +260,7 @@ steps: - attach_workspace: at: /home/cassandra -@@ -2377,7 +2401,7 @@ +@@ -2198,7 +2221,7 @@ extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6' j11_cqlsh_dtests_py38: @@ -350,7 +269,7 @@ steps: - attach_workspace: at: /home/cassandra -@@ -2395,7 +2419,7 @@ +@@ -2216,7 +2239,7 @@ python_version: '3.8' j11_cqlsh_dtests_py311: @@ -359,26 +278,89 @@ steps: - attach_workspace: at: /home/cassandra -@@ -2413,7 +2437,7 @@ +@@ -2234,7 +2257,7 @@ python_version: '3.11' - j8_dtests_large_vnode: -- <<: *j8_par_executor -+ <<: *j8_medium_par_executor + j17_cqlsh_dtests_py3_vnode: +- <<: *j17_par_executor ++ <<: *j17_large_par_executor steps: - attach_workspace: at: /home/cassandra -@@ -2427,7 +2451,7 @@ - pytest_extra_args: '--use-vnodes --num-tokens=16 --only-resource-intensive-tests --force-resource-intensive-tests' +@@ -2249,7 +2272,7 @@ + extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6' - j8_dtests_large: -- <<: *j8_par_executor -+ <<: *j8_medium_par_executor + j17_cqlsh_dtests_py3_offheap: +- <<: *j17_par_executor ++ <<: *j17_large_par_executor steps: - attach_workspace: at: /home/cassandra -@@ -2441,7 +2465,7 @@ - pytest_extra_args: '--only-resource-intensive-tests --force-resource-intensive-tests' +@@ -2264,7 +2287,7 @@ + extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6' + + j17_cqlsh_dtests_py38_vnode: +- <<: *j17_par_executor ++ <<: *j17_large_par_executor + steps: + - attach_workspace: + at: /home/cassandra +@@ -2282,7 +2305,7 @@ + python_version: '3.8' + + j17_cqlsh_dtests_py311_vnode: +- <<: *j17_par_executor ++ <<: *j17_large_par_executor + steps: + - attach_workspace: + at: /home/cassandra +@@ -2300,7 +2323,7 @@ + python_version: '3.11' + + j17_cqlsh_dtests_py38_offheap: +- <<: *j17_par_executor ++ <<: *j17_large_par_executor + steps: + - attach_workspace: + at: /home/cassandra +@@ -2318,7 +2341,7 @@ + python_version: '3.8' + + j17_cqlsh_dtests_py311_offheap: +- <<: *j17_par_executor ++ <<: *j17_large_par_executor + steps: + - attach_workspace: + at: /home/cassandra +@@ -2336,7 +2359,7 @@ + python_version: '3.11' + + j17_cqlsh_dtests_py3: +- <<: *j17_par_executor ++ <<: *j17_large_par_executor + steps: + - attach_workspace: + at: /home/cassandra +@@ -2351,7 +2374,7 @@ + extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6' + + j17_cqlsh_dtests_py38: +- <<: *j17_par_executor ++ <<: *j17_large_par_executor + steps: + - attach_workspace: + at: /home/cassandra +@@ -2369,7 +2392,7 @@ + python_version: '3.8' + + j17_cqlsh_dtests_py311: +- <<: *j17_par_executor ++ <<: *j17_large_par_executor + steps: + - attach_workspace: + at: /home/cassandra +@@ -2387,7 +2410,7 @@ + python_version: '3.11' j11_dtests_large_vnode: - <<: *j11_par_executor @@ -386,7 +368,7 @@ steps: - attach_workspace: at: /home/cassandra -@@ -2455,7 +2479,7 @@ +@@ -2401,7 +2424,7 @@ pytest_extra_args: '--use-vnodes --num-tokens=16 --only-resource-intensive-tests --force-resource-intensive-tests' j11_dtests_large: @@ -395,3 +377,21 @@ steps: - attach_workspace: at: /home/cassandra +@@ -2415,7 +2438,7 @@ + pytest_extra_args: '--only-resource-intensive-tests --force-resource-intensive-tests' + + j17_dtests_large_vnode: +- <<: *j17_par_executor ++ <<: *j17_medium_par_executor + steps: + - attach_workspace: + at: /home/cassandra +@@ -2429,7 +2452,7 @@ + pytest_extra_args: '--use-vnodes --num-tokens=16 --only-resource-intensive-tests --force-resource-intensive-tests' + + j17_dtests_large: +- <<: *j17_par_executor ++ <<: *j17_medium_par_executor + steps: + - attach_workspace: + at: /home/cassandra diff --git a/.circleci/config_template_11_and_17.yml b/.circleci/config_template_11_and_17.yml deleted file mode 100644 index ab6d5a2d2f..0000000000 --- a/.circleci/config_template_11_and_17.yml +++ /dev/null @@ -1,3698 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -version: 2.1 - -default_env_vars: &default_env_vars - - # The values of some of these environment variables are meant to be frequently changed by developers. - # The generate.sh script contains a list of accepted environment variables that should contain some of - # these variables. Also, some variables are mentioned in the documentation, at least in - # .circleci/readme.md and in doc/source/development/testing.rst. - # If you modify these variables, or if you add new variables whose values are meant to be changed frequently, - # please remember to modify the generate.sh script and the documentation accordingly. - - ANT_HOME: /usr/share/ant - LANG: en_US.UTF-8 - KEEP_TEST_DIR: true - DEFAULT_DIR: /home/cassandra/cassandra-dtest - PYTHONIOENCODING: utf-8 - PYTHONUNBUFFERED: true - CASS_DRIVER_NO_EXTENSIONS: true - CASS_DRIVER_NO_CYTHON: true - #Skip all syncing to disk to avoid performance issues in flaky CI environments - CASSANDRA_SKIP_SYNC: true - DTEST_REPO: https://github.com/apache/cassandra-dtest.git - DTEST_BRANCH: trunk - CCM_MAX_HEAP_SIZE: 1024M - CCM_HEAP_NEWSIZE: 256M - - # Whether the repeated test iterations should stop on the first failure by default. - REPEATED_TESTS_STOP_ON_FAILURE: false - - # Comma-separated list of tests that should be included in the repeated run for regular unit tests, - # in addition to automatically detected new and modified tests. For example: - # REPEATED_UTESTS: org.apache.cassandra.cql3.ViewTest - # REPEATED_UTESTS: org.apache.cassandra.cql3.ViewTest#testCountersTable - # REPEATED_UTESTS: org.apache.cassandra.cql3.ViewTest,org.apache.cassandra.cql3.functions.TimeFctsTest - REPEATED_UTESTS: - # The number of times that new, modified or manually specified unit tests should be run. - REPEATED_UTESTS_COUNT: 500 - - # Comma-separated list of tests that should be included in the repeated run for fqltool unit tests, - # in addition to automatically detected new and modified tests. For example: - # REPEATED_UTESTS_FQLTOOL: org.apache.cassandra.fqltool.FQLCompareTest - # REPEATED_UTESTS_FQLTOOL: org.apache.cassandra.fqltool.FQLCompareTest#endToEnd - # REPEATED_UTESTS_FQLTOOL: org.apache.cassandra.fqltool.FQLCompareTest,org.apache.cassandra.fqltool.FQLReplayTest - REPEATED_UTESTS_FQLTOOL: - # The number of times that new, modified or manually specified fqltool unit tests should be run. - REPEATED_UTESTS_FQLTOOL_COUNT: 500 - - # Comma-separated list of tests that should be included in the repeated run for long unit tests, - # in addition to automatically detected new and modified tests. For example: - # REPEATED_UTESTS_LONG: org.apache.cassandra.db.commitlog.CommitLogStressTest - # REPEATED_UTESTS_LONG: org.apache.cassandra.db.commitlog.CommitLogStressTest#testRandomSize - REPEATED_UTESTS_LONG: - # The number of times that new, modified or manually specified long unit tests should be run. - REPEATED_UTESTS_LONG_COUNT: 100 - - # Comma-separated list of tests that should be included in the repeated run for stress unit tests, - # in addition to automatically detected new and modified tests. For example: - # REPEATED_UTESTS_STRESS: org.apache.cassandra.stress.generate.DistributionGaussianTest - # REPEATED_UTESTS_STRESS: org.apache.cassandra.stress.generate.DistributionGaussianTest#simpleGaussian - REPEATED_UTESTS_STRESS: - # The number of times that new, modified or manually specified stress unit tests should be run. - REPEATED_UTESTS_STRESS_COUNT: 500 - - # Comma-separated list of tests that should be included in the repeated run for simulator dtests, - # in addition to automatically detected new and modified tests. For example: - # REPEATED_SIMULATOR_DTESTS: org.apache.cassandra.simulator.test.TrivialSimulationTest - # REPEATED_SIMULATOR_DTESTS: org.apache.cassandra.simulator.test.TrivialSimulationTest#trivialTest - REPEATED_SIMULATOR_DTESTS: - # The number of times that new, modified or manually specified simulator dtests should be run. - REPEATED_SIMULATOR_DTESTS_COUNT: 500 - - # Comma-separated list of tests that should be included in the repeated run for JVM dtests, - # in addition to automatically detected new and modified tests. For example: - # REPEATED_JVM_DTESTS: org.apache.cassandra.distributed.test.PagingTest - # REPEATED_JVM_DTESTS: org.apache.cassandra.distributed.test.PagingTest#testPaging - REPEATED_JVM_DTESTS: - # The number of times that new, modified or manually specified JVM dtests should be run. - REPEATED_JVM_DTESTS_COUNT: 500 - - # Comma-separated list of tests that should be included in the repeated run for JVM upgrade dtests, - # in addition to automatically detected new and modified tests. For example: - # REPEATED_JVM_UPGRADE_DTESTS: org.apache.cassandra.distributed.upgrade.GroupByTest - # REPEATED_JVM_UPGRADE_DTESTS: org.apache.cassandra.distributed.upgrade.GroupByTest#testReads - REPEATED_JVM_UPGRADE_DTESTS: - # The number of times that new, modified or manually specified JVM upgrade dtests should be run. - REPEATED_JVM_UPGRADE_DTESTS_COUNT: 500 - - # Comma-separated list of Python dtests that should be repeatedly run, for example: - # REPEATED_DTESTS: cqlsh_tests/test_cqlsh.py - # REPEATED_DTESTS: cqlsh_tests/test_cqlsh.py::TestCqlshSmoke - # REPEATED_DTESTS: cqlsh_tests/test_cqlsh.py::TestCqlshSmoke::test_create_index - # REPEATED_DTESTS: cqlsh_tests/test_cqlsh.py,consistency_test.py - REPEATED_DTESTS: - # The number of times that the manually specified Python dtests should be run. - REPEATED_DTESTS_COUNT: 500 - - # Comma-separated list of Python large dtests that should be repeatedly run, for example: - # REPEATED_LARGE_DTESTS: replace_address_test.py - # REPEATED_LARGE_DTESTS: replace_address_test.py::TestReplaceAddress - # REPEATED_LARGE_DTESTS: replace_address_test.py::TestReplaceAddress::test_replace_stopped_node - # REPEATED_LARGE_DTESTS: replace_address_test.py,materialized_views_test.py - REPEATED_LARGE_DTESTS: - # The number of times that the manually specified Python large dtests should be run. - REPEATED_LARGE_DTESTS_COUNT: 100 - - # Comma-separated list of Python dtests that should be repeatedly run, for example: - # REPEATED_UPGRADE_DTESTS: upgrade_tests/cql_tests.py - # REPEATED_UPGRADE_DTESTS: upgrade_tests/cql_tests.py::TestCQLNodes2RF1_Upgrade_current_4_0_x_To_indev_4_0_x - # REPEATED_UPGRADE_DTESTS: upgrade_tests/cql_tests.py,upgrade_tests/paging_test.py - REPEATED_UPGRADE_DTESTS: - # The number of times that the manually specified Python upgrade dtests should be run. - REPEATED_UPGRADE_DTESTS_COUNT: 25 - - # The Ant test target to run, for example: - # REPEATED_ANT_TEST_TARGET: testsome - # REPEATED_ANT_TEST_TARGET: test-jvm-dtest-some - # REPEATED_ANT_TEST_TARGET: test-cdc - # REPEATED_ANT_TEST_TARGET: test-compression - # REPEATED_ANT_TEST_TARGET: test-trie - # REPEATED_ANT_TEST_TARGET: test-oa - # REPEATED_ANT_TEST_TARGET: test-system-keyspace-directory - REPEATED_ANT_TEST_TARGET: testsome - # The name of JUnit class to be run multiple times, for example: - # REPEATED_ANT_TEST_CLASS: org.apache.cassandra.cql3.ViewTest - # REPEATED_ANT_TEST_CLASS: org.apache.cassandra.distributed.test.PagingTest - REPEATED_ANT_TEST_CLASS: - # The optional specific methods within REPEATED_ANT_TEST_CLASS to be run, for example: - # REPEATED_ANT_TEST_METHODS: testCompoundPartitionKey - # REPEATED_ANT_TEST_METHODS: testCompoundPartitionKey,testStaticTable - # Please note that some Ant targets will ignore the -Dtest.methods argument produced by this. - REPEATED_ANT_TEST_METHODS: - # Whether the test iteration should use vnodes for JVM dtests (-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'). - # This will only be applied as a default to JVM dtests that don't provide their own initial tokens or token count, - # in the same way that it's done for *_jvm_dtests_vnode jobs. Ant targets other than JVM dtests will ignore this. - REPEATED_ANT_TEST_VNODES: false - # The number of times that the repeated JUnit test should be run. - REPEATED_ANT_TEST_COUNT: 500 - -j11_par_executor: &j11_par_executor - executor: - name: java11-executor - #exec_resource_class: xlarge - parallelism: 4 - -j11_small_par_executor: &j11_small_par_executor - executor: - name: java11-executor - #exec_resource_class: xlarge - parallelism: 1 - -j11_small_executor: &j11_small_executor - executor: - name: java11-executor - exec_resource_class: medium - parallelism: 1 - -j11_medium_par_executor: &j11_medium_par_executor - executor: - name: java11-executor - #exec_resource_class: xlarge - parallelism: 1 - -j11_seq_executor: &j11_seq_executor - executor: - name: java11-executor - #exec_resource_class: xlarge - exec_resource_class: medium - parallelism: 1 # sequential, single container tests: no parallelism benefits - -j17_par_executor: &j17_par_executor - executor: - name: java17-executor - #exec_resource_class: xlarge - parallelism: 4 - -j17_small_par_executor: &j17_small_par_executor - executor: - name: java17-executor - #exec_resource_class: xlarge - parallelism: 1 - -j17_small_executor: &j17_small_executor - executor: - name: java17-executor - #exec_resource_class: medium - parallelism: 1 - -j17_medium_par_executor: &j17_medium_par_executor - executor: - name: java17-executor - #exec_resource_class: xlarge - parallelism: 1 - -j17_seq_executor: &j17_seq_executor - executor: - name: java17-executor - #exec_resource_class: xlarge - parallelism: 1 # sequential, single container tests: no parallelism benefits - -j11_repeated_jvm_upgrade_dtest_executor: &j11_repeated_jvm_upgrade_dtest_executor - executor: - name: java11-executor - parallelism: 4 - -j11_repeated_utest_executor: &j11_repeated_utest_executor - executor: - name: java11-executor - parallelism: 4 - -j11_repeated_dtest_executor: &j11_repeated_dtest_executor - executor: - name: java11-executor - parallelism: 4 - -j17_repeated_utest_executor: &j17_repeated_utest_executor - executor: - name: java17-executor - parallelism: 4 - -j17_repeated_dtest_executor: &j17_repeated_dtest_executor - executor: - name: java17-executor - parallelism: 4 - -j11_repeated_upgrade_dtest_executor: &j11_repeated_upgrade_dtest_executor - executor: - name: java11-executor - parallelism: 4 - -j11_separate_jobs: &j11_separate_jobs - jobs: - - start_j11_build: - type: approval - - j11_build: - requires: - - start_j11_build - # Java 11 unit tests - - start_j11_unit_tests: - type: approval - - j11_unit_tests: - requires: - - start_j11_unit_tests - - j11_build - - start_j11_unit_tests_repeat: - type: approval - - j11_unit_tests_repeat: - requires: - - start_j11_unit_tests_repeat - - j11_build - - start_j11_jvm_dtests: - type: approval - - j11_jvm_dtests: - requires: - - start_j11_jvm_dtests - - j11_build - - start_j11_jvm_dtests_vnode: - type: approval - - j11_jvm_dtests_vnode: - requires: - - start_j11_jvm_dtests_vnode - - j11_build - - start_j11_jvm_dtests_repeat: - type: approval - - j11_jvm_dtests_repeat: - requires: - - start_j11_jvm_dtests_repeat - - j11_build - - start_j11_jvm_dtests_vnode_repeat: - type: approval - - j11_jvm_dtests_vnode_repeat: - requires: - - start_j11_jvm_dtests_vnode_repeat - - j11_build - - start_j17_jvm_dtests: - type: approval - - j17_jvm_dtests: - requires: - - start_j17_jvm_dtests - - j11_build - - start_j17_jvm_dtests_vnode: - type: approval - - j17_jvm_dtests_vnode: - requires: - - start_j17_jvm_dtests_vnode - - j11_build - - start_j17_jvm_dtests_repeat: - type: approval - - j17_jvm_dtests_repeat: - requires: - - start_j17_jvm_dtests_repeat - - j11_build - - start_j17_jvm_dtests_vnode_repeat: - type: approval - - j17_jvm_dtests_vnode_repeat: - requires: - - start_j17_jvm_dtests_vnode_repeat - - j11_build - - start_j11_simulator_dtests: - type: approval - - j11_simulator_dtests: - requires: - - start_j11_simulator_dtests - - j11_build - - start_j11_simulator_dtests_repeat: - type: approval - - j11_simulator_dtests_repeat: - requires: - - start_j11_simulator_dtests_repeat - - j11_build - - start_j11_cqlshlib_tests: - type: approval - - j11_cqlshlib_tests: - requires: - - start_j11_cqlshlib_tests - - j11_build - - start_j11_cqlshlib_cython_tests: - type: approval - - j11_cqlshlib_cython_tests: - requires: - - start_j11_cqlshlib_cython_tests - - j11_build - - start_j17_cqlshlib_tests: - type: approval - - j17_cqlshlib_tests: - requires: - - start_j17_cqlshlib_tests - - j11_build - - start_j17_cqlshlib_cython_tests: - type: approval - - j17_cqlshlib_cython_tests: - requires: - - start_j17_cqlshlib_cython_tests - - j11_build - # Java 17 unit tests - - start_j17_unit_tests: - type: approval - - j17_unit_tests: - requires: - - start_j17_unit_tests - - j11_build - - start_j17_unit_tests_repeat: - type: approval - - j17_unit_tests_repeat: - requires: - - start_j17_unit_tests_repeat - - j11_build - # specialized unit tests (all run on request) - - start_j11_utests_oa: - type: approval - - j11_utests_oa: - requires: - - start_j11_utests_oa - - j11_build - - start_j11_utests_oa_repeat: - type: approval - - j11_utests_oa_repeat: - requires: - - start_j11_utests_oa_repeat - - j11_build - - start_j17_utests_oa: - type: approval - - j17_utests_oa: - requires: - - start_j17_utests_oa - - j11_build - - start_j17_utests_oa_repeat: - type: approval - - j17_utests_oa_repeat: - requires: - - start_j17_utests_oa_repeat - - j11_build - - start_j11_utests_long: - type: approval - - j11_utests_long: - requires: - - start_j11_utests_long - - j11_build - - start_j17_utests_long: - type: approval - - j17_utests_long: - requires: - - start_j17_utests_long - - j11_build - - start_j11_utests_long_repeat: - type: approval - - j11_utests_long_repeat: - requires: - - start_j11_utests_long_repeat - - j11_build - - start_j17_utests_long_repeat: - type: approval - - j17_utests_long_repeat: - requires: - - start_j17_utests_long_repeat - - j11_build - - start_j11_utests_cdc: - type: approval - - j11_utests_cdc: - requires: - - start_j11_utests_cdc - - j11_build - - start_j17_utests_cdc: - type: approval - - j17_utests_cdc: - requires: - - start_j17_utests_cdc - - j11_build - - start_j11_utests_cdc_repeat: - type: approval - - j11_utests_cdc_repeat: - requires: - - start_j11_utests_cdc_repeat - - j11_build - - start_j17_utests_cdc_repeat: - type: approval - - j17_utests_cdc_repeat: - requires: - - start_j17_utests_cdc_repeat - - j11_build - - start_j11_utests_compression: - type: approval - - j11_utests_compression: - requires: - - start_j11_utests_compression - - j11_build - - start_j17_utests_compression: - type: approval - - j17_utests_compression: - requires: - - start_j17_utests_compression - - j11_build - - start_j11_utests_compression_repeat: - type: approval - - j11_utests_compression_repeat: - requires: - - start_j11_utests_compression_repeat - - j11_build - - start_j17_utests_compression_repeat: - type: approval - - j17_utests_compression_repeat: - requires: - - start_j17_utests_compression_repeat - - j11_build - - start_j11_utests_trie: - type: approval - - j11_utests_trie: - requires: - - start_j11_utests_trie - - j11_build - - start_j17_utests_trie: - type: approval - - j17_utests_trie: - requires: - - start_j17_utests_trie - - j11_build - - start_j11_utests_trie_repeat: - type: approval - - j11_utests_trie_repeat: - requires: - - start_j11_utests_trie_repeat - - j11_build - - start_j17_utests_trie_repeat: - type: approval - - j17_utests_trie_repeat: - requires: - - start_j17_utests_trie_repeat - - j11_build - - start_j11_utests_stress: - type: approval - - j11_utests_stress: - requires: - - start_j11_utests_stress - - j11_build - - start_j17_utests_stress: - type: approval - - j17_utests_stress: - requires: - - start_j17_utests_stress - - j11_build - - start_j11_utests_stress_repeat: - type: approval - - j11_utests_stress_repeat: - requires: - - start_j11_utests_stress_repeat - - j11_build - - start_j17_utests_stress_repeat: - type: approval - - j17_utests_stress_repeat: - requires: - - start_j17_utests_stress_repeat - - j11_build - - start_j11_utests_fqltool: - type: approval - - j11_utests_fqltool: - requires: - - start_j11_utests_fqltool - - j11_build - - start_j17_utests_fqltool: - type: approval - - j17_utests_fqltool: - requires: - - start_j17_utests_fqltool - - j11_build - - start_j11_utests_fqltool_repeat: - type: approval - - j11_utests_fqltool_repeat: - requires: - - start_j11_utests_fqltool_repeat - - j11_build - - start_j17_utests_fqltool_repeat: - type: approval - - j17_utests_fqltool_repeat: - requires: - - start_j17_utests_fqltool_repeat - - j11_build - - start_j11_utests_system_keyspace_directory: - type: approval - - j11_utests_system_keyspace_directory: - requires: - - start_j11_utests_system_keyspace_directory - - j11_build - - start_j17_utests_system_keyspace_directory: - type: approval - - j17_utests_system_keyspace_directory: - requires: - - start_j17_utests_system_keyspace_directory - - j11_build - - start_j11_utests_system_keyspace_directory_repeat: - type: approval - - j11_utests_system_keyspace_directory_repeat: - requires: - - start_j11_utests_system_keyspace_directory_repeat - - j11_build - - start_j17_utests_system_keyspace_directory_repeat: - type: approval - - j17_utests_system_keyspace_directory_repeat: - requires: - - start_j17_utests_system_keyspace_directory_repeat - - j11_build - # Java upgrade tests - - start_j11_dtest_jars_build: - type: approval - - j11_dtest_jars_build: - requires: - - j11_build - - start_j11_dtest_jars_build - - start_jvm_upgrade_dtests: - type: approval - - j11_jvm_upgrade_dtests: - requires: - - start_jvm_upgrade_dtests - - j11_dtest_jars_build - - start_jvm_upgrade_dtests_repeat: - type: approval - - j11_jvm_upgrade_dtests_repeat: - requires: - - start_jvm_upgrade_dtests_repeat - - j11_dtest_jars_build - # Python DTests - - start_j11_dtests: - type: approval - - j11_dtests: - requires: - - start_j11_dtests - - j11_build - - start_j11_dtests_vnode: - type: approval - - j11_dtests_vnode: - requires: - - start_j11_dtests_vnode - - j11_build - # Java 11 off-heap dtests - - start_j11_dtests_offheap: - type: approval - - j11_dtests_offheap: - requires: - - start_j11_dtests_offheap - - j11_build - - start_j11_dtests_offheap_repeat: - type: approval - - j11_dtests_offheap_repeat: - requires: - - start_j11_dtests_offheap_repeat - - j11_build - # Java 17 dtests - - start_j17_dtests: - type: approval - - j17_dtests: - requires: - - start_j17_dtests - - j11_build - - start_j17_dtests_vnode: - type: approval - - j17_dtests_vnode: - requires: - - start_j17_dtests_vnode - - j11_build - # Java 17 off-heap dtests - - start_j17_dtests_offheap: - type: approval - - j17_dtests_offheap: - requires: - - start_j17_dtests_offheap - - j11_build - - start_j17_dtests_offheap_repeat: - type: approval - - j17_dtests_offheap_repeat: - requires: - - start_j17_dtests_offheap_repeat - - j11_build - # Python large DTests - - start_j11_dtests_large: - type: approval - - j11_dtests_large: - requires: - - start_j11_dtests_large - - j11_build - - start_j11_dtests_large_repeat: - type: approval - - j11_dtests_large_repeat: - requires: - - start_j11_dtests_large_repeat - - j11_build - - start_j11_dtests_large_vnode: - type: approval - - j11_dtests_large_vnode: - requires: - - start_j11_dtests_large_vnode - - j11_build - - start_j11_dtests_large_vnode_repeat: - type: approval - - j11_dtests_large_vnode_repeat: - requires: - - start_j11_dtests_large_vnode_repeat - - j11_build - - start_j17_dtests_large: - type: approval - - j17_dtests_large: - requires: - - start_j17_dtests_large - - j11_build - - start_j17_dtests_large_repeat: - type: approval - - j17_dtests_large_repeat: - requires: - - start_j17_dtests_large_repeat - - j11_build - - start_j17_dtests_large_vnode: - type: approval - - j17_dtests_large_vnode: - requires: - - start_j17_dtests_large_vnode - - j11_build - - start_j17_dtests_large_vnode_repeat: - type: approval - - j17_dtests_large_vnode_repeat: - requires: - - start_j17_dtests_large_vnode_repeat - - j11_build - # Java 11 cqlsh dtests - - start_j11_cqlsh_tests: - type: approval - - j11_cqlsh_dtests_py3: - requires: - - start_j11_cqlsh_tests - - j11_build - - j11_cqlsh_dtests_py3_vnode: - requires: - - start_j11_cqlsh_tests - - j11_build - - j11_cqlsh_dtests_py38: - requires: - - start_j11_cqlsh_tests - - j11_build - - j11_cqlsh_dtests_py311: - requires: - - start_j11_cqlsh_tests - - j11_build - - j11_cqlsh_dtests_py38_vnode: - requires: - - start_j11_cqlsh_tests - - j11_build - - j11_cqlsh_dtests_py311_vnode: - requires: - - start_j11_cqlsh_tests - - j11_build - # Java 11 cqlsh offheap dtests offheap - - start_j11_cqlsh_tests_offheap: - type: approval - - j11_cqlsh_dtests_py3_offheap: - requires: - - start_j11_cqlsh_tests_offheap - - j11_build - - j11_cqlsh_dtests_py38_offheap: - requires: - - start_j11_cqlsh_tests_offheap - - j11_build - - j11_cqlsh_dtests_py311_offheap: - requires: - - start_j11_cqlsh_tests_offheap - - j11_build - # Java 17 cqlsh dtests - - start_j17_cqlsh_tests: - type: approval - - j17_cqlsh_dtests_py3: - requires: - - start_j17_cqlsh_tests - - j11_build - - j17_cqlsh_dtests_py3_vnode: - requires: - - start_j17_cqlsh_tests - - j11_build - - j17_cqlsh_dtests_py38: - requires: - - start_j17_cqlsh_tests - - j11_build - - j17_cqlsh_dtests_py311: - requires: - - start_j17_cqlsh_tests - - j11_build - - j17_cqlsh_dtests_py38_vnode: - requires: - - start_j17_cqlsh_tests - - j11_build - - j17_cqlsh_dtests_py311_vnode: - requires: - - start_j17_cqlsh_tests - - j11_build - # Java 17 cqlsh dtests off-heap - - start_j17_cqlsh_tests_offheap: - type: approval - - j17_cqlsh_dtests_py3_offheap: - requires: - - start_j17_cqlsh_tests_offheap - - j11_build - - j17_cqlsh_dtests_py38_offheap: - requires: - - start_j17_cqlsh_tests_offheap - - j11_build - - j17_cqlsh_dtests_py311_offheap: - requires: - - start_j17_cqlsh_tests_offheap - - j11_build - # Java 11 upgrade tests - - start_j11_upgrade_dtests: - type: approval - - j11_upgrade_dtests: - requires: - - start_j11_upgrade_dtests - - j11_build - # Java 11 repeated utest - - start_j11_repeated_ant_test: - type: approval - - j11_repeated_ant_test: - requires: - - start_j11_repeated_ant_test - - j11_build - # Java 17 repeated utest - - start_j17_repeated_ant_test: - type: approval - - j17_repeated_ant_test: - requires: - - start_j17_repeated_ant_test - - j11_build - # Java 11 repeated dtest - - start_j11_dtests_repeat: - type: approval - - j11_dtests_repeat: - requires: - - start_j11_dtests_repeat - - j11_build - - start_j11_dtests_vnode_repeat: - type: approval - - j11_dtests_vnode_repeat: - requires: - - start_j11_dtests_vnode_repeat - - j11_build - # Java 17 repeated dtest - - start_j17_dtests_repeat: - type: approval - - j17_dtests_repeat: - requires: - - start_j17_dtests_repeat - - j11_build - - start_j17_dtests_vnode_repeat: - type: approval - - j17_dtests_vnode_repeat: - requires: - - start_j17_dtests_vnode_repeat - - j11_build - # Repeated Python upgrade dtest - - start_j11_upgrade_dtests_repeat: - type: approval - - j11_upgrade_dtests_repeat: - requires: - - start_j11_upgrade_dtests_repeat - - j11_build - -j11_pre-commit_jobs: &j11_pre-commit_jobs - jobs: - - start_pre-commit_tests: - type: approval - - j11_build: - requires: - - start_pre-commit_tests - # Java 11 unit tests - - j11_unit_tests: - requires: - - j11_build - - j11_utests_oa: - requires: - - j11_build - - j11_utests_oa_repeat: - requires: - - j11_build - - j17_utests_oa_repeat: - requires: - - j11_build - - j11_unit_tests_repeat: - requires: - - j11_build - - j11_simulator_dtests: - requires: - - j11_build - - j11_simulator_dtests_repeat: - requires: - - j11_build - - j11_jvm_dtests: - requires: - - j11_build - - j11_jvm_dtests_repeat: - requires: - - j11_build - - j11_jvm_dtests_vnode: - requires: - - j11_build - - j11_jvm_dtests_vnode_repeat: - requires: - - j11_build - - j17_jvm_dtests: - requires: - - j11_build - - j17_jvm_dtests_repeat: - requires: - - j11_build - - j17_jvm_dtests_vnode: - requires: - - j11_build - - j17_jvm_dtests_vnode_repeat: - requires: - - j11_build - - j11_cqlshlib_tests: - requires: - - j11_build - - j11_cqlshlib_cython_tests: - requires: - - j11_build - - j17_cqlshlib_tests: - requires: - - j11_build - - j17_cqlshlib_cython_tests: - requires: - - j11_build - # Java 17 unit tests - - j17_unit_tests: - requires: - - j11_build - - j17_utests_oa: - requires: - - j11_build - - j17_unit_tests_repeat: - requires: - - j11_build - # specialized unit tests (all run on request) - - start_utests_long: - type: approval - - j11_utests_long: - requires: - - start_utests_long - - j11_build - - j17_utests_long: - requires: - - start_utests_long - - j11_build - - j11_utests_long_repeat: - requires: - - start_utests_long - - j11_build - - j17_utests_long_repeat: - requires: - - start_utests_long - - j11_build - - start_utests_cdc: - type: approval - - j11_utests_cdc: - requires: - - start_utests_cdc - - j11_build - - j17_utests_cdc: - requires: - - start_utests_cdc - - j11_build - - j11_utests_cdc_repeat: - requires: - - start_utests_cdc - - j11_build - - j17_utests_cdc_repeat: - requires: - - start_utests_cdc - - j11_build - - start_utests_compression: - type: approval - - j11_utests_compression: - requires: - - start_utests_compression - - j11_build - - j17_utests_compression: - requires: - - start_utests_compression - - j11_build - - j11_utests_compression_repeat: - requires: - - start_utests_compression - - j11_build - - j17_utests_compression_repeat: - requires: - - start_utests_compression - - j11_build - - start_utests_trie: - type: approval - - j11_utests_trie: - requires: - - start_utests_trie - - j11_build - - j17_utests_trie: - requires: - - start_utests_trie - - j11_build - - j11_utests_trie_repeat: - requires: - - start_utests_trie - - j11_build - - j17_utests_trie_repeat: - requires: - - start_utests_trie - - j11_build - - start_utests_stress: - type: approval - - j11_utests_stress: - requires: - - start_utests_stress - - j11_build - - j17_utests_stress: - requires: - - start_utests_stress - - j11_build - - j11_utests_stress_repeat: - requires: - - start_utests_stress - - j11_build - - j17_utests_stress_repeat: - requires: - - start_utests_stress - - j11_build - - start_utests_fqltool: - type: approval - - j11_utests_fqltool: - requires: - - start_utests_fqltool - - j11_build - - j17_utests_fqltool: - requires: - - start_utests_fqltool - - j11_build - - j11_utests_fqltool_repeat: - requires: - - start_utests_fqltool - - j11_build - - j17_utests_fqltool_repeat: - requires: - - start_utests_fqltool - - j11_build - - start_utests_system_keyspace_directory: - type: approval - - j11_utests_system_keyspace_directory: - requires: - - j11_build - - j17_utests_system_keyspace_directory: - requires: - - start_utests_system_keyspace_directory - - j11_build - - j11_utests_system_keyspace_directory_repeat: - requires: - - j11_build - - j17_utests_system_keyspace_directory_repeat: - requires: - - start_utests_system_keyspace_directory - - j11_build - # Java upgrade tests - - start_jvm_upgrade_dtests: - type: approval - - j11_dtest_jars_build: - requires: - - j11_build - - start_jvm_upgrade_dtests - - j11_jvm_upgrade_dtests: - requires: - - j11_dtest_jars_build - - j11_jvm_upgrade_dtests_repeat: - requires: - - j11_dtest_jars_build - # Python DTests - - j11_dtests: - requires: - - j11_build - - j11_dtests_repeat: - requires: - - j11_build - - j11_dtests_vnode: - requires: - - j11_build - - j11_dtests_vnode_repeat: - requires: - - j11_build - - start_j11_dtests_offheap: - type: approval - - j11_dtests_offheap: - requires: - - start_j11_dtests_offheap - - j11_build - - j11_dtests_offheap_repeat: - requires: - - start_j11_dtests_offheap - - j11_build - # Java 17 dtests - - j17_dtests: - requires: - - j11_build - - j17_dtests_repeat: - requires: - - j11_build - - j17_dtests_vnode: - requires: - - j11_build - - j17_dtests_vnode_repeat: - requires: - - j11_build - - start_j17_dtests_offheap: - type: approval - - j17_dtests_offheap: - requires: - - start_j17_dtests_offheap - - j11_build - - j17_dtests_offheap_repeat: - requires: - - start_j17_dtests_offheap - - j11_build - # Large Python DTests - - start_j11_dtests_large: - type: approval - - j11_dtests_large: - requires: - - start_j11_dtests_large - - j11_build - - j11_dtests_large_repeat: - requires: - - start_j11_dtests_large - - j11_build - - j11_dtests_large_vnode: - requires: - - start_j11_dtests_large - - j11_build - - j11_dtests_large_vnode_repeat: - requires: - - start_j11_dtests_large - - j11_build - - start_j17_dtests_large: - type: approval - - j17_dtests_large: - requires: - - start_j17_dtests_large - - j11_build - - j17_dtests_large_repeat: - requires: - - start_j17_dtests_large - - j11_build - - j17_dtests_large_vnode: - requires: - - start_j17_dtests_large - - j11_build - - j17_dtests_large_vnode_repeat: - requires: - - start_j17_dtests_large - - j11_build - # Java 11 cqlsh dtests - - j11_cqlsh_dtests_py3: - requires: - - j11_build - - j11_cqlsh_dtests_py3_vnode: - requires: - - j11_build - - j11_cqlsh_dtests_py38: - requires: - - j11_build - - j11_cqlsh_dtests_py311: - requires: - - j11_build - - j11_cqlsh_dtests_py38_vnode: - requires: - - j11_build - - j11_cqlsh_dtests_py311_vnode: - requires: - - j11_build - # Java 11 cqlsh dtests offheap - - start_j11_cqlsh_dtests_offheap: - type: approval - - j11_cqlsh_dtests_py3_offheap: - requires: - - start_j11_cqlsh_dtests_offheap - - j11_build - - j11_cqlsh_dtests_py38_offheap: - requires: - - start_j11_cqlsh_dtests_offheap - - j11_build - - j11_cqlsh_dtests_py311_offheap: - requires: - - start_j11_cqlsh_dtests_offheap - - j11_build - # Java 17 cqlsh dtests - - j17_cqlsh_dtests_py3: - requires: - - j11_build - - j17_cqlsh_dtests_py3_vnode: - requires: - - j11_build - - j17_cqlsh_dtests_py38: - requires: - - j11_build - - j17_cqlsh_dtests_py311: - requires: - - j11_build - - j17_cqlsh_dtests_py38_vnode: - requires: - - j11_build - - j17_cqlsh_dtests_py311_vnode: - requires: - - j11_build - # Java 17 cqlsh dtests off-heap - - start_j17_cqlsh-dtests-offheap: - type: approval - - j17_cqlsh_dtests_py3_offheap: - requires: - - start_j17_cqlsh-dtests-offheap - - j11_build - - j17_cqlsh_dtests_py38_offheap: - requires: - - start_j17_cqlsh-dtests-offheap - - j11_build - - j17_cqlsh_dtests_py311_offheap: - requires: - - start_j17_cqlsh-dtests-offheap - - j11_build - # Java 11 upgrade tests (on request) - - start_j11_upgrade_dtests: - type: approval - - j11_upgrade_dtests: - requires: - - j11_build - - start_j11_upgrade_dtests - - j11_upgrade_dtests_repeat: - requires: - - j11_build - - start_j11_upgrade_dtests - -j17_separate_jobs: &j17_separate_jobs - jobs: - - start_j17_build: - type: approval - - j17_build: - requires: - - start_j17_build - # Java 17 unit tests - - start_j17_unit_tests: - type: approval - - j17_unit_tests: - requires: - - start_j17_unit_tests - - j17_build - - start_j17_unit_tests_repeat: - type: approval - - j17_unit_tests_repeat: - requires: - - start_j17_unit_tests_repeat - - j17_build - - start_j17_jvm_dtests: - type: approval - - j17_jvm_dtests: - requires: - - start_j17_jvm_dtests - - j17_build - - start_j17_jvm_dtests_vnode: - type: approval - - j17_jvm_dtests_vnode: - requires: - - start_j17_jvm_dtests_vnode - - j17_build - - start_j17_jvm_dtests_repeat: - type: approval - - j17_jvm_dtests_repeat: - requires: - - start_j17_jvm_dtests_repeat - - j17_build - - start_j17_jvm_dtests_vnode_repeat: - type: approval - - j17_jvm_dtests_vnode_repeat: - requires: - - start_j17_jvm_dtests_vnode_repeat - - j17_build - - start_j17_cqlshlib_tests: - type: approval - - j17_cqlshlib_tests: - requires: - - start_j17_cqlshlib_tests - - j17_build - - start_j17_cqlshlib_cython_tests: - type: approval - - j17_cqlshlib_cython_tests: - requires: - - start_j17_cqlshlib_cython_tests - - j17_build - # Java 17 dtests - - start_j17_dtests: - type: approval - - j17_dtests: - requires: - - start_j17_dtests - - j17_build - - start_j17_dtests_vnode: - type: approval - - j17_dtests_vnode: - requires: - - start_j17_dtests_vnode - - j17_build - - start_j17_dtests_offheap: - type: approval - - j17_dtests_offheap: - requires: - - start_j17_dtests_offheap - - j17_build - - start_j17_dtests_offheap_repeat: - type: approval - - j17_dtests_offheap_repeat: - requires: - - start_j17_dtests_offheap_repeat - - j17_build - - start_j17_dtests_large: - type: approval - - j17_dtests_large: - requires: - - start_j17_dtests_large - - j17_build - - start_j17_dtests_large_repeat: - type: approval - - j17_dtests_large_repeat: - requires: - - start_j17_dtests_large_repeat - - j17_build - - start_j17_dtests_large_vnode: - type: approval - - j17_dtests_large_vnode: - requires: - - start_j17_dtests_large_vnode - - j17_build - - start_j17_dtests_large_vnode_repeat: - type: approval - - j17_dtests_large_vnode_repeat: - requires: - - start_j17_dtests_large_vnode_repeat - - j17_build - - start_j17_cqlsh_tests: - type: approval - - j17_cqlsh_dtests_py3: - requires: - - start_j17_cqlsh_tests - - j17_build - - j17_cqlsh_dtests_py3_vnode: - requires: - - start_j17_cqlsh_tests - - j17_build - - j17_cqlsh_dtests_py38: - requires: - - start_j17_cqlsh_tests - - j17_build - - j17_cqlsh_dtests_py311: - requires: - - start_j17_cqlsh_tests - - j17_build - - j17_cqlsh_dtests_py38_vnode: - requires: - - start_j17_cqlsh_tests - - j17_build - - j17_cqlsh_dtests_py311_vnode: - requires: - - start_j17_cqlsh_tests - - j17_build - - start_j17_cqlsh-dtests-offheap: - type: approval - - j17_cqlsh_dtests_py3_offheap: - requires: - - start_j17_cqlsh-dtests-offheap - - j17_build - - j17_cqlsh_dtests_py38_offheap: - requires: - - start_j17_cqlsh-dtests-offheap - - j17_build - - j17_cqlsh_dtests_py311_offheap: - requires: - - start_j17_cqlsh-dtests-offheap - - j17_build - # specialized unit tests (all run on request) - - start_j17_utests_oa: - type: approval - - j17_utests_oa: - requires: - - start_j17_utests_oa - - j17_build - - start_j17_utests_oa_repeat: - type: approval - - j17_utests_oa_repeat: - requires: - - start_j17_utests_oa_repeat - - j17_build - - start_j17_utests_long: - type: approval - - j17_utests_long: - requires: - - start_j17_utests_long - - j17_build - - start_j17_utests_long_repeat: - type: approval - - j17_utests_long_repeat: - requires: - - start_j17_utests_long_repeat - - j17_build - - start_j17_utests_cdc: - type: approval - - j17_utests_cdc: - requires: - - start_j17_utests_cdc - - j17_build - - start_j17_utests_cdc_repeat: - type: approval - - j17_utests_cdc_repeat: - requires: - - start_j17_utests_cdc_repeat - - j17_build - - start_j17_utests_compression: - type: approval - - j17_utests_compression: - requires: - - start_j17_utests_compression - - j17_build - - start_j17_utests_compression_repeat: - type: approval - - j17_utests_compression_repeat: - requires: - - start_j17_utests_compression_repeat - - j17_build - - start_j17_utests_trie: - type: approval - - j17_utests_trie: - requires: - - start_j17_utests_trie - - j17_build - - start_j17_utests_trie_repeat: - type: approval - - j17_utests_trie_repeat: - requires: - - start_j17_utests_trie_repeat - - j17_build - - start_j17_utests_stress: - type: approval - - j17_utests_stress: - requires: - - start_j17_utests_stress - - j17_build - - start_j17_utests_stress_repeat: - type: approval - - j17_utests_stress_repeat: - requires: - - start_j17_utests_stress_repeat - - j17_build - - start_j17_utests_fqltool: - type: approval - - j17_utests_fqltool: - requires: - - start_j17_utests_fqltool - - j17_build - - start_j17_utests_fqltool_repeat: - type: approval - - j17_utests_fqltool_repeat: - requires: - - start_j17_utests_fqltool_repeat - - j17_build - - start_j17_utests_system_keyspace_directory: - type: approval - - j17_utests_system_keyspace_directory: - requires: - - start_j17_utests_system_keyspace_directory - - j17_build - - start_j17_utests_system_keyspace_directory_repeat: - type: approval - - j17_utests_system_keyspace_directory_repeat: - requires: - - start_j17_utests_system_keyspace_directory_repeat - - j17_build - # Java 17 repeated utest - - start_j17_repeated_ant_test: - type: approval - - j17_repeated_ant_test: - requires: - - start_j17_repeated_ant_test - - j17_build - # Java 17 repeated dtest - - start_j17_dtests_repeat: - type: approval - - j17_dtests_repeat: - requires: - - start_j17_dtests_repeat - - j17_build - - start_j17_dtests_vnode_repeat: - type: approval - - j17_dtests_vnode_repeat: - requires: - - start_j17_dtests_vnode_repeat - - j17_build - -j17_pre-commit_jobs: &j17_pre-commit_jobs - jobs: - - start_pre-commit_tests: - type: approval - - j17_build: - requires: - - start_pre-commit_tests - - j17_unit_tests: - requires: - - j17_build - - j17_utests_oa: - requires: - - j17_build - - j17_utests_oa_repeat: - requires: - - j17_build - - j17_unit_tests_repeat: - requires: - - j17_build - - j17_jvm_dtests: - requires: - - j17_build - - j17_jvm_dtests_repeat: - requires: - - j17_build - - j17_jvm_dtests_vnode: - requires: - - j17_build - - j17_jvm_dtests_vnode_repeat: - requires: - - j17_build - - j17_cqlshlib_tests: - requires: - - j17_build - - j17_cqlshlib_cython_tests: - requires: - - j17_build - - j17_dtests: - requires: - - j17_build - - j17_dtests_repeat: - requires: - - j17_build - - j17_dtests_vnode: - requires: - - j17_build - - j17_dtests_vnode_repeat: - requires: - - j17_build - - start_j17_dtests_offheap: - type: approval - - j17_dtests_offheap: - requires: - - start_j17_dtests_offheap - - j17_build - - start_j17_dtests_offheap_repeat: - type: approval - - j17_dtests_offheap_repeat: - requires: - - start_j17_dtests_offheap_repeat - - j17_build - - start_j17_dtests_large: - type: approval - - j17_dtests_large: - requires: - - start_j17_dtests_large - - j17_build - - j17_dtests_large_repeat: - requires: - - start_j17_dtests_large - - j17_build - - j17_dtests_large_vnode: - requires: - - start_j17_dtests_large - - j17_build - - j17_dtests_large_vnode_repeat: - requires: - - start_j17_dtests_large - - j17_build - - j17_cqlsh_dtests_py3: - requires: - - j17_build - - j17_cqlsh_dtests_py3_vnode: - requires: - - j17_build - - j17_cqlsh_dtests_py38: - requires: - - j17_build - - j17_cqlsh_dtests_py311: - requires: - - j17_build - - j17_cqlsh_dtests_py38_vnode: - requires: - - j17_build - - j17_cqlsh_dtests_py311_vnode: - requires: - - j17_build - - start_j17_cqlsh-dtests-offheap: - type: approval - - j17_cqlsh_dtests_py3_offheap: - requires: - - start_j17_cqlsh-dtests-offheap - - j17_build - - j17_cqlsh_dtests_py38_offheap: - requires: - - start_j17_cqlsh-dtests-offheap - - j17_build - - j17_cqlsh_dtests_py311_offheap: - requires: - - start_j17_cqlsh-dtests-offheap - - j17_build - # specialized unit tests (all run on request) - - start_utests_long: - type: approval - - j17_utests_long: - requires: - - start_utests_long - - j17_build - - j17_utests_long_repeat: - requires: - - start_utests_long - - j17_build - - start_utests_cdc: - type: approval - - j17_utests_cdc: - requires: - - start_utests_cdc - - j17_build - - j17_utests_cdc_repeat: - requires: - - start_utests_cdc - - j17_build - - start_utests_compression: - type: approval - - j17_utests_compression: - requires: - - start_utests_compression - - j17_build - - j17_utests_compression_repeat: - requires: - - start_utests_compression - - j17_build - - start_utests_trie: - type: approval - - j17_utests_trie: - requires: - - start_utests_trie - - j17_build - - j17_utests_trie_repeat: - requires: - - start_utests_trie - - j17_build - - start_utests_stress: - type: approval - - j17_utests_stress: - requires: - - start_utests_stress - - j17_build - - j17_utests_stress_repeat: - requires: - - start_utests_stress - - j17_build - - start_utests_fqltool: - type: approval - - j17_utests_fqltool: - requires: - - start_utests_fqltool - - j17_build - - j17_utests_fqltool_repeat: - requires: - - start_utests_fqltool - - j17_build - - start_utests_system_keyspace_directory: - type: approval - - j17_utests_system_keyspace_directory: - requires: - - start_utests_system_keyspace_directory - - j17_build - - j17_utests_system_keyspace_directory_repeat: - requires: - - start_utests_system_keyspace_directory - - j17_build - -workflows: - version: 2 - java11_separate_tests: *j11_separate_jobs - java11_pre-commit_tests: *j11_pre-commit_jobs - java17_separate_tests: *j17_separate_jobs - java17_pre-commit_tests: *j17_pre-commit_jobs - -executors: - java11-executor: - parameters: - exec_resource_class: - type: string - default: medium - docker: - - image: apache/cassandra-testing-ubuntu2004-java11-w-dependencies:latest - resource_class: << parameters.exec_resource_class >> - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - environment: - <<: *default_env_vars - JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-11-openjdk-amd64 - CASSANDRA_USE_JDK11: true - - java17-executor: - parameters: - exec_resource_class: - type: string - default: medium - docker: - - image: apache/cassandra-testing-ubuntu2004-java11:latest - resource_class: << parameters.exec_resource_class >> - working_directory: ~/ - shell: /bin/bash -eo pipefail -l - environment: - <<: *default_env_vars - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - JDK_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - -build_common: &build_common - parallelism: 1 # This job doesn't benefit from parallelism - steps: - - log_environment - - clone_cassandra - - build_cassandra - - run_static_code_analysis - - persist_to_workspace: - root: /home/cassandra - paths: - - cassandra - - .m2 - -jobs: - j11_build: - executor: java11-executor - <<: *build_common - - j17_build: - executor: java17-executor - <<: *build_common - - j11_dtest_jars_build: - executor: java11-executor - parallelism: 1 - steps: - - attach_workspace: - at: /home/cassandra - - build_cassandra_dtest_jars - - persist_to_workspace: - root: /home/cassandra - paths: - - dtest_jars - - j11_unit_tests: - <<: *j11_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - create_junit_containers - - log_environment - - run_parallel_junit_tests - - j11_utests_oa: - <<: *j11_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - create_junit_containers - - log_environment - - run_parallel_junit_tests: - target: "testclasslist-oa" - - j11_simulator_dtests: - <<: *j11_small_executor - steps: - - attach_workspace: - at: /home/cassandra - - create_junit_containers - - log_environment - - run_simulator_tests - - j11_jvm_dtests: - <<: *j11_small_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - create_junit_containers: - classlistprefix: distributed - extra_filters: "| grep -v upgrade" - - log_environment - - run_parallel_junit_tests: - classlistprefix: distributed - target: "testclasslist" - - j11_jvm_dtests_vnode: - <<: *j11_small_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - create_junit_containers: - classlistprefix: distributed - extra_filters: "| grep -v upgrade" - - log_environment - - run_parallel_junit_tests: - classlistprefix: distributed - target: "testclasslist" - arguments: "-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'" - - j17_jvm_dtests: - <<: *j17_small_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - create_junit_containers: - classlistprefix: distributed - extra_filters: "| grep -v upgrade" - - log_environment - - run_parallel_junit_tests: - classlistprefix: distributed - target: "testclasslist" - - j11_jvm_upgrade_dtests: - <<: *j11_medium_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - create_junit_containers: - classlistprefix: distributed - extra_filters: "| grep upgrade" - - log_environment - - run_parallel_junit_tests: - classlistprefix: distributed - target: "testclasslist" - - j17_jvm_dtests_vnode: - <<: *j17_small_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - create_junit_containers: - classlistprefix: distributed - extra_filters: "| grep -v upgrade" - - log_environment - - run_parallel_junit_tests: - classlistprefix: distributed - target: "testclasslist" - arguments: "-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'" - - j17_unit_tests: - <<: *j17_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - create_junit_containers - - log_environment - - run_parallel_junit_tests - - j17_utests_oa: - <<: *j17_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - create_junit_containers - - log_environment - - run_parallel_junit_tests: - target: "testclasslist-oa" - - j11_cqlshlib_tests: - <<: *j11_small_executor - steps: - - attach_workspace: - at: /home/cassandra - - run_cqlshlib_tests - - j11_cqlshlib_cython_tests: - <<: *j11_small_executor - steps: - - attach_workspace: - at: /home/cassandra - - run_cqlshlib_cython_tests - - j17_cqlshlib_tests: - <<: *j17_small_executor - steps: - - attach_workspace: - at: /home/cassandra - - run_cqlshlib_tests - - j17_cqlshlib_cython_tests: - <<: *j17_small_executor - steps: - - attach_workspace: - at: /home/cassandra - - run_cqlshlib_cython_tests - - j11_utests_long: - <<: *j11_seq_executor - steps: - - attach_workspace: - at: /home/cassandra - - run_junit_tests: - target: long-test - - j17_utests_long: - <<: *j17_seq_executor - steps: - - attach_workspace: - at: /home/cassandra - - run_junit_tests: - target: long-test - - j11_utests_cdc: - <<: *j11_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - create_junit_containers - - log_environment - - run_parallel_junit_tests: - target: testclasslist-cdc - - j17_utests_cdc: - <<: *j17_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - create_junit_containers - - log_environment - - run_parallel_junit_tests: - target: testclasslist-cdc - - j11_utests_compression: - <<: *j11_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - create_junit_containers - - log_environment - - run_parallel_junit_tests: - target: testclasslist-compression - - j17_utests_compression: - <<: *j17_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - create_junit_containers - - log_environment - - run_parallel_junit_tests: - target: testclasslist-compression - - j11_utests_trie: - <<: *j11_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - create_junit_containers - - log_environment - - run_parallel_junit_tests: - target: testclasslist-trie - - j17_utests_trie: - <<: *j17_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - create_junit_containers - - log_environment - - run_parallel_junit_tests: - target: testclasslist-trie - - j11_utests_stress: - <<: *j11_seq_executor - steps: - - attach_workspace: - at: /home/cassandra - - run_junit_tests: - target: stress-test - - j17_utests_stress: - <<: *j17_seq_executor - steps: - - attach_workspace: - at: /home/cassandra - - run_junit_tests: - target: stress-test - - j11_utests_fqltool: - <<: *j11_seq_executor - steps: - - attach_workspace: - at: /home/cassandra - - run_junit_tests: - target: fqltool-test - - j17_utests_fqltool: - <<: *j17_seq_executor - steps: - - attach_workspace: - at: /home/cassandra - - run_junit_tests: - target: fqltool-test - - j11_utests_system_keyspace_directory: - <<: *j11_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - create_junit_containers - - log_environment - - run_parallel_junit_tests: - target: testclasslist-system-keyspace-directory - - j17_utests_system_keyspace_directory: - <<: *j17_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - create_junit_containers - - log_environment - - run_parallel_junit_tests: - target: testclasslist-system-keyspace-directory - - j11_dtests_vnode: - <<: *j11_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv - - create_dtest_containers: - file_tag: j11_with_vnodes - run_dtests_extra_args: "--use-vnodes --skip-resource-intensive-tests --pytest-options '-k not cql'" - - run_dtests: - file_tag: j11_with_vnodes - pytest_extra_args: '--use-vnodes --num-tokens=16 --skip-resource-intensive-tests' - - j11_dtests_offheap: - <<: *j11_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv - - create_dtest_containers: - file_tag: j11_dtests_offheap - run_dtests_extra_args: "--use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k not cql'" - - run_dtests: - file_tag: j11_dtests_offheap - pytest_extra_args: '--use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests' - - j17_dtests_vnode: - <<: *j17_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - log_environment - - clone_dtest - - create_venv - - create_dtest_containers: - file_tag: j17_with_vnodes - run_dtests_extra_args: "--use-vnodes --skip-resource-intensive-tests --pytest-options '-k not cql'" - - run_dtests: - file_tag: j17_with_vnodes - pytest_extra_args: '--use-vnodes --num-tokens=16 --skip-resource-intensive-tests' - - j17_dtests_offheap: - <<: *j17_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - log_environment - - clone_dtest - - create_venv - - create_dtest_containers: - file_tag: j17_dtests_offheap - run_dtests_extra_args: "--use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k not cql'" - - run_dtests: - file_tag: j17_dtests_offheap - pytest_extra_args: '--use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests' - - j11_dtests: - <<: *j11_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv - - create_dtest_containers: - file_tag: j11_without_vnodes - run_dtests_extra_args: "--skip-resource-intensive-tests --pytest-options '-k not cql'" - - run_dtests: - file_tag: j11_without_vnodes - pytest_extra_args: '--skip-resource-intensive-tests' - - j17_dtests: - <<: *j17_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - log_environment - - clone_dtest - - create_venv - - create_dtest_containers: - file_tag: j17_without_vnodes - run_dtests_extra_args: "--skip-resource-intensive-tests --pytest-options '-k not cql'" - - run_dtests: - file_tag: j17_without_vnodes - pytest_extra_args: '--skip-resource-intensive-tests' - - j11_upgrade_dtests: - <<: *j11_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv - - create_dtest_containers: - file_tag: j11_upgradetests_without_vnodes - run_dtests_extra_args: '--execute-upgrade-tests-only --upgrade-target-version-only --upgrade-version-selection all' - - run_dtests: - file_tag: j11_upgradetests_without_vnodes - pytest_extra_args: '--execute-upgrade-tests-only --upgrade-target-version-only --upgrade-version-selection all' - - j11_cqlsh_dtests_py3_vnode: - <<: *j11_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv - - create_dtest_containers: - file_tag: j11_with_vnodes - run_dtests_extra_args: "--use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql'" - - run_dtests: - file_tag: j11_with_vnodes - pytest_extra_args: '--use-vnodes --num-tokens=16 --skip-resource-intensive-tests' - extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6' - - j11_cqlsh_dtests_py3_offheap: - <<: *j11_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv - - create_dtest_containers: - file_tag: j11_dtests_offheap - run_dtests_extra_args: "--use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql'" - - run_dtests: - file_tag: j11_dtests_offheap - pytest_extra_args: '--use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests' - extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6' - - j11_cqlsh_dtests_py38_vnode: - <<: *j11_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv: - python_version: '3.8' - - create_dtest_containers: - file_tag: j11_with_vnodes - run_dtests_extra_args: "--use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql'" - python_version: '3.8' - - run_dtests: - file_tag: j11_with_vnodes - pytest_extra_args: '--use-vnodes --num-tokens=16 --skip-resource-intensive-tests' - extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.8' - python_version: '3.8' - - j11_cqlsh_dtests_py311_vnode: - <<: *j11_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv: - python_version: '3.11' - - create_dtest_containers: - file_tag: j11_with_vnodes - run_dtests_extra_args: "--use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql'" - python_version: '3.11' - - run_dtests: - file_tag: j11_with_vnodes - pytest_extra_args: '--use-vnodes --num-tokens=16 --skip-resource-intensive-tests' - extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.11' - python_version: '3.11' - - j11_cqlsh_dtests_py38_offheap: - <<: *j11_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv: - python_version: '3.8' - - create_dtest_containers: - file_tag: j11_dtests_offheap - run_dtests_extra_args: "--use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql'" - python_version: '3.8' - - run_dtests: - file_tag: j11_dtests_offheap - pytest_extra_args: '--use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests' - extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.8' - python_version: '3.8' - - j11_cqlsh_dtests_py311_offheap: - <<: *j11_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv: - python_version: '3.11' - - create_dtest_containers: - file_tag: j11_dtests_offheap - run_dtests_extra_args: "--use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql'" - python_version: '3.11' - - run_dtests: - file_tag: j11_dtests_offheap - pytest_extra_args: '--use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests' - extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.11' - python_version: '3.11' - - j11_cqlsh_dtests_py3: - <<: *j11_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv - - create_dtest_containers: - file_tag: j11_without_vnodes - run_dtests_extra_args: "--skip-resource-intensive-tests --pytest-options '-k cql'" - - run_dtests: - file_tag: j11_without_vnodes - pytest_extra_args: '--skip-resource-intensive-tests' - extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6' - - j11_cqlsh_dtests_py38: - <<: *j11_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv: - python_version: '3.8' - - create_dtest_containers: - file_tag: j11_without_vnodes - run_dtests_extra_args: "--skip-resource-intensive-tests --pytest-options '-k cql'" - python_version: '3.8' - - run_dtests: - file_tag: j11_without_vnodes - pytest_extra_args: '--skip-resource-intensive-tests' - extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.8' - python_version: '3.8' - - j11_cqlsh_dtests_py311: - <<: *j11_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv: - python_version: '3.11' - - create_dtest_containers: - file_tag: j11_without_vnodes - run_dtests_extra_args: "--skip-resource-intensive-tests --pytest-options '-k cql'" - python_version: '3.11' - - run_dtests: - file_tag: j11_without_vnodes - pytest_extra_args: '--skip-resource-intensive-tests' - extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.11' - python_version: '3.11' - - j17_cqlsh_dtests_py3_vnode: - <<: *j17_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv - - create_dtest_containers: - file_tag: j17_with_vnodes - run_dtests_extra_args: "--use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql'" - - run_dtests: - file_tag: j17_with_vnodes - pytest_extra_args: '--use-vnodes --num-tokens=16 --skip-resource-intensive-tests' - extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6' - - j17_cqlsh_dtests_py3_offheap: - <<: *j17_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv - - create_dtest_containers: - file_tag: j17_dtests_offheap - run_dtests_extra_args: "--use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql'" - - run_dtests: - file_tag: j17_dtests_offheap - pytest_extra_args: '--use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests' - extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6' - - j17_cqlsh_dtests_py38_vnode: - <<: *j17_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv: - python_version: '3.8' - - create_dtest_containers: - file_tag: j17_with_vnodes - run_dtests_extra_args: "--use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql'" - python_version: '3.8' - - run_dtests: - file_tag: j17_with_vnodes - pytest_extra_args: '--use-vnodes --num-tokens=16 --skip-resource-intensive-tests' - extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.8' - python_version: '3.8' - - j17_cqlsh_dtests_py311_vnode: - <<: *j17_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv: - python_version: '3.11' - - create_dtest_containers: - file_tag: j17_with_vnodes - run_dtests_extra_args: "--use-vnodes --skip-resource-intensive-tests --pytest-options '-k cql'" - python_version: '3.11' - - run_dtests: - file_tag: j17_with_vnodes - pytest_extra_args: '--use-vnodes --num-tokens=16 --skip-resource-intensive-tests' - extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.11' - python_version: '3.11' - - j17_cqlsh_dtests_py38_offheap: - <<: *j17_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv: - python_version: '3.8' - - create_dtest_containers: - file_tag: j17_dtests_offheap - run_dtests_extra_args: "--use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql'" - python_version: '3.8' - - run_dtests: - file_tag: j17_dtests_offheap - pytest_extra_args: '--use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests' - extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.8' - python_version: '3.8' - - j17_cqlsh_dtests_py311_offheap: - <<: *j17_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv: - python_version: '3.11' - - create_dtest_containers: - file_tag: j17_dtests_offheap - run_dtests_extra_args: "--use-vnodes --use-off-heap-memtables --skip-resource-intensive-tests --pytest-options '-k cql'" - python_version: '3.11' - - run_dtests: - file_tag: j17_dtests_offheap - pytest_extra_args: '--use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests' - extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.11' - python_version: '3.11' - - j17_cqlsh_dtests_py3: - <<: *j17_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv - - create_dtest_containers: - file_tag: j17_without_vnodes - run_dtests_extra_args: "--skip-resource-intensive-tests --pytest-options '-k cql'" - - run_dtests: - file_tag: j17_without_vnodes - pytest_extra_args: '--skip-resource-intensive-tests' - extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6' - - j17_cqlsh_dtests_py38: - <<: *j17_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv: - python_version: '3.8' - - create_dtest_containers: - file_tag: j17_without_vnodes - run_dtests_extra_args: "--skip-resource-intensive-tests --pytest-options '-k cql'" - python_version: '3.8' - - run_dtests: - file_tag: j17_without_vnodes - pytest_extra_args: '--skip-resource-intensive-tests' - extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.8' - python_version: '3.8' - - j17_cqlsh_dtests_py311: - <<: *j17_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv: - python_version: '3.11' - - create_dtest_containers: - file_tag: j17_without_vnodes - run_dtests_extra_args: "--skip-resource-intensive-tests --pytest-options '-k cql'" - python_version: '3.11' - - run_dtests: - file_tag: j17_without_vnodes - pytest_extra_args: '--skip-resource-intensive-tests' - extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.11' - python_version: '3.11' - - j11_dtests_large_vnode: - <<: *j11_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv - - create_dtest_containers: - file_tag: j11_large_with_vnodes - run_dtests_extra_args: '--use-vnodes --only-resource-intensive-tests --force-resource-intensive-tests' - - run_dtests: - file_tag: j11_large_with_vnodes - pytest_extra_args: '--use-vnodes --num-tokens=16 --only-resource-intensive-tests --force-resource-intensive-tests' - - j11_dtests_large: - <<: *j11_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv - - create_dtest_containers: - file_tag: j11_large_without_vnodes - run_dtests_extra_args: '--only-resource-intensive-tests --force-resource-intensive-tests' - - run_dtests: - file_tag: j11_large_without_vnodes - pytest_extra_args: '--only-resource-intensive-tests --force-resource-intensive-tests' - - j17_dtests_large_vnode: - <<: *j17_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv - - create_dtest_containers: - file_tag: j17_large_with_vnodes - run_dtests_extra_args: '--use-vnodes --only-resource-intensive-tests --force-resource-intensive-tests' - - run_dtests: - file_tag: j17_large_with_vnodes - pytest_extra_args: '--use-vnodes --num-tokens=16 --only-resource-intensive-tests --force-resource-intensive-tests' - - j17_dtests_large: - <<: *j17_par_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv - - create_dtest_containers: - file_tag: j17_large_without_vnodes - run_dtests_extra_args: '--only-resource-intensive-tests --force-resource-intensive-tests' - - run_dtests: - file_tag: j17_large_without_vnodes - pytest_extra_args: '--only-resource-intensive-tests --force-resource-intensive-tests' - - j11_unit_tests_repeat: - <<: *j11_repeated_utest_executor - steps: - - attach_workspace: - at: /home/cassandra - - log_environment - - run_unit_tests_repeat - - j17_unit_tests_repeat: - <<: *j17_repeated_utest_executor - steps: - - attach_workspace: - at: /home/cassandra - - log_environment - - run_unit_tests_repeat - - j11_utests_cdc_repeat: - <<: *j11_repeated_utest_executor - steps: - - attach_workspace: - at: /home/cassandra - - log_environment - - run_utests_cdc_repeat - - j17_utests_cdc_repeat: - <<: *j17_repeated_utest_executor - steps: - - attach_workspace: - at: /home/cassandra - - log_environment - - run_utests_cdc_repeat - - j11_utests_compression_repeat: - <<: *j11_repeated_utest_executor - steps: - - attach_workspace: - at: /home/cassandra - - log_environment - - run_utests_compression_repeat - - j17_utests_compression_repeat: - <<: *j17_repeated_utest_executor - steps: - - attach_workspace: - at: /home/cassandra - - log_environment - - run_utests_compression_repeat - - j11_utests_trie_repeat: - <<: *j11_repeated_utest_executor - steps: - - attach_workspace: - at: /home/cassandra - - log_environment - - run_utests_trie_repeat - - j17_utests_trie_repeat: - <<: *j17_repeated_utest_executor - steps: - - attach_workspace: - at: /home/cassandra - - log_environment - - run_utests_trie_repeat - - j11_utests_oa_repeat: - <<: *j11_repeated_utest_executor - steps: - - attach_workspace: - at: /home/cassandra - - log_environment - - run_utests_oa_repeat - - j17_utests_oa_repeat: - <<: *j17_repeated_utest_executor - steps: - - attach_workspace: - at: /home/cassandra - - log_environment - - run_utests_oa_repeat - - j11_utests_system_keyspace_directory_repeat: - <<: *j11_repeated_utest_executor - steps: - - attach_workspace: - at: /home/cassandra - - log_environment - - run_utests_system_keyspace_directory_repeat - - j17_utests_system_keyspace_directory_repeat: - <<: *j17_repeated_utest_executor - steps: - - attach_workspace: - at: /home/cassandra - - log_environment - - run_utests_system_keyspace_directory_repeat - - j11_utests_fqltool_repeat: - <<: *j11_repeated_utest_executor - steps: - - attach_workspace: - at: /home/cassandra - - log_environment - - run_utests_fqltool_repeat - - j17_utests_fqltool_repeat: - <<: *j17_repeated_utest_executor - steps: - - attach_workspace: - at: /home/cassandra - - log_environment - - run_utests_fqltool_repeat - - j11_utests_long_repeat: - <<: *j11_repeated_utest_executor - steps: - - attach_workspace: - at: /home/cassandra - - log_environment - - run_utests_long_repeat - - j17_utests_long_repeat: - <<: *j17_repeated_utest_executor - steps: - - attach_workspace: - at: /home/cassandra - - log_environment - - run_utests_long_repeat - - j11_utests_stress_repeat: - <<: *j11_repeated_utest_executor - steps: - - attach_workspace: - at: /home/cassandra - - log_environment - - run_utests_stress_repeat - - j17_utests_stress_repeat: - <<: *j17_repeated_utest_executor - steps: - - attach_workspace: - at: /home/cassandra - - log_environment - - run_utests_stress_repeat - - j11_jvm_upgrade_dtests_repeat: - <<: *j11_repeated_jvm_upgrade_dtest_executor - steps: - - attach_workspace: - at: /home/cassandra - - log_environment - - run_jvm_upgrade_dtests_repeat - - j11_jvm_dtests_repeat: - <<: *j11_repeated_utest_executor - steps: - - attach_workspace: - at: /home/cassandra - - log_environment - - run_jvm_dtests_repeat - - j11_jvm_dtests_vnode_repeat: - <<: *j11_repeated_utest_executor - steps: - - attach_workspace: - at: /home/cassandra - - log_environment - - run_jvm_dtests_vnode_repeat - - j11_simulator_dtests_repeat: - <<: *j11_repeated_utest_executor - steps: - - attach_workspace: - at: /home/cassandra - - log_environment - - run_simulator_dtests_repeat - - j17_jvm_dtests_repeat: - <<: *j17_repeated_utest_executor - steps: - - attach_workspace: - at: /home/cassandra - - log_environment - - run_jvm_dtests_repeat - - j17_jvm_dtests_vnode_repeat: - <<: *j17_repeated_utest_executor - steps: - - attach_workspace: - at: /home/cassandra - - log_environment - - run_jvm_dtests_vnode_repeat - - j11_repeated_ant_test: - <<: *j11_repeated_utest_executor - steps: - - attach_workspace: - at: /home/cassandra - - log_environment - - run_repeated_utest: - target: ${REPEATED_ANT_TEST_TARGET} - class: ${REPEATED_ANT_TEST_CLASS} - methods: ${REPEATED_ANT_TEST_METHODS} - vnodes: ${REPEATED_ANT_TEST_VNODES} - count: ${REPEATED_ANT_TEST_COUNT} - stop_on_failure: ${REPEATED_TESTS_STOP_ON_FAILURE} - - j17_repeated_ant_test: - <<: *j17_repeated_utest_executor - steps: - - attach_workspace: - at: /home/cassandra - - log_environment - - run_repeated_utest: - target: ${REPEATED_ANT_TEST_TARGET} - class: ${REPEATED_ANT_TEST_CLASS} - methods: ${REPEATED_ANT_TEST_METHODS} - vnodes: ${REPEATED_ANT_TEST_VNODES} - count: ${REPEATED_ANT_TEST_COUNT} - stop_on_failure: ${REPEATED_TESTS_STOP_ON_FAILURE} - - j11_dtests_repeat: - <<: *j11_repeated_dtest_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv - - run_repeated_dtest: - tests: ${REPEATED_DTESTS} - vnodes: "false" - upgrade: "false" - count: ${REPEATED_DTESTS_COUNT} - stop_on_failure: ${REPEATED_TESTS_STOP_ON_FAILURE} - - j11_dtests_vnode_repeat: - <<: *j11_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} - - j11_dtests_offheap_repeat: - <<: *j11_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" - - j11_dtests_large_repeat: - <<: *j11_repeated_dtest_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv - - run_repeated_dtest: - tests: ${REPEATED_LARGE_DTESTS} - vnodes: "false" - upgrade: "false" - count: ${REPEATED_LARGE_DTESTS_COUNT} - stop_on_failure: ${REPEATED_TESTS_STOP_ON_FAILURE} - extra_dtest_args: "--only-resource-intensive-tests --force-resource-intensive-tests" - - j11_dtests_large_vnode_repeat: - <<: *j11_repeated_dtest_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv - - run_repeated_dtest: - tests: ${REPEATED_LARGE_DTESTS} - vnodes: "true" - upgrade: "false" - count: ${REPEATED_LARGE_DTESTS_COUNT} - stop_on_failure: ${REPEATED_TESTS_STOP_ON_FAILURE} - extra_dtest_args: "--only-resource-intensive-tests --force-resource-intensive-tests" - - j17_dtests_repeat: - <<: *j17_repeated_dtest_executor - steps: - - attach_workspace: - at: /home/cassandra - - log_environment - - clone_dtest - - create_venv - - run_repeated_dtest: - tests: ${REPEATED_DTESTS} - vnodes: "false" - upgrade: "false" - count: ${REPEATED_DTESTS_COUNT} - stop_on_failure: ${REPEATED_TESTS_STOP_ON_FAILURE} - - j17_dtests_vnode_repeat: - <<: *j17_repeated_dtest_executor - steps: - - attach_workspace: - at: /home/cassandra - - log_environment - - 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} - - j17_dtests_offheap_repeat: - <<: *j17_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" - - j17_dtests_large_repeat: - <<: *j17_repeated_dtest_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv - - run_repeated_dtest: - tests: ${REPEATED_LARGE_DTESTS} - vnodes: "false" - upgrade: "false" - count: ${REPEATED_LARGE_DTESTS_COUNT} - stop_on_failure: ${REPEATED_TESTS_STOP_ON_FAILURE} - extra_dtest_args: "--only-resource-intensive-tests --force-resource-intensive-tests" - - j17_dtests_large_vnode_repeat: - <<: *j17_repeated_dtest_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv - - run_repeated_dtest: - tests: ${REPEATED_LARGE_DTESTS} - vnodes: "true" - upgrade: "false" - count: ${REPEATED_LARGE_DTESTS_COUNT} - stop_on_failure: ${REPEATED_TESTS_STOP_ON_FAILURE} - extra_dtest_args: "--only-resource-intensive-tests --force-resource-intensive-tests" - - j11_upgrade_dtests_repeat: - <<: *j11_repeated_upgrade_dtest_executor - steps: - - attach_workspace: - at: /home/cassandra - - clone_dtest - - create_venv - - run_repeated_dtest: - tests: ${REPEATED_UPGRADE_DTESTS} - vnodes: "false" - upgrade: "true" - stop_on_failure: ${REPEATED_TESTS_STOP_ON_FAILURE} - count: ${REPEATED_UPGRADE_DTESTS_COUNT} - -commands: - log_environment: - steps: - - run: - name: Log Environment Information - command: | - echo '*** id ***' - id - echo '*** cat /proc/cpuinfo ***' - cat /proc/cpuinfo - echo '*** free -m ***' - free -m - echo '*** df -m ***' - df -m - echo '*** ifconfig -a ***' - ifconfig -a - echo '*** uname -a ***' - uname -a - echo '*** mount ***' - mount - echo '*** env ***' - env - echo '*** java ***' - which java - java -version - - clone_cassandra: - steps: - - run: - name: Clone Cassandra Repository (via git) - command: | - git clone --single-branch --depth 1 --branch $CIRCLE_BRANCH https://github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME.git ~/cassandra - - clone_dtest: - steps: - - run: - name: Clone Cassandra dtest Repository (via git) - command: | - git clone --single-branch --branch $DTEST_BRANCH --depth 1 $DTEST_REPO ~/cassandra-dtest - - build_cassandra: - steps: - - run: - name: Build Cassandra - command: | - export PATH=$JAVA_HOME/bin:$PATH - cd ~/cassandra - # Loop to prevent failure due to maven-ant-tasks not downloading a jar.. - for x in $(seq 1 3); do - ${ANT_HOME}/bin/ant clean realclean jar - RETURN="$?" - if [ "${RETURN}" -eq "0" ]; then - break - fi - done - # Exit, if we didn't build successfully - if [ "${RETURN}" -ne "0" ]; then - echo "Build failed with exit code: ${RETURN}" - exit ${RETURN} - fi - no_output_timeout: 15m - - build_cassandra_dtest_jars: - steps: - - run: - name: Build Cassandra DTest jars - command: | - export PATH=$JAVA_HOME/bin:$PATH - cd ~/cassandra - mkdir ~/dtest_jars - git remote add apache https://github.com/apache/cassandra.git - for branch in cassandra-4.0 cassandra-4.1 trunk; do - # check out the correct cassandra version: - git remote set-branches --add apache '$branch' - git fetch --depth 1 apache $branch - git checkout $branch - git clean -fd - # Loop to prevent failure due to maven-ant-tasks not downloading a jar.. - for x in $(seq 1 3); do - ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar -Dno-checkstyle=true -Drat.skip=true - RETURN="$?" - if [ "${RETURN}" -eq "0" ]; then - cp build/dtest*.jar ~/dtest_jars - break - fi - done - # Exit, if we didn't build successfully - if [ "${RETURN}" -ne "0" ]; then - echo "Build failed with exit code: ${RETURN}" - exit ${RETURN} - fi - done - # and build the dtest-jar for the branch under test - ${ANT_HOME}/bin/ant realclean - git checkout origin/$CIRCLE_BRANCH - git clean -fd - for x in $(seq 1 3); do - ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar -Dno-checkstyle=true -Drat.skip=true - RETURN="$?" - if [ "${RETURN}" -eq "0" ]; then - cp build/dtest*.jar ~/dtest_jars - break - fi - done - # Exit, if we didn't build successfully - if [ "${RETURN}" -ne "0" ]; then - echo "Build failed with exit code: ${RETURN}" - exit ${RETURN} - fi - ls -l ~/dtest_jars - no_output_timeout: 15m - - run_static_code_analysis: - steps: - - run: - name: Run static code analysis - command: | - export PATH=$JAVA_HOME/bin:$PATH - cd ~/cassandra - ant check - - create_junit_containers: - parameters: - classlistprefix: - type: string - default: unit - extra_filters: - type: string - default: "" - steps: - - run: - name: Determine <> Tests to Run - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - rm -fr ~/cassandra-dtest/upgrade_tests - echo "***java tests***" - - # get all of our unit test filenames - set -eo pipefail && circleci tests glob "$HOME/cassandra/test/<>/**/*.java" > /tmp/all_java_unit_tests.txt - - # split up the unit tests into groups based on the number of containers we have - set -eo pipefail && circleci tests split --split-by=timings --timings-type=filename --index=${CIRCLE_NODE_INDEX} --total=${CIRCLE_NODE_TOTAL} /tmp/all_java_unit_tests.txt > /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt - set -eo pipefail && cat /tmp/java_tests_${CIRCLE_NODE_INDEX}.txt | sed "s;^/home/cassandra/cassandra/test/<>/;;g" | grep "Test\.java$" <> > /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - echo "** /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt" - cat /tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt - - no_output_timeout: 15m - - run_simulator_tests: - parameters: - no_output_timeout: - type: string - default: 30m - steps: - - run: - name: Run Simulator Tests - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant test-simulator-dtest -Dno-build-test=true - no_output_timeout: <> - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - - run_junit_tests: - parameters: - target: - type: string - no_output_timeout: - type: string - default: 15m - steps: - - run: - name: Run Unit Tests (<>) - command: | - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - ant <> -Dno-build-test=true - no_output_timeout: <> - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - - run_cqlshlib_tests: - parameters: - no_output_timeout: - type: string - default: 15m - steps: - - run: - name: Run cqlshlib Unit Tests - command: | - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra/ - ant jar -Dno-checkstyle=true -Drat.skip=true -Dant.gen-doc.skip=true -Djavadoc.skip=true - ./pylib/cassandra-cqlsh-tests.sh $(pwd) - no_output_timeout: <> - - store_test_results: - path: /tmp/cassandra/pylib - - run_cqlshlib_cython_tests: - parameters: - no_output_timeout: - type: string - default: 15m - steps: - - run: - name: Run cqlshlib Unit Tests - command: | - export PATH=$JAVA_HOME/bin:$PATH - export cython="yes" - time mv ~/cassandra /tmp - cd /tmp/cassandra/ - ant jar -Dno-checkstyle=true -Drat.skip=true -Dant.gen-doc.skip=true -Djavadoc.skip=true - ./pylib/cassandra-cqlsh-tests.sh $(pwd) - no_output_timeout: <> - - store_test_results: - path: /tmp/cassandra/pylib - - run_parallel_junit_tests: - parameters: - target: - type: string - default: testclasslist - no_output_timeout: - type: string - default: 15m - classlistprefix: - type: string - default: unit - arguments: - type: string - default: " " - steps: - - run: - name: Run Unit Tests (<>) - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - test_timeout=$(grep 'name="test.<>.timeout"' build.xml | awk -F'"' '{print $4}' || true) - if [ -z "$test_timeout" ]; then - test_timeout=$(grep 'name="test.timeout"' build.xml | awk -F'"' '{print $4}') - fi - ant <> <> -Dtest.timeout="$test_timeout" -Dtest.classlistfile=/tmp/java_tests_${CIRCLE_NODE_INDEX}_final.txt -Dtest.classlistprefix=<> -Dno-build-test=true - no_output_timeout: <> - - store_test_results: - path: /tmp/cassandra/build/test/output/ - - store_artifacts: - path: /tmp/cassandra/build/test/output - destination: junitxml - - store_artifacts: - path: /tmp/cassandra/build/test/logs - destination: logs - - create_venv: - parameters: - python_version: - type: enum - default: "3.6" - enum: ["3.6", "3.7", "3.8", "3.11"] - steps: - - run: - name: Configure virtualenv and python Dependencies - command: | - # note, this should be super quick as all dependencies should be pre-installed in the docker image - # if additional dependencies were added to requirmeents.txt and the docker image hasn't been updated - # we'd have to install it here at runtime -- which will make things slow, so do yourself a favor and - # rebuild the docker image! (it automatically pulls the latest requirements.txt on build) - source ~/env<>/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - pip3 install --exists-action w --upgrade -r ~/cassandra-dtest/requirements.txt - pip3 uninstall -y cqlsh - pip3 freeze - - create_dtest_containers: - parameters: - file_tag: - type: string - run_dtests_extra_args: - type: string - default: '' - extra_env_args: - type: string - default: '' - tests_filter_pattern: - type: string - default: '' - python_version: - type: enum - default: "3.6" - enum: ["3.6", "3.7", "3.8", "3.11"] - steps: - - run: - name: Determine Tests to Run (<>) - no_output_timeout: 5m - command: | - # reminder: this code (along with all the steps) is independently executed on every circle container - # so the goal here is to get the circleci script to return the tests *this* container will run - # which we do via the `circleci` cli tool. - - cd cassandra-dtest - source ~/env<>/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - if [ -n '<>' ]; then - export <> - fi - - echo "***Collected DTests (<>)***" - set -eo pipefail && ./run_dtests.py <> --dtest-print-tests-only --dtest-print-tests-output=/tmp/all_dtest_tests_<>_raw --cassandra-dir=../cassandra - if [ -z '<>' ]; then - mv /tmp/all_dtest_tests_<>_raw /tmp/all_dtest_tests_<> - else - grep -e '<>' /tmp/all_dtest_tests_<>_raw > /tmp/all_dtest_tests_<> || { echo "Filter did not match any tests! Exiting build."; exit 0; } - fi - set -eo pipefail && circleci tests split --split-by=timings --timings-type=classname /tmp/all_dtest_tests_<> > /tmp/split_dtest_tests_<>.txt - cat /tmp/split_dtest_tests_<>.txt | tr '\n' ' ' > /tmp/split_dtest_tests_<>_final.txt - cat /tmp/split_dtest_tests_<>_final.txt - - run_dtests: - parameters: - file_tag: - type: string - pytest_extra_args: - type: string - default: '' - extra_env_args: - type: string - default: '' - python_version: - type: enum - default: "3.6" - enum: ["3.6", "3.7", "3.8", "3.11"] - steps: - - run: - name: Run dtests (<>) - no_output_timeout: 15m - command: | - echo "cat /tmp/split_dtest_tests_<>_final.txt" - cat /tmp/split_dtest_tests_<>_final.txt - - source ~/env<>/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - if [ -n '<>' ]; then - export <> - fi - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - # 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 - export SPLIT_TESTS=`cat /tmp/split_dtest_tests_<>_final.txt` - if [ ! -z "$SPLIT_TESTS" ]; then - set -o pipefail && cd ~/cassandra-dtest && pytest <> --log-level="DEBUG" --junit-xml=/tmp/results/dtests/pytest_result_<>.xml -s --cassandra-dir=/home/cassandra/cassandra --keep-test-dir $SPLIT_TESTS 2>&1 | tee /tmp/dtest/stdout.txt - else - echo "Tune your parallelism, there are more containers than test classes. Nothing to do in this container" - (exit 1) - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest_<> - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_<>_logs - - run_unit_tests_repeat: - steps: - - run_repeated_utests: - target: testsome - tests: ${REPEATED_UTESTS} - count: ${REPEATED_UTESTS_COUNT} - stop_on_failure: ${REPEATED_TESTS_STOP_ON_FAILURE} - - run_utests_cdc_repeat: - steps: - - run_repeated_utests: - target: test-cdc - tests: ${REPEATED_UTESTS} - count: ${REPEATED_UTESTS_COUNT} - stop_on_failure: ${REPEATED_TESTS_STOP_ON_FAILURE} - - run_utests_compression_repeat: - steps: - - run_repeated_utests: - target: test-compression - tests: ${REPEATED_UTESTS} - count: ${REPEATED_UTESTS_COUNT} - stop_on_failure: ${REPEATED_TESTS_STOP_ON_FAILURE} - - run_utests_trie_repeat: - steps: - - run_repeated_utests: - target: test-trie - tests: ${REPEATED_UTESTS} - count: ${REPEATED_UTESTS_COUNT} - stop_on_failure: ${REPEATED_TESTS_STOP_ON_FAILURE} - - run_utests_oa_repeat: - steps: - - run_repeated_utests: - target: test-oa - tests: ${REPEATED_UTESTS} - count: ${REPEATED_UTESTS_COUNT} - stop_on_failure: ${REPEATED_TESTS_STOP_ON_FAILURE} - - run_utests_system_keyspace_directory_repeat: - steps: - - run_repeated_utests: - target: test-system-keyspace-directory - tests: ${REPEATED_UTESTS} - count: ${REPEATED_UTESTS_COUNT} - stop_on_failure: ${REPEATED_TESTS_STOP_ON_FAILURE} - - run_utests_long_repeat: - steps: - - run_repeated_utests: - target: long-testsome - tests: ${REPEATED_UTESTS_LONG} - count: ${REPEATED_UTESTS_LONG_COUNT} - stop_on_failure: ${REPEATED_TESTS_STOP_ON_FAILURE} - - run_utests_fqltool_repeat: - steps: - - run_repeated_utests: - target: fqltool-test - tests: ${REPEATED_UTESTS_FQLTOOL} - count: ${REPEATED_UTESTS_FQLTOOL_COUNT} - stop_on_failure: ${REPEATED_TESTS_STOP_ON_FAILURE} - - run_utests_stress_repeat: - steps: - - run_repeated_utests: - target: stress-test-some - tests: ${REPEATED_UTESTS_STRESS} - count: ${REPEATED_UTESTS_STRESS_COUNT} - stop_on_failure: ${REPEATED_TESTS_STOP_ON_FAILURE} - - run_jvm_dtests_repeat: - steps: - - run_repeated_utests: - target: test-jvm-dtest-some - tests: ${REPEATED_JVM_DTESTS} - count: ${REPEATED_JVM_DTESTS_COUNT} - vnodes: false - stop_on_failure: ${REPEATED_TESTS_STOP_ON_FAILURE} - - run_simulator_dtests_repeat: - steps: - - run_repeated_utests: - target: test-simulator-dtest - tests: ${REPEATED_SIMULATOR_DTESTS} - count: ${REPEATED_SIMULATOR_DTESTS_COUNT} - stop_on_failure: ${REPEATED_TESTS_STOP_ON_FAILURE} - - run_jvm_dtests_vnode_repeat: - steps: - - run_repeated_utests: - target: test-jvm-dtest-some - tests: ${REPEATED_JVM_DTESTS} - count: ${REPEATED_JVM_DTESTS_COUNT} - vnodes: true - stop_on_failure: ${REPEATED_TESTS_STOP_ON_FAILURE} - - run_jvm_upgrade_dtests_repeat: - steps: - - run_repeated_utests: - target: test-jvm-dtest-some - tests: ${REPEATED_JVM_UPGRADE_DTESTS} - count: ${REPEATED_JVM_UPGRADE_DTESTS_COUNT} - vnodes: false - stop_on_failure: ${REPEATED_TESTS_STOP_ON_FAILURE} - - run_repeated_utests: - parameters: - target: - type: string - tests: - type: string - count: - type: string - vnodes: - type: boolean - default: false - stop_on_failure: - type: string - steps: - - run: - name: Repeatedly run new or modifed JUnit tests - no_output_timeout: 15m - command: | - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - - # Calculate the number of test iterations to be run by the current parallel runner. - count=$((<> / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (<> % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - # Put manually specified tests and automatically detected tests together, removing duplicates - tests=$(echo <> | sed -e "s///" | sed -e "s/ //" | tr "," "\n" | tr " " "\n" | sort -n | uniq -u) - echo "Tests to be repeated: ${tests}" - - # Prepare the JVM dtests vnodes argument, which is optional. - vnodes=<> - vnodes_args="" - if [ "$vnodes" = true ] ; then - vnodes_args="-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'" - fi - - # Prepare the testtag for the target, used by the test macro in build.xml to group the output files - target=<> - testtag="" - if [[ $target == "test-cdc" ]]; then - testtag="cdc" - elif [[ $target == "test-compression" ]]; then - testtag="compression" - elif [[ $target == "test-system-keyspace-directory" ]]; then - testtag="system_keyspace_directory" - elif [[ $target == "test-trie" ]]; then - testtag="trie" - elif [[ $target == "test-oa" ]]; then - testtag="oa" - fi - - # Run each test class as many times as requested. - exit_code="$?" - for test in $tests; do - - # Split class and method names from the test name - if [[ $test =~ "#" ]]; then - class=${test%"#"*} - method=${test#*"#"} - else - class=$test - method="" - fi - - # Prepare the -Dtest.name argument. - # It can be the fully qualified class name or the short class name, depending on the target. - if [[ $target == "test" || \ - $target == "test-cdc" || \ - $target == "test-compression" || \ - $target == "test-trie" || \ - $target == "test-oa" || \ - $target == "test-system-keyspace-directory" || \ - $target == "fqltool-test" || \ - $target == "long-test" || \ - $target == "stress-test" || \ - $target == "test-simulator-dtest" ]]; then - name_arg="-Dtest.name=${class##*.}" - else - name_arg="-Dtest.name=$class" - fi - - # Prepare the -Dtest.methods argument, which is optional - if [[ $method == "" ]]; then - methods_arg="" - else - methods_arg="-Dtest.methods=$method" - fi - - for i in $(seq -w 1 $count); do - echo "Running test $test, iteration $i of $count" - - # run the test - status="passes" - if !( set -o pipefail && \ - ant <> $name_arg $methods_arg $vnodes_args -Dno-build-test=true | \ - tee stdout.txt \ - ); then - status="fails" - exit_code=1 - fi - - # move the stdout output file - dest=/tmp/results/repeated_utests/stdout/${status}/${i} - mkdir -p $dest - mv stdout.txt $dest/${test}.txt - - # move the XML output files - source=build/test/output/${testtag} - dest=/tmp/results/repeated_utests/output/${status}/${i} - mkdir -p $dest - if [[ -d $source && -n "$(ls $source)" ]]; then - mv $source/* $dest/ - fi - - # move the log files - source=build/test/logs/${testtag} - dest=/tmp/results/repeated_utests/logs/${status}/${i} - mkdir -p $dest - if [[ -d $source && -n "$(ls $source)" ]]; then - mv $source/* $dest/ - fi - - # maybe stop iterations on test failure - if [[ <> = true ]] && (( $exit_code > 0 )); then - break - fi - done - done - (exit ${exit_code}) - - store_test_results: - path: /tmp/results/repeated_utests/output - - store_artifacts: - path: /tmp/results/repeated_utests/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utests/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utests/logs - destination: logs - - run_repeated_utest: - parameters: - target: - type: string - class: - type: string - methods: - type: string - vnodes: - type: string - count: - type: string - stop_on_failure: - type: string - steps: - - run: - name: Run repeated JUnit test - no_output_timeout: 15m - command: | - if [ "<>" == "" ]; then - echo "Repeated utest class name hasn't been defined, exiting without running any test" - elif [ "<>" == "" ]; then - echo "Repeated utest count hasn't been defined, exiting without running any test" - elif [ "<>" -le 0 ]; then - echo "Repeated utest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((<> / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (<> % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running <> <> <> <> times" - - set -x - export PATH=$JAVA_HOME/bin:$PATH - time mv ~/cassandra /tmp - cd /tmp/cassandra - if [ -d ~/dtest_jars ]; then - cp ~/dtest_jars/dtest* /tmp/cassandra/build/ - fi - - target=<> - class_path=<> - class_name="${class_path##*.}" - - # Prepare the -Dtest.name argument. - # It can be the fully qualified class name or the short class name, depending on the target. - if [[ $target == "test" || \ - $target == "test-cdc" || \ - $target == "test-compression" || \ - $target == "test-trie" || \ - $target == "test-oa" || \ - $target == "test-system-keyspace-directory" || \ - $target == "fqltool-test" || \ - $target == "long-test" || \ - $target == "stress-test" || \ - $target == "test-simulator-dtest" ]]; then - name="-Dtest.name=$class_name" - else - name="-Dtest.name=$class_path" - fi - - # Prepare the -Dtest.methods argument, which is optional - if [ "<>" == "" ]; then - methods="" - else - methods="-Dtest.methods=<>" - fi - - # Prepare the JVM dtests vnodes argument, which is optional - vnodes_args="" - if <>; then - vnodes_args="-Dtest.jvm.args='-Dcassandra.dtest.num_tokens=16'" - fi - - # Run the test target as many times as requested collecting the exit code, - # stopping the iteration only if stop_on_failure is set. - exit_code="$?" - for i in $(seq -w 1 $count); do - - echo "Running test iteration $i of $count" - - # run the test - status="passes" - if !( set -o pipefail && ant $target $name $methods $vnodes_args -Dno-build-test=true | tee stdout.txt ); then - status="fails" - exit_code=1 - fi - - # move the stdout output file - dest=/tmp/results/repeated_utest/stdout/${status}/${i} - mkdir -p $dest - mv stdout.txt $dest/<>-<>.txt - - # move the XML output files - source=build/test/output - dest=/tmp/results/repeated_utest/output/${status}/${i} - mkdir -p $dest - if [[ -d $source && -n "$(ls $source)" ]]; then - mv $source/* $dest/ - fi - - # move the log files - source=build/test/logs - dest=/tmp/results/repeated_utest/logs/${status}/${i} - mkdir -p $dest - if [[ -d $source && -n "$(ls $source)" ]]; then - mv $source/* $dest/ - fi - - # maybe stop iterations on test failure - if [[ <> = true ]] && (( $exit_code > 0 )); then - break - fi - done - - (exit ${exit_code}) - fi - fi - - store_test_results: - path: /tmp/results/repeated_utest/output - - store_artifacts: - path: /tmp/results/repeated_utest/stdout - destination: stdout - - store_artifacts: - path: /tmp/results/repeated_utest/output - destination: junitxml - - store_artifacts: - path: /tmp/results/repeated_utest/logs - destination: logs - - run_repeated_dtest: - parameters: - tests: - type: string - vnodes: - type: string - upgrade: - type: string - count: - type: string - stop_on_failure: - type: string - extra_dtest_args: - type: string - default: "" - steps: - - run: - name: Run repeated Python DTests - no_output_timeout: 15m - command: | - if [ "<>" == "" ]; then - echo "Repeated dtest name hasn't been defined, exiting without running any test" - elif [ "<>" == "" ]; then - echo "Repeated dtest count hasn't been defined, exiting without running any test" - elif [ "<>" -le 0 ]; then - echo "Repeated dtest count is lesser or equals than zero, exiting without running any test" - else - - # Calculate the number of test iterations to be run by the current parallel runner. - # Since we are running the same test multiple times there is no need to use `circleci tests split`. - count=$((<> / CIRCLE_NODE_TOTAL)) - if (($CIRCLE_NODE_INDEX < (<> % CIRCLE_NODE_TOTAL))); then - count=$((count+1)) - fi - - if (($count <= 0)); then - echo "No tests to run in this runner" - else - echo "Running <> $count times" - - source ~/env3.6/bin/activate - export PATH=$JAVA_HOME/bin:$PATH - - java -version - cd ~/cassandra-dtest - mkdir -p /tmp/dtest - - echo "env: $(env)" - echo "** done env" - mkdir -p /tmp/results/dtests - - tests_arg=$(echo <> | sed -e "s/,/ /g") - - stop_on_failure_arg="" - if <>; then - stop_on_failure_arg="-x" - fi - - vnodes_args="" - if <>; then - vnodes_args="--use-vnodes --num-tokens=16" - fi - - upgrade_arg="" - if <>; then - upgrade_arg="--execute-upgrade-tests --upgrade-target-version-only --upgrade-version-selection all" - 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 - fi - fi - - store_test_results: - path: /tmp/results - - store_artifacts: - path: /tmp/dtest - destination: dtest - - store_artifacts: - path: ~/cassandra-dtest/logs - destination: dtest_logs diff --git a/.circleci/config_template_11_and_17.yml.PAID.patch b/.circleci/config_template_11_and_17.yml.PAID.patch deleted file mode 100644 index 8ef5533d13..0000000000 --- a/.circleci/config_template_11_and_17.yml.PAID.patch +++ /dev/null @@ -1,397 +0,0 @@ ---- config_template_11_and_17.yml 2023-06-16 12:35:53.262925452 +0100 -+++ config_template_11_and_17.yml.PAID 2023-06-16 12:38:27.607627603 +0100 -@@ -157,14 +157,14 @@ - j11_par_executor: &j11_par_executor - executor: - name: java11-executor -- #exec_resource_class: xlarge -- parallelism: 4 -+ exec_resource_class: medium -+ parallelism: 25 - - j11_small_par_executor: &j11_small_par_executor - executor: - name: java11-executor -- #exec_resource_class: xlarge -- parallelism: 1 -+ exec_resource_class: large -+ parallelism: 10 - - j11_small_executor: &j11_small_executor - executor: -@@ -172,30 +172,41 @@ - exec_resource_class: medium - parallelism: 1 - -+j11_large_par_executor: &j11_large_par_executor -+ executor: -+ name: java11-executor -+ exec_resource_class: large -+ parallelism: 50 -+ -+j11_very_large_par_executor: &j11_very_large_par_executor -+ executor: -+ name: java11-executor -+ exec_resource_class: large -+ parallelism: 100 -+ - j11_medium_par_executor: &j11_medium_par_executor - executor: - name: java11-executor -- #exec_resource_class: xlarge -- parallelism: 1 -+ exec_resource_class: xlarge -+ parallelism: 4 - - j11_seq_executor: &j11_seq_executor - executor: - name: java11-executor -- #exec_resource_class: xlarge - exec_resource_class: medium - parallelism: 1 # sequential, single container tests: no parallelism benefits - - j17_par_executor: &j17_par_executor - executor: - name: java17-executor -- #exec_resource_class: xlarge -- parallelism: 4 -+ exec_resource_class: medium -+ parallelism: 25 - - j17_small_par_executor: &j17_small_par_executor - executor: - name: java17-executor -- #exec_resource_class: xlarge -- parallelism: 1 -+ exec_resource_class: large -+ parallelism: 10 - - j17_small_executor: &j17_small_executor - executor: -@@ -206,44 +217,56 @@ - j17_medium_par_executor: &j17_medium_par_executor - executor: - name: java17-executor -- #exec_resource_class: xlarge -- parallelism: 1 -+ exec_resource_class: xlarge -+ parallelism: 4 -+ -+j17_large_par_executor: &j17_large_par_executor -+ executor: -+ name: java17-executor -+ exec_resource_class: large -+ parallelism: 50 - - j17_seq_executor: &j17_seq_executor - executor: - name: java17-executor -- #exec_resource_class: xlarge -+ exec_resource_class: medium - parallelism: 1 # sequential, single container tests: no parallelism benefits - - j11_repeated_jvm_upgrade_dtest_executor: &j11_repeated_jvm_upgrade_dtest_executor - executor: - name: java11-executor -- parallelism: 4 -+ exec_resource_class: large -+ parallelism: 25 - - j11_repeated_utest_executor: &j11_repeated_utest_executor - executor: - name: java11-executor -- parallelism: 4 -+ exec_resource_class: medium -+ parallelism: 25 - - j11_repeated_dtest_executor: &j11_repeated_dtest_executor - executor: - name: java11-executor -- parallelism: 4 -+ exec_resource_class: large -+ parallelism: 25 - - j17_repeated_utest_executor: &j17_repeated_utest_executor - executor: - name: java17-executor -- parallelism: 4 -+ exec_resource_class: medium -+ parallelism: 25 - - j17_repeated_dtest_executor: &j17_repeated_dtest_executor - executor: - name: java17-executor -- parallelism: 4 -+ exec_resource_class: large -+ parallelism: 25 - - j11_repeated_upgrade_dtest_executor: &j11_repeated_upgrade_dtest_executor - executor: - name: java11-executor -- parallelism: 4 -+ exec_resource_class: xlarge -+ parallelism: 25 - - j11_separate_jobs: &j11_separate_jobs - jobs: -@@ -1980,7 +2003,7 @@ - target: testclasslist-system-keyspace-directory - - j11_dtests_vnode: -- <<: *j11_par_executor -+ <<: *j11_large_par_executor - steps: - - attach_workspace: - at: /home/cassandra -@@ -1994,7 +2017,7 @@ - pytest_extra_args: '--use-vnodes --num-tokens=16 --skip-resource-intensive-tests' - - j11_dtests_offheap: -- <<: *j11_par_executor -+ <<: *j11_large_par_executor - steps: - - attach_workspace: - at: /home/cassandra -@@ -2008,7 +2031,7 @@ - pytest_extra_args: '--use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests' - - j17_dtests_vnode: -- <<: *j17_par_executor -+ <<: *j17_large_par_executor - steps: - - attach_workspace: - at: /home/cassandra -@@ -2023,7 +2046,7 @@ - pytest_extra_args: '--use-vnodes --num-tokens=16 --skip-resource-intensive-tests' - - j17_dtests_offheap: -- <<: *j17_par_executor -+ <<: *j17_large_par_executor - steps: - - attach_workspace: - at: /home/cassandra -@@ -2038,7 +2061,7 @@ - pytest_extra_args: '--use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests' - - j11_dtests: -- <<: *j11_par_executor -+ <<: *j11_large_par_executor - steps: - - attach_workspace: - at: /home/cassandra -@@ -2052,7 +2075,7 @@ - pytest_extra_args: '--skip-resource-intensive-tests' - - j17_dtests: -- <<: *j17_par_executor -+ <<: *j17_large_par_executor - steps: - - attach_workspace: - at: /home/cassandra -@@ -2067,7 +2090,7 @@ - pytest_extra_args: '--skip-resource-intensive-tests' - - j11_upgrade_dtests: -- <<: *j11_par_executor -+ <<: *j11_very_large_par_executor - steps: - - attach_workspace: - at: /home/cassandra -@@ -2081,7 +2104,7 @@ - pytest_extra_args: '--execute-upgrade-tests-only --upgrade-target-version-only --upgrade-version-selection all' - - j11_cqlsh_dtests_py3_vnode: -- <<: *j11_par_executor -+ <<: *j11_large_par_executor - steps: - - attach_workspace: - at: /home/cassandra -@@ -2096,7 +2119,7 @@ - extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6' - - j11_cqlsh_dtests_py3_offheap: -- <<: *j11_par_executor -+ <<: *j11_large_par_executor - steps: - - attach_workspace: - at: /home/cassandra -@@ -2111,7 +2134,7 @@ - extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6' - - j11_cqlsh_dtests_py38_vnode: -- <<: *j11_par_executor -+ <<: *j11_large_par_executor - steps: - - attach_workspace: - at: /home/cassandra -@@ -2129,7 +2152,7 @@ - python_version: '3.8' - - j11_cqlsh_dtests_py311_vnode: -- <<: *j11_par_executor -+ <<: *j11_large_par_executor - steps: - - attach_workspace: - at: /home/cassandra -@@ -2147,7 +2170,7 @@ - python_version: '3.11' - - j11_cqlsh_dtests_py38_offheap: -- <<: *j11_par_executor -+ <<: *j11_large_par_executor - steps: - - attach_workspace: - at: /home/cassandra -@@ -2165,7 +2188,7 @@ - python_version: '3.8' - - j11_cqlsh_dtests_py311_offheap: -- <<: *j11_par_executor -+ <<: *j11_large_par_executor - steps: - - attach_workspace: - at: /home/cassandra -@@ -2183,7 +2206,7 @@ - python_version: '3.11' - - j11_cqlsh_dtests_py3: -- <<: *j11_par_executor -+ <<: *j11_large_par_executor - steps: - - attach_workspace: - at: /home/cassandra -@@ -2198,7 +2221,7 @@ - extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6' - - j11_cqlsh_dtests_py38: -- <<: *j11_par_executor -+ <<: *j11_large_par_executor - steps: - - attach_workspace: - at: /home/cassandra -@@ -2216,7 +2239,7 @@ - python_version: '3.8' - - j11_cqlsh_dtests_py311: -- <<: *j11_par_executor -+ <<: *j11_large_par_executor - steps: - - attach_workspace: - at: /home/cassandra -@@ -2234,7 +2257,7 @@ - python_version: '3.11' - - j17_cqlsh_dtests_py3_vnode: -- <<: *j17_par_executor -+ <<: *j17_large_par_executor - steps: - - attach_workspace: - at: /home/cassandra -@@ -2249,7 +2272,7 @@ - extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6' - - j17_cqlsh_dtests_py3_offheap: -- <<: *j17_par_executor -+ <<: *j17_large_par_executor - steps: - - attach_workspace: - at: /home/cassandra -@@ -2264,7 +2287,7 @@ - extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6' - - j17_cqlsh_dtests_py38_vnode: -- <<: *j17_par_executor -+ <<: *j17_large_par_executor - steps: - - attach_workspace: - at: /home/cassandra -@@ -2282,7 +2305,7 @@ - python_version: '3.8' - - j17_cqlsh_dtests_py311_vnode: -- <<: *j17_par_executor -+ <<: *j17_large_par_executor - steps: - - attach_workspace: - at: /home/cassandra -@@ -2300,7 +2323,7 @@ - python_version: '3.11' - - j17_cqlsh_dtests_py38_offheap: -- <<: *j17_par_executor -+ <<: *j17_large_par_executor - steps: - - attach_workspace: - at: /home/cassandra -@@ -2318,7 +2341,7 @@ - python_version: '3.8' - - j17_cqlsh_dtests_py311_offheap: -- <<: *j17_par_executor -+ <<: *j17_large_par_executor - steps: - - attach_workspace: - at: /home/cassandra -@@ -2336,7 +2359,7 @@ - python_version: '3.11' - - j17_cqlsh_dtests_py3: -- <<: *j17_par_executor -+ <<: *j17_large_par_executor - steps: - - attach_workspace: - at: /home/cassandra -@@ -2351,7 +2374,7 @@ - extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6' - - j17_cqlsh_dtests_py38: -- <<: *j17_par_executor -+ <<: *j17_large_par_executor - steps: - - attach_workspace: - at: /home/cassandra -@@ -2369,7 +2392,7 @@ - python_version: '3.8' - - j17_cqlsh_dtests_py311: -- <<: *j17_par_executor -+ <<: *j17_large_par_executor - steps: - - attach_workspace: - at: /home/cassandra -@@ -2387,7 +2410,7 @@ - python_version: '3.11' - - j11_dtests_large_vnode: -- <<: *j11_par_executor -+ <<: *j11_medium_par_executor - steps: - - attach_workspace: - at: /home/cassandra -@@ -2401,7 +2424,7 @@ - pytest_extra_args: '--use-vnodes --num-tokens=16 --only-resource-intensive-tests --force-resource-intensive-tests' - - j11_dtests_large: -- <<: *j11_par_executor -+ <<: *j11_medium_par_executor - steps: - - attach_workspace: - at: /home/cassandra -@@ -2415,7 +2438,7 @@ - pytest_extra_args: '--only-resource-intensive-tests --force-resource-intensive-tests' - - j17_dtests_large_vnode: -- <<: *j17_par_executor -+ <<: *j17_medium_par_executor - steps: - - attach_workspace: - at: /home/cassandra -@@ -2429,7 +2452,7 @@ - pytest_extra_args: '--use-vnodes --num-tokens=16 --only-resource-intensive-tests --force-resource-intensive-tests' - - j17_dtests_large: -- <<: *j17_par_executor -+ <<: *j17_medium_par_executor - steps: - - attach_workspace: - at: /home/cassandra diff --git a/.circleci/generate.sh b/.circleci/generate.sh index 5178e11d7f..a3ec007a20 100755 --- a/.circleci/generate.sh +++ b/.circleci/generate.sh @@ -17,7 +17,7 @@ # limitations under the License. # -BASEDIR=`dirname $0` +BASEDIR=$(dirname "$0") BASE_BRANCH=trunk set -e @@ -33,7 +33,7 @@ print_help() echo "Usage: $0 [-f|-p|-a|-e|-i|-b|-s]" echo " -a Generate the config.yml, config.yml.FREE and config.yml.PAID expanded configuration" echo " files from the main config_template.yml reusable configuration file." - echo " Use this for permanent changes in config that will be committed to the main repo." + echo " Use this for permanent changes in config.yml that will be committed to the main repo." echo " -f Generate config.yml for tests compatible with the CircleCI free tier resources" echo " -p Generate config.yml for tests compatible with the CircleCI paid tier resources" echo " -b Specify the base git branch for comparison when determining changed tests to" @@ -117,8 +117,8 @@ fi # validate environment variables if $has_env_vars && $check_env_vars; then - for entry in $(echo $env_vars | tr "|" "\n"); do - key=$(echo $entry | tr "=" "\n" | head -n 1) + for entry in $(echo "$env_vars" | tr "|" "\n"); do + key=$(echo "$entry" | tr "=" "\n" | head -n 1) if [ "$key" != "DTEST_REPO" ] && [ "$key" != "DTEST_BRANCH" ] && [ "$key" != "REPEATED_TESTS_STOP_ON_FAILURE" ] && @@ -155,17 +155,17 @@ fi if $free; then ($all || $paid) && die "Cannot use option -f with options -a or -p" echo "Generating new config.yml file for free tier from config_template.yml" - circleci config process $BASEDIR/config_template.yml > $BASEDIR/config.yml.FREE.tmp - cat $BASEDIR/license.yml $BASEDIR/config.yml.FREE.tmp > $BASEDIR/config.yml - rm $BASEDIR/config.yml.FREE.tmp + circleci config process "$BASEDIR"/config_template.yml > "$BASEDIR"/config.yml.FREE.tmp + cat "$BASEDIR"/license.yml "$BASEDIR"/config.yml.FREE.tmp > "$BASEDIR"/config.yml + rm "$BASEDIR"/config.yml.FREE.tmp elif $paid; then ($all || $free) && die "Cannot use option -p with options -a or -f" echo "Generating new config.yml file for paid tier from config_template.yml" - patch -o $BASEDIR/config_template.yml.PAID $BASEDIR/config_template.yml $BASEDIR/config_template.yml.PAID.patch - circleci config process $BASEDIR/config_template.yml.PAID > $BASEDIR/config.yml.PAID.tmp - cat $BASEDIR/license.yml $BASEDIR/config.yml.PAID.tmp > $BASEDIR/config.yml - rm $BASEDIR/config_template.yml.PAID $BASEDIR/config.yml.PAID.tmp + patch -o "$BASEDIR"/config_template.yml.PAID "$BASEDIR"/config_template.yml "$BASEDIR"/config_template.yml.PAID.patch + circleci config process "$BASEDIR"/config_template.yml.PAID > "$BASEDIR"/config.yml.PAID.tmp + cat "$BASEDIR"/license.yml "$BASEDIR"/config.yml.PAID.tmp > "$BASEDIR"/config.yml + rm "$BASEDIR"/config_template.yml.PAID "$BASEDIR"/config.yml.PAID.tmp elif $all; then ($free || $paid || $has_env_vars) && die "Cannot use option -a with options -f, -p or -e" @@ -174,18 +174,18 @@ elif $all; then echo "after running this command if you want them to persist." # setup config for free tier - circleci config process $BASEDIR/config_template.yml > $BASEDIR/config.yml.FREE.tmp - cat $BASEDIR/license.yml $BASEDIR/config.yml.FREE.tmp > $BASEDIR/config.yml.FREE - rm $BASEDIR/config.yml.FREE.tmp + circleci config process "$BASEDIR"/config_template.yml > "$BASEDIR"/config.yml.FREE.tmp + cat "$BASEDIR"/license.yml "$BASEDIR"/config.yml.FREE.tmp > "$BASEDIR"/config.yml.FREE + rm "$BASEDIR"/config.yml.FREE.tmp # setup config for paid tier - patch -o $BASEDIR/config_template.yml.PAID $BASEDIR/config_template.yml $BASEDIR/config_template.yml.PAID.patch - circleci config process $BASEDIR/config_template.yml.PAID > $BASEDIR/config.yml.PAID.tmp - cat $BASEDIR/license.yml $BASEDIR/config.yml.PAID.tmp > $BASEDIR/config.yml.PAID - rm $BASEDIR/config_template.yml.PAID $BASEDIR/config.yml.PAID.tmp + patch -o "$BASEDIR"/config_template.yml.PAID "$BASEDIR"/config_template.yml "$BASEDIR"/config_template.yml.PAID.patch + circleci config process "$BASEDIR"/config_template.yml.PAID > "$BASEDIR"/config.yml.PAID.tmp + cat "$BASEDIR"/license.yml "$BASEDIR"/config.yml.PAID.tmp > "$BASEDIR"/config.yml.PAID + rm "$BASEDIR"/config_template.yml.PAID "$BASEDIR"/config.yml.PAID.tmp # copy free tier into config.yml to make sure this gets updated - cp $BASEDIR/config.yml.FREE $BASEDIR/config.yml + cp "$BASEDIR"/config.yml.FREE "$BASEDIR"/config.yml elif (! ($has_env_vars)); then print_help @@ -195,7 +195,7 @@ fi # add new or modified tests to the sets of tests to be repeated if $detect_changed_tests; then # Sanity check that the referenced branch exists - if ! git show ${BASE_BRANCH} -- >&/dev/null; then + if ! git show "${BASE_BRANCH}" -- >&/dev/null; then echo -e "\n\nUnknown base branch: ${BASE_BRANCH}. Unable to detect changed tests.\n" echo "Please use the '-b' option to choose an existing branch name" echo "(e.g. origin/${BASE_BRANCH}, apache/${BASE_BRANCH}, etc.)." @@ -205,18 +205,19 @@ if $detect_changed_tests; then add_diff_tests () { dir="${BASEDIR}/../${2}" - diff=$(git --no-pager diff --name-only --diff-filter=AMR ${BASE_BRANCH}...HEAD ${dir}) + diff=$(git --no-pager diff --name-only --diff-filter=AMR "${BASE_BRANCH}"...HEAD "${dir}") tests=$( echo "$diff" \ | grep "Test\\.java" \ | sed -e "s/\\.java//" \ | sed -e "s,^${2},," \ | tr '/' '.' \ - | grep ${3} )\ + | grep "${3}" )\ || : # avoid execution interruptions due to grep return codes and set -e for test in $tests; do echo " $test" has_env_vars=true if echo "$env_vars" | grep -q "${1}="; then + # shellcheck disable=SC2001 env_vars=$(echo "$env_vars" | sed -e "s/${1}=/${1}=${test},/") elif [ -z "$env_vars" ]; then env_vars="${1}=${test}" @@ -242,12 +243,12 @@ if $has_env_vars; then echo echo "Setting environment variables:" IFS='=' - echo "$env_vars" | tr '|' '\n' | while read entry; do - set -- $entry + echo "$env_vars" | tr '|' '\n' | while read -r entry; do + set -- "$entry" key=$1 val=$2 echo " $key: $val" - sed -i.bak "s|- $key:.*|- $key: $val|" $BASEDIR/config.yml + sed -i.bak "s|- $key:.*|- $key: $val|" "$BASEDIR"/config.yml done unset IFS fi @@ -271,65 +272,64 @@ delete_job() delete_repeated_jobs() { if (! (echo "$env_vars" | grep -q "REPEATED_UTESTS=" )); then - delete_job "$1" "j8_unit_tests_repeat" delete_job "$1" "j11_unit_tests_repeat" - delete_job "$1" "j8_utests_cdc_repeat" + delete_job "$1" "j17_unit_tests_repeat" delete_job "$1" "j11_utests_cdc_repeat" - delete_job "$1" "j8_utests_compression_repeat" + delete_job "$1" "j17_utests_cdc_repeat" delete_job "$1" "j11_utests_compression_repeat" - delete_job "$1" "j8_utests_trie_repeat" + delete_job "$1" "j17_utests_compression_repeat" delete_job "$1" "j11_utests_trie_repeat" - delete_job "$1" "j8_utests_oa_repeat" + delete_job "$1" "j17_utests_trie_repeat" delete_job "$1" "j11_utests_oa_repeat" - delete_job "$1" "j8_utests_system_keyspace_directory_repeat" + delete_job "$1" "j17_utests_oa_repeat" delete_job "$1" "j11_utests_system_keyspace_directory_repeat" + delete_job "$1" "j17_utests_system_keyspace_directory_repeat" fi if (! (echo "$env_vars" | grep -q "REPEATED_UTESTS_LONG=")); then - delete_job "$1" "j8_utests_long_repeat" delete_job "$1" "j11_utests_long_repeat" + delete_job "$1" "j17_utests_long_repeat" fi if (! (echo "$env_vars" | grep -q "REPEATED_UTESTS_STRESS=")); then - delete_job "$1" "j8_utests_stress_repeat" delete_job "$1" "j11_utests_stress_repeat" + delete_job "$1" "j17_utests_stress_repeat" fi if (! (echo "$env_vars" | grep -q "REPEATED_UTESTS_FQLTOOL=")); then - delete_job "$1" "j8_utests_fqltool_repeat" delete_job "$1" "j11_utests_fqltool_repeat" + delete_job "$1" "j17_utests_fqltool_repeat" fi if (! (echo "$env_vars" | grep -q "REPEATED_SIMULATOR_DTESTS=")); then - delete_job "$1" "j8_simulator_dtests_repeat" delete_job "$1" "j11_simulator_dtests_repeat" fi if (! (echo "$env_vars" | grep -q "REPEATED_JVM_DTESTS=")); then - delete_job "$1" "j8_jvm_dtests_repeat" - delete_job "$1" "j8_jvm_dtests_vnode_repeat" delete_job "$1" "j11_jvm_dtests_repeat" delete_job "$1" "j11_jvm_dtests_vnode_repeat" + delete_job "$1" "j17_jvm_dtests_repeat" + delete_job "$1" "j17_jvm_dtests_vnode_repeat" fi if (! (echo "$env_vars" | grep -q "REPEATED_JVM_UPGRADE_DTESTS=")); then delete_job "$1" "start_jvm_upgrade_dtests_repeat" delete_job "$1" "j11_jvm_upgrade_dtests_repeat" fi if (! (echo "$env_vars" | grep -q "REPEATED_DTESTS=")); then - delete_job "$1" "j8_dtests_repeat" - delete_job "$1" "j8_dtests_vnode_repeat" - delete_job "$1" "j8_dtests_offheap_repeat" delete_job "$1" "j11_dtests_repeat" delete_job "$1" "j11_dtests_vnode_repeat" delete_job "$1" "j11_dtests_offheap_repeat" + delete_job "$1" "j17_dtests_repeat" + delete_job "$1" "j17_dtests_vnode_repeat" + delete_job "$1" "j17_dtests_offheap_repeat" fi if (! (echo "$env_vars" | grep -q "REPEATED_LARGE_DTESTS=")); then - delete_job "$1" "j8_dtests_large_repeat" - delete_job "$1" "j8_dtests_large_vnode_repeat" delete_job "$1" "j11_dtests_large_repeat" delete_job "$1" "j11_dtests_large_vnode_repeat" + delete_job "$1" "j17_dtests_large_repeat" + delete_job "$1" "j17_dtests_large_vnode_repeat" fi if (! (echo "$env_vars" | grep -q "REPEATED_UPGRADE_DTESTS=")); then - delete_job "$1" "j11_upgrade_dtests_repeat" + delete_job "$1" "j11_upgrade_dtests_repeat" fi if (! (echo "$env_vars" | grep -q "REPEATED_ANT_TEST_CLASS=")); then - delete_job "$1" "j8_repeated_ant_test" delete_job "$1" "j11_repeated_ant_test" + delete_job "$1" "j17_repeated_ant_test" fi } diff --git a/.circleci/generate_11_and_17.sh b/.circleci/generate_11_and_17.sh deleted file mode 100755 index 8e031e9b76..0000000000 --- a/.circleci/generate_11_and_17.sh +++ /dev/null @@ -1,343 +0,0 @@ -#!/bin/bash -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -BASEDIR=`dirname $0` -BASE_BRANCH=trunk -set -e - -die () -{ - echo "ERROR: $*" - print_help - exit 1 -} - -print_help() -{ - echo "Usage: $0 [-f|-p|-a|-e|-i|-b|-s]" - echo " -a Generate the config_11_and_17.yml, config_11_and_17.yml.FREE and config_11_and_17.yml.PAID expanded configuration" - echo " files from the main config_template.yml reusable configuration file." - echo " Use this for permanent changes in config_11_and_17.yml that will be committed to the main repo." - echo " -f Generate config.yml for tests compatible with the CircleCI free tier resources" - echo " -p Generate config.yml for tests compatible with the CircleCI paid tier resources" - echo " -b Specify the base git branch for comparison when determining changed tests to" - echo " repeat. Defaults to ${BASE_BRANCH}. Note that this option is not used when" - echo " the '-a' option is specified." - echo " -s Skip automatic detection of changed tests. Useful when you need to repeat a few ones," - echo " or when there are too many changed tests for CircleCI." - echo " -e Environment variables to be used in the generated config_11_and_17.yml, e.g.:" - echo " -e DTEST_BRANCH=CASSANDRA-8272" - echo " -e DTEST_REPO=https://github.com/adelapena/cassandra-dtest.git" - echo " -e REPEATED_TESTS_STOP_ON_FAILURE=false" - echo " -e REPEATED_UTESTS=org.apache.cassandra.cql3.ViewTest#testCountersTable" - echo " -e REPEATED_UTESTS_COUNT=500" - echo " -e REPEATED_UTESTS_FQLTOOL=org.apache.cassandra.fqltool.FQLCompareTest" - echo " -e REPEATED_UTESTS_FQLTOOL_COUNT=500" - echo " -e REPEATED_UTESTS_LONG=org.apache.cassandra.db.commitlog.CommitLogStressTest" - echo " -e REPEATED_UTESTS_LONG_COUNT=100" - echo " -e REPEATED_UTESTS_STRESS=org.apache.cassandra.stress.generate.DistributionGaussianTest" - echo " -e REPEATED_UTESTS_STRESS_COUNT=500" - echo " -e REPEATED_SIMULATOR_DTESTS=org.apache.cassandra.simulator.test.TrivialSimulationTest" - echo " -e REPEATED_SIMULATOR_DTESTS_COUNT=500" - echo " -e REPEATED_JVM_DTESTS=org.apache.cassandra.distributed.test.PagingTest" - echo " -e REPEATED_JVM_DTESTS_COUNT=500" - echo " -e REPEATED_JVM_UPGRADE_DTESTS=org.apache.cassandra.distributed.upgrade.GroupByTest" - echo " -e REPEATED_JVM_UPGRADE_DTESTS_COUNT=500" - echo " -e REPEATED_DTESTS=cdc_test.py cqlsh_tests/test_cqlsh.py::TestCqlshSmoke" - echo " -e REPEATED_DTESTS_COUNT=500" - echo " -e REPEATED_LARGE_DTESTS=replace_address_test.py::TestReplaceAddress::test_replace_stopped_node" - echo " -e REPEATED_LARGE_DTESTS=100" - echo " -e REPEATED_UPGRADE_DTESTS=upgrade_tests/cql_tests.py upgrade_tests/paging_test.py" - echo " -e REPEATED_UPGRADE_DTESTS_COUNT=25" - echo " -e REPEATED_ANT_TEST_TARGET=testsome" - echo " -e REPEATED_ANT_TEST_CLASS=org.apache.cassandra.cql3.ViewTest" - echo " -e REPEATED_ANT_TEST_METHODS=testCompoundPartitionKey,testStaticTable" - echo " -e REPEATED_ANT_TEST_VNODES=false" - echo " -e REPEATED_ANT_TEST_COUNT=500" - echo " For the complete list of environment variables, please check the" - echo " list of examples in config_template_11_and_17.yml and/or the documentation." - echo " If you want to specify multiple environment variables simply add" - echo " multiple -e options. The flags -f/-p should be used when using -e." - echo " -i Ignore unknown environment variables" -} - -all=false -free=false -paid=false -env_vars="" -has_env_vars=false -check_env_vars=true -detect_changed_tests=true -while getopts "e:afpib:s" opt; do - case $opt in - a ) all=true - detect_changed_tests=false - ;; - f ) free=true - ;; - p ) paid=true - ;; - e ) if (! ($has_env_vars)); then - env_vars="$OPTARG" - else - env_vars="$env_vars|$OPTARG" - fi - has_env_vars=true - ;; - b ) BASE_BRANCH="$OPTARG" - ;; - i ) check_env_vars=false - ;; - s ) detect_changed_tests=false - ;; - \?) die "Invalid option: -$OPTARG" - ;; - esac -done -shift $((OPTIND-1)) -if [ "$#" -ne 0 ]; then - die "Unexpected arguments" -fi - -# validate environment variables -if $has_env_vars && $check_env_vars; then - for entry in $(echo $env_vars | tr "|" "\n"); do - key=$(echo $entry | tr "=" "\n" | head -n 1) - if [ "$key" != "DTEST_REPO" ] && - [ "$key" != "DTEST_BRANCH" ] && - [ "$key" != "REPEATED_TESTS_STOP_ON_FAILURE" ] && - [ "$key" != "REPEATED_UTESTS" ] && - [ "$key" != "REPEATED_UTESTS_COUNT" ] && - [ "$key" != "REPEATED_UTESTS_FQLTOOL" ] && - [ "$key" != "REPEATED_UTESTS_FQLTOOL_COUNT" ] && - [ "$key" != "REPEATED_UTESTS_LONG" ] && - [ "$key" != "REPEATED_UTESTS_LONG_COUNT" ] && - [ "$key" != "REPEATED_UTESTS_STRESS" ] && - [ "$key" != "REPEATED_UTESTS_STRESS_COUNT" ] && - [ "$key" != "REPEATED_SIMULATOR_DTESTS" ] && - [ "$key" != "REPEATED_SIMULATOR_DTESTS_COUNT" ] && - [ "$key" != "REPEATED_JVM_DTESTS" ] && - [ "$key" != "REPEATED_JVM_DTESTS_COUNT" ] && - [ "$key" != "REPEATED_JVM_UPGRADE_DTESTS" ] && - [ "$key" != "REPEATED_JVM_UPGRADE_DTESTS_COUNT" ] && - [ "$key" != "REPEATED_DTESTS" ] && - [ "$key" != "REPEATED_DTESTS_COUNT" ] && - [ "$key" != "REPEATED_LARGE_DTESTS" ] && - [ "$key" != "REPEATED_LARGE_DTESTS_COUNT" ] && - [ "$key" != "REPEATED_UPGRADE_DTESTS" ] && - [ "$key" != "REPEATED_UPGRADE_DTESTS_COUNT" ] && - [ "$key" != "REPEATED_ANT_TEST_TARGET" ] && - [ "$key" != "REPEATED_ANT_TEST_CLASS" ] && - [ "$key" != "REPEATED_ANT_TEST_METHODS" ] && - [ "$key" != "REPEATED_ANT_TEST_VNODES" ] && - [ "$key" != "REPEATED_ANT_TEST_COUNT" ]; then - die "Unrecognised environment variable name: $key" - fi - done -fi - -if $free; then - ($all || $paid) && die "Cannot use option -f with options -a or -p" - echo "Generating new config.yml file for free tier from config_template_11_and_17.yml" - circleci config process $BASEDIR/config_template_11_and_17.yml > $BASEDIR/config_11_and_17.yml.FREE.tmp - cat $BASEDIR/license.yml $BASEDIR/config_11_and_17.yml.FREE.tmp > $BASEDIR/config.yml - cp $BASEDIR/config.yml $BASEDIR/config_11_and_17.yml - rm $BASEDIR/config_11_and_17.yml.FREE.tmp - -elif $paid; then - ($all || $free) && die "Cannot use option -p with options -a or -f" - echo "Generating new config.yml file for paid tier from config_template_11_and_17.yml" - patch -o $BASEDIR/config_template_11_and_17.yml.PAID $BASEDIR/config_template_11_and_17.yml $BASEDIR/config_template_11_and_17.yml.PAID.patch - circleci config process $BASEDIR/config_template_11_and_17.yml.PAID > $BASEDIR/config_11_and_17.yml.PAID.tmp - cat $BASEDIR/license.yml $BASEDIR/config_11_and_17.yml.PAID.tmp > $BASEDIR/config.yml - cp $BASEDIR/config.yml $BASEDIR/config_11_and_17.yml - rm $BASEDIR/config_template_11_and_17.yml.PAID $BASEDIR/config_11_and_17.yml.PAID.tmp - -elif $all; then - ($free || $paid || $has_env_vars) && die "Cannot use option -a with options -f, -p or -e" - echo "Generating new default config_11_and_17.yml file for free tier and FREE/PAID templates from config_template_11_and_17.yml." - echo "Make sure you commit the newly generated config_11_and_17.yml, config_11_and_17.yml.FREE and config_11_and_17.yml.PAID files" - echo "after running this command if you want them to persist." - - # setup config for free tier - circleci config process $BASEDIR/config_template_11_and_17.yml > $BASEDIR/config_11_and_17.yml.FREE.tmp - cat $BASEDIR/license.yml $BASEDIR/config_11_and_17.yml.FREE.tmp > $BASEDIR/config_11_and_17.yml.FREE - rm $BASEDIR/config_11_and_17.yml.FREE.tmp - - # setup config for paid tier - patch -o $BASEDIR/config_template_11_and_17.yml.PAID $BASEDIR/config_template_11_and_17.yml $BASEDIR/config_template_11_and_17.yml.PAID.patch - circleci config process $BASEDIR/config_template_11_and_17.yml.PAID > $BASEDIR/config_11_and_17.yml.PAID.tmp - cat $BASEDIR/license.yml $BASEDIR/config_11_and_17.yml.PAID.tmp > $BASEDIR/config_11_and_17.yml.PAID - rm $BASEDIR/config_template_11_and_17.yml.PAID $BASEDIR/config_11_and_17.yml.PAID.tmp - - # copy free tier into config_11_and_17.yml to make sure this gets updated - cp $BASEDIR/config_11_and_17.yml.FREE $BASEDIR/config_11_and_17.yml - -elif (! ($has_env_vars)); then - print_help - exit 0 -fi - -# add new or modified tests to the sets of tests to be repeated -if $detect_changed_tests; then - # Sanity check that the referenced branch exists - if ! git show ${BASE_BRANCH} -- >&/dev/null; then - echo -e "\n\nUnknown base branch: ${BASE_BRANCH}. Unable to detect changed tests.\n" - echo "Please use the '-b' option to choose an existing branch name" - echo "(e.g. origin/${BASE_BRANCH}, apache/${BASE_BRANCH}, etc.)." - exit 2 - fi - - add_diff_tests () - { - dir="${BASEDIR}/../${2}" - diff=$(git --no-pager diff --name-only --diff-filter=AMR ${BASE_BRANCH}...HEAD ${dir}) - tests=$( echo "$diff" \ - | grep "Test\\.java" \ - | sed -e "s/\\.java//" \ - | sed -e "s,^${2},," \ - | tr '/' '.' \ - | grep ${3} )\ - || : # avoid execution interruptions due to grep return codes and set -e - for test in $tests; do - echo " $test" - has_env_vars=true - if echo "$env_vars" | grep -q "${1}="; then - env_vars=$(echo "$env_vars" | sed -e "s/${1}=/${1}=${test},/") - elif [ -z "$env_vars" ]; then - env_vars="${1}=${test}" - else - env_vars="$env_vars|${1}=${test}" - fi - done - } - - echo - echo "Detecting new or modified tests with git diff --diff-filter=AMR ${BASE_BRANCH}...HEAD:" - add_diff_tests "REPEATED_UTESTS" "test/unit/" "org.apache.cassandra" - add_diff_tests "REPEATED_UTESTS_LONG" "test/long/" "org.apache.cassandra" - add_diff_tests "REPEATED_UTESTS_STRESS" "tools/stress/test/unit/" "org.apache.cassandra.stress" - add_diff_tests "REPEATED_UTESTS_FQLTOOL" "tools/fqltool/test/unit/" "org.apache.cassandra.fqltool" - add_diff_tests "REPEATED_SIMULATOR_DTESTS" "test/simulator/test/" "org.apache.cassandra.simulator.test" - add_diff_tests "REPEATED_JVM_DTESTS" "test/distributed/" "org.apache.cassandra.distributed.test" - add_diff_tests "REPEATED_JVM_UPGRADE_DTESTS" "test/distributed/" "org.apache.cassandra.distributed.upgrade" -fi - -# replace environment variables -if $has_env_vars; then - echo - echo "Setting environment variables:" - IFS='=' - echo "$env_vars" | tr '|' '\n' | while read entry; do - set -- $entry - key=$1 - val=$2 - echo " $key: $val" - sed -i.bak "s|- $key:.*|- $key: $val|" $BASEDIR/config.yml - cp $BASEDIR/config.yml $BASEDIR/config_11_and_17.yml - done - unset IFS -fi - -# Define function to remove unneeded jobs. -# The first argument is the file name, and the second arguemnt is the job name. -delete_job() -{ - delete_yaml_block() - { - sed -Ei.bak "/^ - ${2}/,/^ [^[:space:]]+|^ [^[:space:]]+/{//!d;}" "$1" - sed -Ei.bak "/^ - ${2}/d" "$1" - } - file="$BASEDIR/$1" - delete_yaml_block "$file" "${2}" - delete_yaml_block "$file" "start_${2}" -} - -# Define function to remove any unneeded repeated jobs. -# The first and only argument is the file name. -delete_repeated_jobs() -{ - if (! (echo "$env_vars" | grep -q "REPEATED_UTESTS=" )); then - delete_job "$1" "j11_unit_tests_repeat" - delete_job "$1" "j17_unit_tests_repeat" - delete_job "$1" "j11_utests_cdc_repeat" - delete_job "$1" "j17_utests_cdc_repeat" - delete_job "$1" "j11_utests_compression_repeat" - delete_job "$1" "j17_utests_compression_repeat" - delete_job "$1" "j11_utests_trie_repeat" - delete_job "$1" "j17_utests_trie_repeat" - delete_job "$1" "j11_utests_oa_repeat" - delete_job "$1" "j17_utests_oa_repeat" - delete_job "$1" "j11_utests_system_keyspace_directory_repeat" - delete_job "$1" "j17_utests_system_keyspace_directory_repeat" - fi - if (! (echo "$env_vars" | grep -q "REPEATED_UTESTS_LONG=")); then - delete_job "$1" "j11_utests_long_repeat" - delete_job "$1" "j17_utests_long_repeat" - fi - if (! (echo "$env_vars" | grep -q "REPEATED_UTESTS_STRESS=")); then - delete_job "$1" "j11_utests_stress_repeat" - delete_job "$1" "j17_utests_stress_repeat" - fi - if (! (echo "$env_vars" | grep -q "REPEATED_UTESTS_FQLTOOL=")); then - delete_job "$1" "j11_utests_fqltool_repeat" - delete_job "$1" "j17_utests_fqltool_repeat" - fi - if (! (echo "$env_vars" | grep -q "REPEATED_SIMULATOR_DTESTS=")); then - delete_job "$1" "j11_simulator_dtests_repeat" - fi - if (! (echo "$env_vars" | grep -q "REPEATED_JVM_DTESTS=")); then - delete_job "$1" "j11_jvm_dtests_repeat" - delete_job "$1" "j11_jvm_dtests_vnode_repeat" - delete_job "$1" "j17_jvm_dtests_repeat" - delete_job "$1" "j17_jvm_dtests_vnode_repeat" - fi - if (! (echo "$env_vars" | grep -q "REPEATED_JVM_UPGRADE_DTESTS=")); then - delete_job "$1" "start_jvm_upgrade_dtests_repeat" - delete_job "$1" "j11_jvm_upgrade_dtests_repeat" - fi - if (! (echo "$env_vars" | grep -q "REPEATED_DTESTS=")); then - delete_job "$1" "j11_dtests_repeat" - delete_job "$1" "j11_dtests_vnode_repeat" - delete_job "$1" "j11_dtests_offheap_repeat" - delete_job "$1" "j17_dtests_repeat" - delete_job "$1" "j17_dtests_vnode_repeat" - delete_job "$1" "j17_dtests_offheap_repeat" - fi - if (! (echo "$env_vars" | grep -q "REPEATED_LARGE_DTESTS=")); then - delete_job "$1" "j11_dtests_large_repeat" - delete_job "$1" "j11_dtests_large_vnode_repeat" - delete_job "$1" "j17_dtests_large_repeat" - delete_job "$1" "j17_dtests_large_vnode_repeat" - fi - if (! (echo "$env_vars" | grep -q "REPEATED_UPGRADE_DTESTS=")); then - delete_job "$1" "j11_upgrade_dtests_repeat" - fi - if (! (echo "$env_vars" | grep -q "REPEATED_ANT_TEST_CLASS=")); then - delete_job "$1" "j11_repeated_ant_test" - delete_job "$1" "j17_repeated_ant_test" - fi -} - -delete_repeated_jobs "config.yml" -delete_repeated_jobs "config_11_and_17.yml" -if $all; then - delete_repeated_jobs "config_11_and_17.yml.FREE" - delete_repeated_jobs "config_11_and_17.yml.PAID" -fi diff --git a/.circleci/readme.md b/.circleci/readme.md index f02820528c..34729bb01e 100644 --- a/.circleci/readme.md +++ b/.circleci/readme.md @@ -23,18 +23,12 @@ This directory contains the configuration for CircleCI continous integration platform. The file `config.yml` is the configuration file that is read by CircleCI. This file is automatically generated by the `generate.sh` script from the `config_template.yml` file. -Experimental JDK17 configuration is added for test purposes to enable easier testing -while working on JDK17 related issues. The file `config_11_and_17.yml` is the configuration -file that we can copy over `config.yml` to test JDK11+17 workflows. This file is automatically -generated by the `generate_11_and_17.sh` script from the `config_template_11_and_17.yml` file. The provided `config.yml` file uses low resources so users of the CircleCI free tier can use it. Additionally, there are two versions of this file using different resources so users who have access to premium CircleCI resources can use larger instances and more parallelism. These files are `config.yml.FREE` and `config.yml.PAID`. The default `config.yml` file is just a copy of `config.yml.FREE`. -For the JDK11+17 workflows we have equivalent files - `config_11_and_17.yml.FREE` and -`config_11_and_17.yml.PAID`. ## Switching to higher resource settings This directory contains generated files for free and paid resource settings. @@ -43,39 +37,27 @@ For example, for using higher resources benefiting from CircleCI's paid tier: `cp .circleci/config.yml.PAID .circleci/config.yml` -respectively for JDK11+17: - -`cp .circleci/config_11_and_17.yml.PAID .circleci/config.yml` - And for using lower resources comaptible with CircleCI's free tier: `cp .circleci/config.yml.FREE .circleci/config.yml` -respectively for JDK11+17: - -`cp .circleci/config_11_and_17.yml.FREE .circleci/config.yml` - Alternatively, you can run the `generate.sh` script with the flags `-f`/`-p` -to regenerate the `config.yml` file from `config_template.yml` using free or paid resources. -For JDK11 and 17 you can run the `generate_11_and_17.sh` script with the flags -`-f`/`-p` to regenerate the `config.yml` file from `config_template_11_and_17.yml` -using free or paid resources. The two scripts validate and apply any changes to the -`config_template.yml`and `config_template_11_and_17.yml` files, and they require the +to regenerate the `config.yml` file from `config_template.yml` using free or paid resources. +The script validates and applies any changes to the `config_template.yml` file, and they require the [CircleCI CLI](https://circleci.com/docs/2.0/local-cli/#install) to be installed. ## Setting environment variables Both `config_template.yml` and `config.yml` files contain a set of environment variables defining things like what dtest repo and branch to use, what tests could be repeatedly -run, etc. Same applies for `config_template_11_and_17.yml` and `config_11_and_17.yml`. +run, etc. These environment variables can be directly edited in the `config.yml` file, although if you do this you should take into account that the entire set of env vars is repeated on every job. -A probably better approach is editing them in `config_template.yml` or respectively -`config_template_11_and_17.yml` and then regenerate the `config.yml` and `config_11_and_17.yml` -files using the `generate.sh` or respectively the `generate_11_and_17.yml` script. You can also -directly pass environment variable values to the `generate.sh` and `generate_11_and_17.sh` scripts +A probably better approach is editing them in `config_template.yml` and then regenerate the `config.yml` +files using the `generate.sh` script. You can also +directly pass environment variable values to the `generate.sh` script with the `-e` flag. For example, to set the dtest repo and branch with PAID config you can run: @@ -87,10 +69,10 @@ generate.sh -p \ ``` ## Running tests in a loop -Running the `generate.sh` or `generate_11_and_17.sh` script will use `git diff` to find the -new or modified tests. The scripts will then create jobs to run each of these new or modified -tests for a certain number of times, to verify that they are stable. You can use environment -variables to specify the number of iterations of each type of test: +Running the `generate.sh` script will use `git diff` to find the new or modified tests. +The scripts will then create jobs to run each of these new or modified tests for a certain number +of times, to verify that they are stable. You can use environment variables to specify the number of +iterations of each type of test: ``` generate.sh -p \ -e REPEATED_UTESTS_COUNT=500 \ @@ -178,7 +160,6 @@ the `config.yml` file manually. Instead, you should edit the `config_template.ym regenerate the `config.yml`, `config.yml.FREE` and `config.yml.PAID` files by runnining the `generate.sh` script with `-a` flag. For using this script you need to install the [CircleCI CLI](https://circleci.com/docs/2.0/local-cli/#install). -Same applies for the equivalent JDK11+17 config files and `generate_11_and_17.sh`. As for temporal changes done while working in a patch, such as pointing to you dtest repo or running a test repeatedly, you can either directly edit `config.yml` or edit `config_template.yml` @@ -187,9 +168,9 @@ When this flag is used only the `config.yml` will be generated. Same workflow ap JDK11+17 CircleCI configuration files. Please note that any previous swapping or edition of the generated files will be overriden -by running `generate.sh`/`generate_11_and_17.sh` with `-a` argument, returning `config.yml` -to the default FREE. So if you previously swapped your `config.yml` to PAID you would need to -either swap it again or use the `-f`/`-p` script flags. +by running `generate.sh` with `-a` argument, returning `config.yml`to the default FREE. +So if you previously swapped your `config.yml` to PAID you would need to either swap it again +or use the `-f`/`-p` script flags. Read below for details how to generate the files manually without the `generate.sh` script: @@ -212,4 +193,3 @@ Read below for details how to generate the files manually without the `generate. `cat license.yml config.yml.PAID > config.yml.PAID.new && mv config.yml.PAID.new config.yml.PAID` 8. finally, remember to update the config.yml -The process is equivalent for `generate_11_and_17.sh` and the respective JDK11+17 configuration files. diff --git a/CHANGES.txt b/CHANGES.txt index ab2676fc5c..1fb6970f16 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 5.0 + * Drop JDK8, add JDK17 (CASSANDRA-18255) * Remove WaitingOnFreeMemtableSpace and DroppedMutations metrics (CASSANDRA-18298) * Upgrade Jamm version to 0.4.0 (CASSANDRA-17884, CASSANDRA-16304, CASSANDRA-18329) * Remove legacy 3.0/3.11 buffer pool metrics (CASSANDRA-18313) diff --git a/NEWS.txt b/NEWS.txt index ff90a9a465..d2c9f21945 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -71,6 +71,9 @@ using the provided 'sstableupgrade' tool. New features ------------ + - *Experimental* support for Java 17 has been added. JVM options that differ between or are + specific for Java 17 have been added into jvm17.options. + IMPORTANT: Running C* on Java 17 is *experimental* and do it at your own risk. - Added a new "unified" compaction strategy that supports the use cases of the legacy compaction strategies, with low space overhead, high parallelism and flexible configuration. Implemented by the UnifiedCompactionStrategy class. Further details and documentation can be found in @@ -176,6 +179,7 @@ New features Upgrading --------- + - Java 8 has been removed. Lowest supported version is Java 11. - Ephemeral marker files for snapshots done by repairs are not created anymore, there is a dedicated flag in snapshot manifest instead. On upgrade of a node to this version, on node's start, in case there are such ephemeral snapshots on disk, they will be deleted (same behaviour as before) and any new ephemeral snapshots diff --git a/bin/cassandra.in.sh b/bin/cassandra.in.sh index 41f554d125..ee7a8e223c 100644 --- a/bin/cassandra.in.sh +++ b/bin/cassandra.in.sh @@ -117,21 +117,7 @@ JVM_VERSION=${jvmver%_*} short=$(echo "${jvmver}" | cut -c1-2) JAVA_VERSION=17 -if [ "$JVM_VERSION" = "1.8.0" ] ; then - JVM_PATCH_VERSION=${jvmver#*_} - if [ "$JVM_VERSION" \< "1.8" ] || [ "$JVM_VERSION" \> "1.8.2" ] ; then - echo "Cassandra 4.0 requires either Java 8 (update 151 or newer) or Java 11 (or newer). Java $JVM_VERSION is not supported." - exit 1; - fi - if [ "$JVM_PATCH_VERSION" -lt 151 ] ; then - echo "Cassandra 4.0 requires either Java 8 (update 151 or newer) or Java 11 (or newer). Java 8 update $JVM_PATCH_VERSION is not supported." - exit 1; - fi - JAVA_VERSION=8 -elif [ "$JVM_VERSION" \< "11" ] ; then - echo "Cassandra 4.0 requires either Java 8 (update 151 or newer) or Java 11 (or newer)." - exit 1; -elif [ "$short" = "11" ] ; then +if [ "$short" = "11" ] ; then JAVA_VERSION=11 elif [ "$JVM_VERSION" \< "17" ] ; then echo "Cassandra 5.0 requires Java 11 or Java 17." @@ -163,8 +149,6 @@ if [ $JAVA_VERSION -ge 17 ] ; then JVM_DEP_OPTS_FILE=$CASSANDRA_CONF/jvm17${jvmoptions_variant:--clients}.options elif [ $JAVA_VERSION -ge 11 ] ; then JVM_DEP_OPTS_FILE=$CASSANDRA_CONF/jvm11${jvmoptions_variant:--clients}.options -else - JVM_DEP_OPTS_FILE=$CASSANDRA_CONF/jvm8${jvmoptions_variant:--clients}.options fi for opt in `grep "^-" $JVM_OPTS_FILE` `grep "^-" $JVM_DEP_OPTS_FILE` diff --git a/build.xml b/build.xml index 56116adba1..21f3bc2f06 100644 --- a/build.xml +++ b/build.xml @@ -43,8 +43,8 @@ When building, javac's source and target flags are set to the jdk used, so lower JDKs are not supported at runtime. The use of both CASSANDRA_USE_JDK11 and use-jdk11 is deprecated. --> - - + + @@ -190,14 +190,6 @@ - - - - - - - - -Djdk.attach.allowAttachSelf=true -XX:+UseConcMarkSweepGC @@ -295,15 +287,6 @@ In java 11 we also need to set a system property to enable netty to use Unsafe direct byte buffer construction (see CASSANDRA-16493) --> - - - - - -XX:-CMSClassUnloadingEnabled -Dio.netty.tryReflectionSetAccessible=true @@ -313,9 +296,6 @@ -Dio.netty.tryReflectionSetAccessible=true - - - @@ -325,19 +305,7 @@ - - - - - - - - - - - - - + @@ -1894,10 +1861,10 @@ - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/ide/idea/misc.xml b/ide/idea/misc.xml index ac1f706036..e9a3f8c220 100644 --- a/ide/idea/misc.xml +++ b/ide/idea/misc.xml @@ -1,4 +1,4 @@ - + diff --git a/ide/nbproject/project.xml b/ide/nbproject/project.xml index 5ea2225565..4a5461371a 100644 --- a/ide/nbproject/project.xml +++ b/ide/nbproject/project.xml @@ -210,19 +210,19 @@ ${project.dir}/src/java ${cassandra.classpath.jars} ${project.dir}/build/classes/main - 1.8 + 11 ${project.dir}/tools/fqltool/src ${cassandra.classpath.jars}:${project.dir}/build/classes/main ${project.dir}/build/classes/fqltool - 1.8 + 11 ${project.dir}/tools/stress/src ${cassandra.classpath.jars}:${project.dir}/build/classes/main ${project.dir}/build/classes/stress - 1.8 + 11 ${project.dir}/test/unit @@ -233,21 +233,21 @@ ${cassandra.classpath.jars}:${project.dir}/build/classes/main:${project.dir}/build/classes/fqltool/:${project.dir}/build/classes/stress/ ${project.dir}/build/test/classes - 1.8 + 11 ${project.dir}/tools/fqltool/test/unit ${cassandra.classpath.jars}:${project.dir}/build/classes/main:${project.dir}/build/classes/fqltool/ ${project.dir}/build/test/fqltool-classes - 1.8 + 11 ${project.dir}/tools/stress/test/unit ${cassandra.classpath.jars}:${project.dir}/build/classes/main:${project.dir}/build/classes/stress/ ${project.dir}/build/test/stress-classes - 1.8 + 11 diff --git a/tools/bin/cassandra.in.sh b/tools/bin/cassandra.in.sh index 864b87ea55..632fc06a54 100644 --- a/tools/bin/cassandra.in.sh +++ b/tools/bin/cassandra.in.sh @@ -83,21 +83,7 @@ JVM_VERSION=${jvmver%_*} short=$(echo "${jvmver}" | cut -c1-2) JAVA_VERSION=17 -if [ "$JVM_VERSION" = "1.8.0" ] ; then - JVM_PATCH_VERSION=${jvmver#*_} - if [ "$JVM_VERSION" \< "1.8" ] || [ "$JVM_VERSION" \> "1.8.2" ] ; then - echo "Cassandra 4.0 requires either Java 8 (update 151 or newer) or Java 11 (or newer). Java $JVM_VERSION is not supported." - exit 1; - fi - if [ "$JVM_PATCH_VERSION" -lt 151 ] ; then - echo "Cassandra 4.0 requires either Java 8 (update 151 or newer) or Java 11 (or newer). Java 8 update $JVM_PATCH_VERSION is not supported." - exit 1; - fi - JAVA_VERSION=8 -elif [ "$JVM_VERSION" \< "11" ] ; then - echo "Cassandra 4.0 requires either Java 8 (update 151 or newer) or Java 11 (or newer)." - exit 1; -elif [ "$short" = "11" ] ; then +if [ "$short" = "11" ] ; then JAVA_VERSION=11 elif [ "$JVM_VERSION" \< "17" ] ; then echo "Cassandra 5.0 requires Java 11 or Java 17(or newer)." @@ -128,8 +114,6 @@ if [ $JAVA_VERSION -ge 17 ] ; then JVM_DEP_OPTS_FILE=$CASSANDRA_CONF/jvm17${jvmoptions_variant:--clients}.options elif [ $JAVA_VERSION -ge 11 ] ; then JVM_DEP_OPTS_FILE=$CASSANDRA_CONF/jvm11${jvmoptions_variant:--clients}.options -else - JVM_DEP_OPTS_FILE=$CASSANDRA_CONF/jvm8${jvmoptions_variant:--clients}.options fi for opt in `grep "^-" $JVM_OPTS_FILE` `grep "^-" $JVM_DEP_OPTS_FILE`