mirror of https://github.com/apache/cassandra
Merge branch 'cassandra-3.11' into trunk
This commit is contained in:
commit
8da277e573
|
|
@ -81,6 +81,16 @@ j8_with_dtests_jobs: &j8_with_dtests_jobs
|
|||
- utests_fqltool:
|
||||
requires:
|
||||
- start_utests_fqltool
|
||||
- start_jvm_upgrade_dtest:
|
||||
type: approval
|
||||
requires:
|
||||
- j8_build
|
||||
- dtest_jars_build:
|
||||
requires:
|
||||
- start_jvm_upgrade_dtest
|
||||
- j8_jvm_upgrade_dtests:
|
||||
requires:
|
||||
- dtest_jars_build
|
||||
# Java 8 dtests (on request)
|
||||
- start_j8_dtests:
|
||||
type: approval
|
||||
|
|
@ -216,6 +226,18 @@ jobs:
|
|||
executor: java11-executor
|
||||
<<: *build_common
|
||||
|
||||
dtest_jars_build:
|
||||
executor: java8-executor
|
||||
parallelism: 1
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
- build_cassandra_dtest_jars
|
||||
- persist_to_workspace:
|
||||
root: /home/cassandra
|
||||
paths:
|
||||
- dtest_jars
|
||||
|
||||
j8_unit_tests:
|
||||
<<: *j8_par_executor
|
||||
steps:
|
||||
|
|
@ -242,6 +264,14 @@ jobs:
|
|||
- log_environment
|
||||
- run_parallel_junit_tests
|
||||
|
||||
j8_jvm_upgrade_dtests:
|
||||
<<: *j8_seq_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
- run_junit_tests:
|
||||
target: test-jvm-upgrade-dtest-forking
|
||||
|
||||
utests_long:
|
||||
<<: *j8_seq_executor
|
||||
steps:
|
||||
|
|
@ -413,6 +443,47 @@ commands:
|
|||
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
|
||||
git remote add apache git://github.com/apache/cassandra.git
|
||||
for branch in cassandra-2.2 cassandra-3.0 cassandra-3.11 trunk; do
|
||||
# check out the correct cassandra version:
|
||||
git remote set-branches --add apache '$branch'
|
||||
git fetch --depth 1 apache $branch
|
||||
git checkout $branch
|
||||
# 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 jar dtest-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
|
||||
done
|
||||
# and build the dtest-jar for the branch under test
|
||||
git checkout origin/$CIRCLE_BRANCH
|
||||
for x in $(seq 1 3); do
|
||||
${ANT_HOME}/bin/ant clean jar dtest-jar
|
||||
RETURN="$?"
|
||||
if [ "${RETURN}" -eq "0" ]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
mkdir ~/dtest_jars
|
||||
cp build/dtest*.jar ~/dtest_jars
|
||||
ls -l ~/dtest_jars
|
||||
no_output_timeout: 15m
|
||||
|
||||
run_eclipse_warnings:
|
||||
steps:
|
||||
- run:
|
||||
|
|
@ -459,6 +530,9 @@ commands:
|
|||
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 <<parameters.target>>
|
||||
no_output_timeout: <<parameters.no_output_timeout>>
|
||||
- store_test_results:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,50 @@
|
|||
version: 2
|
||||
jobs:
|
||||
j8_jvm_upgrade_dtests:
|
||||
docker:
|
||||
- image: spod/cassandra-testing-ubuntu1810-java11-w-dependencies:20190306
|
||||
resource_class: medium
|
||||
working_directory: ~/
|
||||
shell: /bin/bash -eo pipefail -l
|
||||
parallelism: 1
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
- run:
|
||||
name: Run Unit Tests (test-jvm-upgrade-dtest-forking)
|
||||
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 test-jvm-upgrade-dtest-forking
|
||||
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: git://github.com/apache/cassandra-dtest.git
|
||||
- DTEST_BRANCH: master
|
||||
- CCM_MAX_HEAP_SIZE: 1024M
|
||||
- CCM_HEAP_NEWSIZE: 256M
|
||||
- JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
- JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
j11_unit_tests:
|
||||
docker:
|
||||
- image: spod/cassandra-testing-ubuntu1810-java11:20181210
|
||||
|
|
@ -134,36 +179,11 @@ jobs:
|
|||
- 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 ~/env/bin/activate\n\
|
||||
export PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\n\
|
||||
echo \"***Collected DTests (j11_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py\
|
||||
\ --use-vnodes --skip-resource-intensive-tests --dtest-print-tests-only\
|
||||
\ --dtest-print-tests-output=/tmp/all_dtest_tests_j11_with_vnodes_raw --cassandra-dir=../cassandra\n\
|
||||
if [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_with_vnodes_raw /tmp/all_dtest_tests_j11_with_vnodes\n\
|
||||
else\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\n\
|
||||
cat /tmp/split_dtest_tests_j11_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n\
|
||||
cat /tmp/split_dtest_tests_j11_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 ~/env/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 --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\"\n\
|
||||
cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n\nsource ~/env/bin/activate\n\
|
||||
export PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\n\
|
||||
java -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`\nset -o pipefail &&\
|
||||
\ cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=32 --skip-resource-intensive-tests\
|
||||
\ --log-level=\"INFO\" --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\n"
|
||||
command: "echo \"cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n\nsource ~/env/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`\nset -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=32 --skip-resource-intensive-tests --log-level=\"INFO\" --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\n"
|
||||
- store_test_results:
|
||||
path: /tmp/results
|
||||
- store_artifacts:
|
||||
|
|
@ -217,37 +237,11 @@ jobs:
|
|||
- 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 ~/env/bin/activate\n\
|
||||
export PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\n\
|
||||
echo \"***Collected DTests (j8_without_vnodes)***\"\nset -eo pipefail &&\
|
||||
\ ./run_dtests.py --skip-resource-intensive-tests --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\n\
|
||||
cat /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 ~/env/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 --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\"\n\
|
||||
cat /tmp/split_dtest_tests_j8_without_vnodes_final.txt\n\nsource ~/env/bin/activate\n\
|
||||
export PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\n\
|
||||
java -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`\nset -o pipefail &&\
|
||||
\ cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level=\"\
|
||||
INFO\" --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\n"
|
||||
command: "echo \"cat /tmp/split_dtest_tests_j8_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j8_without_vnodes_final.txt\n\nsource ~/env/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`\nset -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level=\"INFO\" --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\n"
|
||||
- store_test_results:
|
||||
path: /tmp/results
|
||||
- store_artifacts:
|
||||
|
|
@ -271,7 +265,6 @@ jobs:
|
|||
- CCM_MAX_HEAP_SIZE: 1024M
|
||||
- CCM_HEAP_NEWSIZE: 256M
|
||||
- JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
- JAVA8_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
- JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
j8_upgradetests-no-vnodes:
|
||||
docker:
|
||||
|
|
@ -370,7 +363,6 @@ jobs:
|
|||
- CCM_MAX_HEAP_SIZE: 1024M
|
||||
- CCM_HEAP_NEWSIZE: 256M
|
||||
- JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
- JAVA8_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
- JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
utests_stress:
|
||||
docker:
|
||||
|
|
@ -388,6 +380,9 @@ jobs:
|
|||
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
|
||||
no_output_timeout: 15m
|
||||
- store_test_results:
|
||||
|
|
@ -413,7 +408,6 @@ jobs:
|
|||
- CCM_MAX_HEAP_SIZE: 1024M
|
||||
- CCM_HEAP_NEWSIZE: 256M
|
||||
- JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
- JAVA8_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
- JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
j8_unit_tests:
|
||||
docker:
|
||||
|
|
@ -497,7 +491,6 @@ jobs:
|
|||
- CCM_MAX_HEAP_SIZE: 1024M
|
||||
- CCM_HEAP_NEWSIZE: 256M
|
||||
- JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
- JAVA8_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
- JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
j11_build:
|
||||
docker:
|
||||
|
|
@ -608,36 +601,11 @@ jobs:
|
|||
- 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 ~/env/bin/activate\n\
|
||||
export PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\n\
|
||||
echo \"***Collected DTests (j8_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py\
|
||||
\ --use-vnodes --skip-resource-intensive-tests --dtest-print-tests-only\
|
||||
\ --dtest-print-tests-output=/tmp/all_dtest_tests_j8_with_vnodes_raw --cassandra-dir=../cassandra\n\
|
||||
if [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_with_vnodes_raw /tmp/all_dtest_tests_j8_with_vnodes\n\
|
||||
else\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\n\
|
||||
cat /tmp/split_dtest_tests_j8_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_with_vnodes_final.txt\n\
|
||||
cat /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 ~/env/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 --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 ~/env/bin/activate\n\
|
||||
export PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\n\
|
||||
java -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`\nset -o pipefail && cd\
|
||||
\ ~/cassandra-dtest && pytest --use-vnodes --num-tokens=32 --skip-resource-intensive-tests\
|
||||
\ --log-level=\"INFO\" --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\n"
|
||||
command: "echo \"cat /tmp/split_dtest_tests_j8_with_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j8_with_vnodes_final.txt\n\nsource ~/env/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`\nset -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=32 --skip-resource-intensive-tests --log-level=\"INFO\" --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\n"
|
||||
- store_test_results:
|
||||
path: /tmp/results
|
||||
- store_artifacts:
|
||||
|
|
@ -661,7 +629,6 @@ jobs:
|
|||
- CCM_MAX_HEAP_SIZE: 1024M
|
||||
- CCM_HEAP_NEWSIZE: 256M
|
||||
- JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
- JAVA8_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
- JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
j8_jvm_dtests:
|
||||
docker:
|
||||
|
|
@ -679,6 +646,9 @@ jobs:
|
|||
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-jvm-dtest-forking
|
||||
no_output_timeout: 15m
|
||||
- store_test_results:
|
||||
|
|
@ -704,7 +674,6 @@ jobs:
|
|||
- CCM_MAX_HEAP_SIZE: 1024M
|
||||
- CCM_HEAP_NEWSIZE: 256M
|
||||
- JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
- JAVA8_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
- JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
j8_build:
|
||||
docker:
|
||||
|
|
@ -785,7 +754,6 @@ jobs:
|
|||
- CCM_MAX_HEAP_SIZE: 1024M
|
||||
- CCM_HEAP_NEWSIZE: 256M
|
||||
- JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
- JAVA8_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
- JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
utests_long:
|
||||
docker:
|
||||
|
|
@ -803,6 +771,9 @@ jobs:
|
|||
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
|
||||
no_output_timeout: 15m
|
||||
- store_test_results:
|
||||
|
|
@ -828,7 +799,6 @@ jobs:
|
|||
- CCM_MAX_HEAP_SIZE: 1024M
|
||||
- CCM_HEAP_NEWSIZE: 256M
|
||||
- JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
- JAVA8_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
- JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
utests_fqltool:
|
||||
docker:
|
||||
|
|
@ -846,6 +816,9 @@ jobs:
|
|||
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
|
||||
no_output_timeout: 15m
|
||||
- store_test_results:
|
||||
|
|
@ -871,7 +844,6 @@ jobs:
|
|||
- CCM_MAX_HEAP_SIZE: 1024M
|
||||
- CCM_HEAP_NEWSIZE: 256M
|
||||
- JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
- JAVA8_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
- JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
j11_dtests-no-vnodes:
|
||||
docker:
|
||||
|
|
@ -923,37 +895,11 @@ jobs:
|
|||
- 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 ~/env/bin/activate\n\
|
||||
export PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\n\
|
||||
echo \"***Collected DTests (j11_without_vnodes)***\"\nset -eo pipefail &&\
|
||||
\ ./run_dtests.py --skip-resource-intensive-tests --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\n\
|
||||
cat /tmp/split_dtest_tests_j11_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 ~/env/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 --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 ~/env/bin/activate\n\
|
||||
export PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\n\
|
||||
java -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`\nset -o pipefail\
|
||||
\ && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level=\"\
|
||||
INFO\" --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\n"
|
||||
command: "echo \"cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\n\nsource ~/env/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`\nset -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level=\"INFO\" --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\n"
|
||||
- store_test_results:
|
||||
path: /tmp/results
|
||||
- store_artifacts:
|
||||
|
|
@ -1061,7 +1007,74 @@ jobs:
|
|||
- CCM_MAX_HEAP_SIZE: 1024M
|
||||
- CCM_HEAP_NEWSIZE: 256M
|
||||
- JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
- JAVA8_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
- JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
dtest_jars_build:
|
||||
docker:
|
||||
- image: spod/cassandra-testing-ubuntu1810-java11-w-dependencies:20190306
|
||||
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
|
||||
git remote add apache git://github.com/apache/cassandra.git
|
||||
for branch in cassandra-2.2 cassandra-3.0 cassandra-3.11 trunk; do
|
||||
# check out the correct cassandra version:
|
||||
git remote set-branches --add apache '$branch'
|
||||
git fetch --depth 1 apache $branch
|
||||
git checkout $branch
|
||||
# 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 jar dtest-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
|
||||
done
|
||||
# and build the dtest-jar for the branch under test
|
||||
git checkout origin/$CIRCLE_BRANCH
|
||||
for x in $(seq 1 3); do
|
||||
${ANT_HOME}/bin/ant clean jar dtest-jar
|
||||
RETURN="$?"
|
||||
if [ "${RETURN}" -eq "0" ]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
mkdir ~/dtest_jars
|
||||
cp build/dtest*.jar ~/dtest_jars
|
||||
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: git://github.com/apache/cassandra-dtest.git
|
||||
- DTEST_BRANCH: master
|
||||
- CCM_MAX_HEAP_SIZE: 1024M
|
||||
- CCM_HEAP_NEWSIZE: 256M
|
||||
- JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
- JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
workflows:
|
||||
version: 2
|
||||
|
|
@ -1109,6 +1122,16 @@ workflows:
|
|||
- utests_fqltool:
|
||||
requires:
|
||||
- start_utests_fqltool
|
||||
- start_jvm_upgrade_dtest:
|
||||
type: approval
|
||||
requires:
|
||||
- j8_build
|
||||
- dtest_jars_build:
|
||||
requires:
|
||||
- start_jvm_upgrade_dtest
|
||||
- j8_jvm_upgrade_dtests:
|
||||
requires:
|
||||
- dtest_jars_build
|
||||
- start_j8_dtests:
|
||||
type: approval
|
||||
requires:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,50 @@
|
|||
version: 2
|
||||
jobs:
|
||||
j8_jvm_upgrade_dtests:
|
||||
docker:
|
||||
- image: spod/cassandra-testing-ubuntu1810-java11-w-dependencies:20190306
|
||||
resource_class: xlarge
|
||||
working_directory: ~/
|
||||
shell: /bin/bash -eo pipefail -l
|
||||
parallelism: 1
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
- run:
|
||||
name: Run Unit Tests (test-jvm-upgrade-dtest-forking)
|
||||
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 test-jvm-upgrade-dtest-forking
|
||||
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: git://github.com/apache/cassandra-dtest.git
|
||||
- DTEST_BRANCH: master
|
||||
- CCM_MAX_HEAP_SIZE: 2048M
|
||||
- CCM_HEAP_NEWSIZE: 512M
|
||||
- JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
- JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
j11_unit_tests:
|
||||
docker:
|
||||
- image: spod/cassandra-testing-ubuntu1810-java11:20181210
|
||||
|
|
@ -134,36 +179,11 @@ jobs:
|
|||
- 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 ~/env/bin/activate\n\
|
||||
export PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\n\
|
||||
echo \"***Collected DTests (j11_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py\
|
||||
\ --use-vnodes --skip-resource-intensive-tests --dtest-print-tests-only\
|
||||
\ --dtest-print-tests-output=/tmp/all_dtest_tests_j11_with_vnodes_raw --cassandra-dir=../cassandra\n\
|
||||
if [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_with_vnodes_raw /tmp/all_dtest_tests_j11_with_vnodes\n\
|
||||
else\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\n\
|
||||
cat /tmp/split_dtest_tests_j11_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n\
|
||||
cat /tmp/split_dtest_tests_j11_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 ~/env/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 --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\"\n\
|
||||
cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n\nsource ~/env/bin/activate\n\
|
||||
export PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\n\
|
||||
java -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`\nset -o pipefail &&\
|
||||
\ cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=32 --skip-resource-intensive-tests\
|
||||
\ --log-level=\"INFO\" --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\n"
|
||||
command: "echo \"cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n\nsource ~/env/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`\nset -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=32 --skip-resource-intensive-tests --log-level=\"INFO\" --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\n"
|
||||
- store_test_results:
|
||||
path: /tmp/results
|
||||
- store_artifacts:
|
||||
|
|
@ -217,37 +237,11 @@ jobs:
|
|||
- 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 ~/env/bin/activate\n\
|
||||
export PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\n\
|
||||
echo \"***Collected DTests (j8_without_vnodes)***\"\nset -eo pipefail &&\
|
||||
\ ./run_dtests.py --skip-resource-intensive-tests --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\n\
|
||||
cat /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 ~/env/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 --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\"\n\
|
||||
cat /tmp/split_dtest_tests_j8_without_vnodes_final.txt\n\nsource ~/env/bin/activate\n\
|
||||
export PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\n\
|
||||
java -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`\nset -o pipefail &&\
|
||||
\ cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level=\"\
|
||||
INFO\" --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\n"
|
||||
command: "echo \"cat /tmp/split_dtest_tests_j8_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j8_without_vnodes_final.txt\n\nsource ~/env/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`\nset -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level=\"INFO\" --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\n"
|
||||
- store_test_results:
|
||||
path: /tmp/results
|
||||
- store_artifacts:
|
||||
|
|
@ -386,6 +380,9 @@ jobs:
|
|||
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
|
||||
no_output_timeout: 15m
|
||||
- store_test_results:
|
||||
|
|
@ -604,36 +601,11 @@ jobs:
|
|||
- 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 ~/env/bin/activate\n\
|
||||
export PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\n\
|
||||
echo \"***Collected DTests (j8_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py\
|
||||
\ --use-vnodes --skip-resource-intensive-tests --dtest-print-tests-only\
|
||||
\ --dtest-print-tests-output=/tmp/all_dtest_tests_j8_with_vnodes_raw --cassandra-dir=../cassandra\n\
|
||||
if [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_with_vnodes_raw /tmp/all_dtest_tests_j8_with_vnodes\n\
|
||||
else\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\n\
|
||||
cat /tmp/split_dtest_tests_j8_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_with_vnodes_final.txt\n\
|
||||
cat /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 ~/env/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 --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 ~/env/bin/activate\n\
|
||||
export PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\n\
|
||||
java -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`\nset -o pipefail && cd\
|
||||
\ ~/cassandra-dtest && pytest --use-vnodes --num-tokens=32 --skip-resource-intensive-tests\
|
||||
\ --log-level=\"INFO\" --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\n"
|
||||
command: "echo \"cat /tmp/split_dtest_tests_j8_with_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j8_with_vnodes_final.txt\n\nsource ~/env/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`\nset -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=32 --skip-resource-intensive-tests --log-level=\"INFO\" --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\n"
|
||||
- store_test_results:
|
||||
path: /tmp/results
|
||||
- store_artifacts:
|
||||
|
|
@ -674,6 +646,9 @@ jobs:
|
|||
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-jvm-dtest-forking
|
||||
no_output_timeout: 15m
|
||||
- store_test_results:
|
||||
|
|
@ -796,6 +771,9 @@ jobs:
|
|||
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
|
||||
no_output_timeout: 15m
|
||||
- store_test_results:
|
||||
|
|
@ -838,6 +816,9 @@ jobs:
|
|||
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
|
||||
no_output_timeout: 15m
|
||||
- store_test_results:
|
||||
|
|
@ -914,37 +895,11 @@ jobs:
|
|||
- 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 ~/env/bin/activate\n\
|
||||
export PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\n\
|
||||
echo \"***Collected DTests (j11_without_vnodes)***\"\nset -eo pipefail &&\
|
||||
\ ./run_dtests.py --skip-resource-intensive-tests --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\n\
|
||||
cat /tmp/split_dtest_tests_j11_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 ~/env/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 --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 ~/env/bin/activate\n\
|
||||
export PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\n\
|
||||
java -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`\nset -o pipefail\
|
||||
\ && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level=\"\
|
||||
INFO\" --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\n"
|
||||
command: "echo \"cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\n\nsource ~/env/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`\nset -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level=\"INFO\" --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\n"
|
||||
- store_test_results:
|
||||
path: /tmp/results
|
||||
- store_artifacts:
|
||||
|
|
@ -1053,6 +1008,74 @@ jobs:
|
|||
- CCM_HEAP_NEWSIZE: 512M
|
||||
- JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
- JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
dtest_jars_build:
|
||||
docker:
|
||||
- image: spod/cassandra-testing-ubuntu1810-java11-w-dependencies:20190306
|
||||
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
|
||||
git remote add apache git://github.com/apache/cassandra.git
|
||||
for branch in cassandra-2.2 cassandra-3.0 cassandra-3.11 trunk; do
|
||||
# check out the correct cassandra version:
|
||||
git remote set-branches --add apache '$branch'
|
||||
git fetch --depth 1 apache $branch
|
||||
git checkout $branch
|
||||
# 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 jar dtest-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
|
||||
done
|
||||
# and build the dtest-jar for the branch under test
|
||||
git checkout origin/$CIRCLE_BRANCH
|
||||
for x in $(seq 1 3); do
|
||||
${ANT_HOME}/bin/ant clean jar dtest-jar
|
||||
RETURN="$?"
|
||||
if [ "${RETURN}" -eq "0" ]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
mkdir ~/dtest_jars
|
||||
cp build/dtest*.jar ~/dtest_jars
|
||||
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: git://github.com/apache/cassandra-dtest.git
|
||||
- DTEST_BRANCH: master
|
||||
- CCM_MAX_HEAP_SIZE: 2048M
|
||||
- CCM_HEAP_NEWSIZE: 512M
|
||||
- JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
- JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
workflows:
|
||||
version: 2
|
||||
java8_build_and_run_tests:
|
||||
|
|
@ -1099,6 +1122,16 @@ workflows:
|
|||
- utests_fqltool:
|
||||
requires:
|
||||
- start_utests_fqltool
|
||||
- start_jvm_upgrade_dtest:
|
||||
type: approval
|
||||
requires:
|
||||
- j8_build
|
||||
- dtest_jars_build:
|
||||
requires:
|
||||
- start_jvm_upgrade_dtest
|
||||
- j8_jvm_upgrade_dtests:
|
||||
requires:
|
||||
- dtest_jars_build
|
||||
- start_j8_dtests:
|
||||
type: approval
|
||||
requires:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,50 @@
|
|||
version: 2
|
||||
jobs:
|
||||
j8_jvm_upgrade_dtests:
|
||||
docker:
|
||||
- image: spod/cassandra-testing-ubuntu1810-java11-w-dependencies:20190306
|
||||
resource_class: medium
|
||||
working_directory: ~/
|
||||
shell: /bin/bash -eo pipefail -l
|
||||
parallelism: 1
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
- run:
|
||||
name: Run Unit Tests (test-jvm-upgrade-dtest-forking)
|
||||
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 test-jvm-upgrade-dtest-forking
|
||||
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: git://github.com/apache/cassandra-dtest.git
|
||||
- DTEST_BRANCH: master
|
||||
- CCM_MAX_HEAP_SIZE: 1024M
|
||||
- CCM_HEAP_NEWSIZE: 256M
|
||||
- JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
- JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
j11_unit_tests:
|
||||
docker:
|
||||
- image: spod/cassandra-testing-ubuntu1810-java11:20181210
|
||||
|
|
@ -134,36 +179,11 @@ jobs:
|
|||
- 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 ~/env/bin/activate\n\
|
||||
export PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\n\
|
||||
echo \"***Collected DTests (j11_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py\
|
||||
\ --use-vnodes --skip-resource-intensive-tests --dtest-print-tests-only\
|
||||
\ --dtest-print-tests-output=/tmp/all_dtest_tests_j11_with_vnodes_raw --cassandra-dir=../cassandra\n\
|
||||
if [ -z '' ]; then\n mv /tmp/all_dtest_tests_j11_with_vnodes_raw /tmp/all_dtest_tests_j11_with_vnodes\n\
|
||||
else\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\n\
|
||||
cat /tmp/split_dtest_tests_j11_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n\
|
||||
cat /tmp/split_dtest_tests_j11_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 ~/env/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 --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\"\n\
|
||||
cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n\nsource ~/env/bin/activate\n\
|
||||
export PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\n\
|
||||
java -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`\nset -o pipefail &&\
|
||||
\ cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=32 --skip-resource-intensive-tests\
|
||||
\ --log-level=\"INFO\" --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\n"
|
||||
command: "echo \"cat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j11_with_vnodes_final.txt\n\nsource ~/env/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`\nset -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=32 --skip-resource-intensive-tests --log-level=\"INFO\" --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\n"
|
||||
- store_test_results:
|
||||
path: /tmp/results
|
||||
- store_artifacts:
|
||||
|
|
@ -217,37 +237,11 @@ jobs:
|
|||
- 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 ~/env/bin/activate\n\
|
||||
export PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\n\
|
||||
echo \"***Collected DTests (j8_without_vnodes)***\"\nset -eo pipefail &&\
|
||||
\ ./run_dtests.py --skip-resource-intensive-tests --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\n\
|
||||
cat /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 ~/env/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 --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\"\n\
|
||||
cat /tmp/split_dtest_tests_j8_without_vnodes_final.txt\n\nsource ~/env/bin/activate\n\
|
||||
export PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\n\
|
||||
java -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`\nset -o pipefail &&\
|
||||
\ cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level=\"\
|
||||
INFO\" --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\n"
|
||||
command: "echo \"cat /tmp/split_dtest_tests_j8_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j8_without_vnodes_final.txt\n\nsource ~/env/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`\nset -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level=\"INFO\" --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\n"
|
||||
- store_test_results:
|
||||
path: /tmp/results
|
||||
- store_artifacts:
|
||||
|
|
@ -386,6 +380,9 @@ jobs:
|
|||
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
|
||||
no_output_timeout: 15m
|
||||
- store_test_results:
|
||||
|
|
@ -604,36 +601,11 @@ jobs:
|
|||
- 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 ~/env/bin/activate\n\
|
||||
export PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\n\
|
||||
echo \"***Collected DTests (j8_with_vnodes)***\"\nset -eo pipefail && ./run_dtests.py\
|
||||
\ --use-vnodes --skip-resource-intensive-tests --dtest-print-tests-only\
|
||||
\ --dtest-print-tests-output=/tmp/all_dtest_tests_j8_with_vnodes_raw --cassandra-dir=../cassandra\n\
|
||||
if [ -z '' ]; then\n mv /tmp/all_dtest_tests_j8_with_vnodes_raw /tmp/all_dtest_tests_j8_with_vnodes\n\
|
||||
else\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\n\
|
||||
cat /tmp/split_dtest_tests_j8_with_vnodes.txt | tr '\\n' ' ' > /tmp/split_dtest_tests_j8_with_vnodes_final.txt\n\
|
||||
cat /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 ~/env/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 --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 ~/env/bin/activate\n\
|
||||
export PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\n\
|
||||
java -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`\nset -o pipefail && cd\
|
||||
\ ~/cassandra-dtest && pytest --use-vnodes --num-tokens=32 --skip-resource-intensive-tests\
|
||||
\ --log-level=\"INFO\" --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\n"
|
||||
command: "echo \"cat /tmp/split_dtest_tests_j8_with_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j8_with_vnodes_final.txt\n\nsource ~/env/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`\nset -o pipefail && cd ~/cassandra-dtest && pytest --use-vnodes --num-tokens=32 --skip-resource-intensive-tests --log-level=\"INFO\" --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\n"
|
||||
- store_test_results:
|
||||
path: /tmp/results
|
||||
- store_artifacts:
|
||||
|
|
@ -674,6 +646,9 @@ jobs:
|
|||
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-jvm-dtest-forking
|
||||
no_output_timeout: 15m
|
||||
- store_test_results:
|
||||
|
|
@ -796,6 +771,9 @@ jobs:
|
|||
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
|
||||
no_output_timeout: 15m
|
||||
- store_test_results:
|
||||
|
|
@ -838,6 +816,9 @@ jobs:
|
|||
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
|
||||
no_output_timeout: 15m
|
||||
- store_test_results:
|
||||
|
|
@ -914,37 +895,11 @@ jobs:
|
|||
- 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 ~/env/bin/activate\n\
|
||||
export PATH=$JAVA_HOME/bin:$PATH\n\nif [ -n '' ]; then\n export \nfi\n\n\
|
||||
echo \"***Collected DTests (j11_without_vnodes)***\"\nset -eo pipefail &&\
|
||||
\ ./run_dtests.py --skip-resource-intensive-tests --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\n\
|
||||
cat /tmp/split_dtest_tests_j11_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 ~/env/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 --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 ~/env/bin/activate\n\
|
||||
export PATH=$JAVA_HOME/bin:$PATH\nif [ -n '' ]; then\n export \nfi\n\n\
|
||||
java -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`\nset -o pipefail\
|
||||
\ && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level=\"\
|
||||
INFO\" --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\n"
|
||||
command: "echo \"cat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\"\ncat /tmp/split_dtest_tests_j11_without_vnodes_final.txt\n\nsource ~/env/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`\nset -o pipefail && cd ~/cassandra-dtest && pytest --skip-resource-intensive-tests --log-level=\"INFO\" --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\n"
|
||||
- store_test_results:
|
||||
path: /tmp/results
|
||||
- store_artifacts:
|
||||
|
|
@ -1053,6 +1008,74 @@ jobs:
|
|||
- CCM_HEAP_NEWSIZE: 256M
|
||||
- JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
- JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
dtest_jars_build:
|
||||
docker:
|
||||
- image: spod/cassandra-testing-ubuntu1810-java11-w-dependencies:20190306
|
||||
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
|
||||
git remote add apache git://github.com/apache/cassandra.git
|
||||
for branch in cassandra-2.2 cassandra-3.0 cassandra-3.11 trunk; do
|
||||
# check out the correct cassandra version:
|
||||
git remote set-branches --add apache '$branch'
|
||||
git fetch --depth 1 apache $branch
|
||||
git checkout $branch
|
||||
# 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 jar dtest-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
|
||||
done
|
||||
# and build the dtest-jar for the branch under test
|
||||
git checkout origin/$CIRCLE_BRANCH
|
||||
for x in $(seq 1 3); do
|
||||
${ANT_HOME}/bin/ant clean jar dtest-jar
|
||||
RETURN="$?"
|
||||
if [ "${RETURN}" -eq "0" ]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
mkdir ~/dtest_jars
|
||||
cp build/dtest*.jar ~/dtest_jars
|
||||
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: git://github.com/apache/cassandra-dtest.git
|
||||
- DTEST_BRANCH: master
|
||||
- CCM_MAX_HEAP_SIZE: 1024M
|
||||
- CCM_HEAP_NEWSIZE: 256M
|
||||
- JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
- JDK_HOME: /usr/lib/jvm/java-8-openjdk-amd64
|
||||
workflows:
|
||||
version: 2
|
||||
java8_build_and_run_tests:
|
||||
|
|
@ -1099,6 +1122,16 @@ workflows:
|
|||
- utests_fqltool:
|
||||
requires:
|
||||
- start_utests_fqltool
|
||||
- start_jvm_upgrade_dtest:
|
||||
type: approval
|
||||
requires:
|
||||
- j8_build
|
||||
- dtest_jars_build:
|
||||
requires:
|
||||
- start_jvm_upgrade_dtest
|
||||
- j8_jvm_upgrade_dtests:
|
||||
requires:
|
||||
- dtest_jars_build
|
||||
- start_j8_dtests:
|
||||
type: approval
|
||||
requires:
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ Merged from 3.11:
|
|||
* Update nodetool help stop output (CASSANDRA-15401)
|
||||
Merged from 3.0:
|
||||
* Fix race condition when setting bootstrap flags (CASSANDRA-14878)
|
||||
* Run in-jvm upgrade dtests in circleci (CASSANDRA-15506)
|
||||
* Include updates to static column in mutation size calculations (CASSANDRA-15293)
|
||||
* Fix point-in-time recoevery ignoring timestamp of updates to static columns (CASSANDRA-15292)
|
||||
* GC logs are also put under $CASSANDRA_LOG_DIR (CASSANDRA-14306)
|
||||
|
|
|
|||
36
build.xml
36
build.xml
|
|
@ -63,6 +63,9 @@
|
|||
<property name="test.microbench.src" value="${test.dir}/microbench"/>
|
||||
<property name="test.distributed.src" value="${test.dir}/distributed"/>
|
||||
<property name="test.compression_algo" value="LZ4"/>
|
||||
<property name="test.distributed.listfile" value="ant-jvm-dtest-list"/>
|
||||
<property name="test.distributed.upgrade.listfile" value="ant-jvm-dtest-upgrade-list"/>
|
||||
<property name="test.distributed.upgrade.package" value="org.apache.cassandra.distributed.upgrade"/>
|
||||
<property name="dist.dir" value="${build.dir}/dist"/>
|
||||
<property name="tmp.dir" value="${java.io.tmpdir}"/>
|
||||
|
||||
|
|
@ -1995,6 +1998,39 @@
|
|||
</testmacro>
|
||||
</target>
|
||||
|
||||
<!-- In-JVM upgrade dtests -->
|
||||
<target name="list-jvm-upgrade-dtests" depends="build-test">
|
||||
<java classname="org.apache.cassandra.distributed.test.TestLocator" fork="no">
|
||||
<classpath>
|
||||
<path refid="cassandra.classpath" />
|
||||
<pathelement location="${test.classes}"/>
|
||||
<pathelement location="${test.conf}"/>
|
||||
<fileset dir="${test.lib}">
|
||||
<include name="**/*.jar" />
|
||||
</fileset>
|
||||
</classpath>
|
||||
<arg value="${test.distributed.upgrade.listfile}"/>
|
||||
<arg value="${test.distributed.upgrade.package}"/>
|
||||
</java>
|
||||
</target>
|
||||
|
||||
<target name="test-jvm-upgrade-dtest-forking" depends="list-jvm-upgrade-dtests" description="Execute In-JVM 'distributed' upgrade tests" >
|
||||
<chmod file="${test.distributed.upgrade.listfile}" perm="+x"/>
|
||||
<exec executable="./${test.distributed.upgrade.listfile}" failonerror="true"/>
|
||||
<delete file="${test.distributed.upgrade.listfile}"/>
|
||||
</target>
|
||||
|
||||
<target name="test-jvm-upgrade-dtest" depends="build-test" description="Execute in-jvm dtests">
|
||||
<testmacro inputdir="${test.distributed.src}" timeout="${test.distributed.timeout}" forkmode="once" showoutput="true" filter="**/upgrade/*Test.java">
|
||||
<jvmarg value="-Dlogback.configurationFile=test/conf/logback-dtest.xml"/>
|
||||
<jvmarg value="-Dcassandra.ring_delay_ms=10000"/>
|
||||
<jvmarg value="-Dcassandra.tolerate_sstable_size=true"/>
|
||||
<jvmarg value="-Djava.io.tmpdir=${tmp.dir}"/>
|
||||
<jvmarg value="-Dcassandra.skip_sync=true" />
|
||||
<jvmarg value="-XX:MaxMetaspaceSize=512M"/>
|
||||
</testmacro>
|
||||
</target>
|
||||
|
||||
<!-- Use this with an FQDN for test class, and a csv list of methods like this:
|
||||
ant test-jvm-dtest-some -Dtest.name=org.apache.cassandra.distributed.test.ResourceLeakTest -Dtest.methods=looperTest
|
||||
-->
|
||||
|
|
|
|||
|
|
@ -39,14 +39,18 @@ public class TestLocator
|
|||
public static void main(String[] args) throws Throwable
|
||||
{
|
||||
String outputFileName = defaultOutputFileName;
|
||||
if (args.length == 1)
|
||||
if (args.length >= 1)
|
||||
{
|
||||
outputFileName = args[0];
|
||||
}
|
||||
String testPackage = TestLocator.testPackage;
|
||||
if (args.length == 2)
|
||||
testPackage = args[1];
|
||||
try (FileWriter fileWriter = new FileWriter(outputFileName);
|
||||
PrintWriter printWriter = new PrintWriter(fileWriter))
|
||||
{
|
||||
printWriter.println("#!/bin/bash");
|
||||
printWriter.println("ret=0");
|
||||
for (Class testClass : locateClasses(testPackage))
|
||||
{
|
||||
for (Method method : testClass.getMethods())
|
||||
|
|
@ -57,8 +61,10 @@ public class TestLocator
|
|||
printWriter.println(String.format(testCommandFormat,
|
||||
testClass.getName(),
|
||||
method.getName()));
|
||||
printWriter.println("if [ $? -ne 0 ]; then ret=1; fi");
|
||||
}
|
||||
}
|
||||
printWriter.println("exit $ret");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue