mirror of https://github.com/apache/cassandra
Merge branch 'cassandra-3.11' into cassandra-4.0
This commit is contained in:
commit
cc622a20e1
File diff suppressed because it is too large
Load Diff
|
|
@ -1,6 +1,6 @@
|
|||
--- config-2_1.yml 2022-05-30 12:01:09.000000000 -0400
|
||||
+++ config-2_1.yml.HIGHRES 2022-05-30 12:03:00.000000000 -0400
|
||||
@@ -101,14 +101,14 @@
|
||||
--- config-2_1.yml 2022-10-15 13:31:58.877152008 +0100
|
||||
+++ config-2_1.yml.HIGHRES 2022-10-15 13:32:14.947560988 +0100
|
||||
@@ -136,14 +136,14 @@
|
||||
j8_par_executor: &j8_par_executor
|
||||
executor:
|
||||
name: java8-executor
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
j8_small_executor: &j8_small_executor
|
||||
executor:
|
||||
@@ -119,62 +119,68 @@
|
||||
@@ -154,62 +154,68 @@
|
||||
j8_medium_par_executor: &j8_medium_par_executor
|
||||
executor:
|
||||
name: java8-executor
|
||||
|
|
@ -102,5 +102,5 @@
|
|||
+ exec_resource_class: xlarge
|
||||
+ parallelism: 100
|
||||
|
||||
j8_with_dtests_jobs: &j8_with_dtests_jobs
|
||||
j8_separate_jobs: &j8_separate_jobs
|
||||
jobs:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
--- config-2_1.yml 2022-05-30 12:01:09.000000000 -0400
|
||||
+++ config-2_1.yml.MIDRES 2022-05-30 12:02:51.000000000 -0400
|
||||
@@ -101,14 +101,14 @@
|
||||
--- config-2_1.yml 2022-10-15 13:31:58.877152008 +0100
|
||||
+++ config-2_1.yml.MIDRES 2022-10-15 13:32:14.940950632 +0100
|
||||
@@ -136,14 +136,14 @@
|
||||
j8_par_executor: &j8_par_executor
|
||||
executor:
|
||||
name: java8-executor
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
j8_small_executor: &j8_small_executor
|
||||
executor:
|
||||
@@ -119,26 +119,38 @@
|
||||
@@ -154,26 +154,38 @@
|
||||
j8_medium_par_executor: &j8_medium_par_executor
|
||||
executor:
|
||||
name: java8-executor
|
||||
|
|
@ -65,7 +65,7 @@
|
|||
|
||||
j11_small_executor: &j11_small_executor
|
||||
executor:
|
||||
@@ -146,35 +158,47 @@
|
||||
@@ -181,35 +193,47 @@
|
||||
#exec_resource_class: medium
|
||||
parallelism: 1
|
||||
|
||||
|
|
@ -117,54 +117,54 @@
|
|||
+ exec_resource_class: large
|
||||
+ parallelism: 25
|
||||
|
||||
j8_with_dtests_jobs: &j8_with_dtests_jobs
|
||||
j8_separate_jobs: &j8_separate_jobs
|
||||
jobs:
|
||||
@@ -869,7 +893,7 @@
|
||||
@@ -983,7 +1007,7 @@
|
||||
target: testclasslist-system-keyspace-directory
|
||||
|
||||
j8_dtests-with-vnodes:
|
||||
j8_dtests_vnode:
|
||||
- <<: *j8_par_executor
|
||||
+ <<: *j8_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -883,7 +907,7 @@
|
||||
@@ -997,7 +1021,7 @@
|
||||
pytest_extra_args: '--use-vnodes --num-tokens=16 --skip-resource-intensive-tests'
|
||||
|
||||
j11_dtests-with-vnodes:
|
||||
j11_dtests_vnode:
|
||||
- <<: *j11_par_executor
|
||||
+ <<: *j11_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -898,7 +922,7 @@
|
||||
@@ -1012,7 +1036,7 @@
|
||||
pytest_extra_args: '--use-vnodes --num-tokens=16 --skip-resource-intensive-tests'
|
||||
|
||||
j8_dtests-no-vnodes:
|
||||
j8_dtests:
|
||||
- <<: *j8_par_executor
|
||||
+ <<: *j8_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -912,7 +936,7 @@
|
||||
@@ -1026,7 +1050,7 @@
|
||||
pytest_extra_args: '--skip-resource-intensive-tests'
|
||||
|
||||
j11_dtests-no-vnodes:
|
||||
j11_dtests:
|
||||
- <<: *j11_par_executor
|
||||
+ <<: *j11_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -927,7 +951,7 @@
|
||||
@@ -1041,7 +1065,7 @@
|
||||
pytest_extra_args: '--skip-resource-intensive-tests'
|
||||
|
||||
j8_upgradetests-no-vnodes:
|
||||
j8_upgrade_dtests:
|
||||
- <<: *j8_par_executor
|
||||
+ <<: *j8_very_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -941,7 +965,7 @@
|
||||
@@ -1055,7 +1079,7 @@
|
||||
pytest_extra_args: '--execute-upgrade-tests-only --upgrade-target-version-only --upgrade-version-selection all'
|
||||
|
||||
j8_cqlsh-dtests-py2-with-vnodes:
|
||||
|
|
@ -173,25 +173,25 @@
|
|||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -956,7 +980,7 @@
|
||||
@@ -1070,7 +1094,7 @@
|
||||
extra_env_args: 'CQLSH_PYTHON=/usr/bin/python2.7'
|
||||
|
||||
j8_cqlsh-dtests-py3-with-vnodes:
|
||||
j8_cqlsh_dtests_py3_vnode:
|
||||
- <<: *j8_par_executor
|
||||
+ <<: *j8_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -971,7 +995,7 @@
|
||||
@@ -1085,7 +1109,7 @@
|
||||
extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6'
|
||||
|
||||
j8_cqlsh-dtests-py38-with-vnodes:
|
||||
j8_cqlsh_dtests_py38_vnode:
|
||||
- <<: *j8_par_executor
|
||||
+ <<: *j8_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -989,7 +1013,7 @@
|
||||
@@ -1103,7 +1127,7 @@
|
||||
python_version: '3.8'
|
||||
|
||||
j8_cqlsh-dtests-py2-no-vnodes:
|
||||
|
|
@ -200,25 +200,25 @@
|
|||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -1004,7 +1028,7 @@
|
||||
@@ -1118,7 +1142,7 @@
|
||||
extra_env_args: 'CQLSH_PYTHON=/usr/bin/python2.7'
|
||||
|
||||
j8_cqlsh-dtests-py3-no-vnodes:
|
||||
j8_cqlsh_dtests_py3:
|
||||
- <<: *j8_par_executor
|
||||
+ <<: *j8_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -1019,7 +1043,7 @@
|
||||
@@ -1133,7 +1157,7 @@
|
||||
extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6'
|
||||
|
||||
j8_cqlsh-dtests-py38-no-vnodes:
|
||||
j8_cqlsh_dtests_py38:
|
||||
- <<: *j8_par_executor
|
||||
+ <<: *j8_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -1037,7 +1061,7 @@
|
||||
@@ -1151,7 +1175,7 @@
|
||||
python_version: '3.8'
|
||||
|
||||
j11_cqlsh-dtests-py2-with-vnodes:
|
||||
|
|
@ -227,25 +227,25 @@
|
|||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -1052,7 +1076,7 @@
|
||||
@@ -1166,7 +1190,7 @@
|
||||
extra_env_args: 'CQLSH_PYTHON=/usr/bin/python2.7'
|
||||
|
||||
j11_cqlsh-dtests-py3-with-vnodes:
|
||||
j11_cqlsh_dtests_py3_vnode:
|
||||
- <<: *j11_par_executor
|
||||
+ <<: *j11_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -1067,7 +1091,7 @@
|
||||
@@ -1181,7 +1205,7 @@
|
||||
extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6'
|
||||
|
||||
j11_cqlsh-dtests-py38-with-vnodes:
|
||||
j11_cqlsh_dtests_py38_vnode:
|
||||
- <<: *j11_par_executor
|
||||
+ <<: *j11_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -1085,7 +1109,7 @@
|
||||
@@ -1199,7 +1223,7 @@
|
||||
python_version: '3.8'
|
||||
|
||||
j11_cqlsh-dtests-py2-no-vnodes:
|
||||
|
|
@ -254,25 +254,25 @@
|
|||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -1100,7 +1124,7 @@
|
||||
@@ -1214,7 +1238,7 @@
|
||||
extra_env_args: 'CQLSH_PYTHON=/usr/bin/python2.7'
|
||||
|
||||
j11_cqlsh-dtests-py3-no-vnodes:
|
||||
j11_cqlsh_dtests_py3:
|
||||
- <<: *j11_par_executor
|
||||
+ <<: *j11_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -1115,7 +1139,7 @@
|
||||
@@ -1229,7 +1253,7 @@
|
||||
extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6'
|
||||
|
||||
j11_cqlsh-dtests-py38-no-vnodes:
|
||||
j11_cqlsh_dtests_py38:
|
||||
- <<: *j11_par_executor
|
||||
+ <<: *j11_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -1757,3 +1781,4 @@
|
||||
@@ -2156,3 +2180,4 @@
|
||||
- store_artifacts:
|
||||
path: ~/cassandra-dtest/logs
|
||||
destination: dtest_logs
|
||||
|
|
|
|||
5352
.circleci/config.yml
5352
.circleci/config.yml
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -18,6 +18,7 @@
|
|||
#
|
||||
|
||||
BASEDIR=`dirname $0`
|
||||
BASE_BRANCH=cassandra-4.0
|
||||
|
||||
die ()
|
||||
{
|
||||
|
|
@ -38,15 +39,27 @@ print_help()
|
|||
echo " -e <key=value> Environment variables to be used in the generated config.yml, e.g.:"
|
||||
echo " -e DTEST_BRANCH=CASSANDRA-8272"
|
||||
echo " -e DTEST_REPO=https://github.com/adelapena/cassandra-dtest.git"
|
||||
echo " -e REPEATED_UTEST_TARGET=testsome"
|
||||
echo " -e REPEATED_UTEST_CLASS=org.apache.cassandra.cql3.ViewTest"
|
||||
echo " -e REPEATED_UTEST_METHODS=testCompoundPartitionKey,testStaticTable"
|
||||
echo " -e REPEATED_UTEST_COUNT=100"
|
||||
echo " -e REPEATED_UTEST_STOP_ON_FAILURE=false"
|
||||
echo " -e REPEATED_DTEST_NAME=cqlsh_tests/test_cqlsh.py::TestCqlshSmoke"
|
||||
echo " -e REPEATED_DTEST_VNODES=false"
|
||||
echo " -e REPEATED_DTEST_COUNT=100"
|
||||
echo " -e REPEATED_DTEST_STOP_ON_FAILURE=false"
|
||||
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_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_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_COUNT=500"
|
||||
echo " For the complete list of environment variables, please check the"
|
||||
echo " list of examples in config-2_1.yml and/or the documentation."
|
||||
echo " If you want to specify multiple environment variables simply add"
|
||||
|
|
@ -95,22 +108,27 @@ if $has_env_vars && $check_env_vars; then
|
|||
key=$(echo $entry | tr "=" "\n" | head -n 1)
|
||||
if [ "$key" != "DTEST_REPO" ] &&
|
||||
[ "$key" != "DTEST_BRANCH" ] &&
|
||||
[ "$key" != "REPEATED_UTEST_TARGET" ] &&
|
||||
[ "$key" != "REPEATED_UTEST_CLASS" ] &&
|
||||
[ "$key" != "REPEATED_UTEST_METHODS" ] &&
|
||||
[ "$key" != "REPEATED_UTEST_COUNT" ] &&
|
||||
[ "$key" != "REPEATED_UTEST_STOP_ON_FAILURE" ] &&
|
||||
[ "$key" != "REPEATED_DTEST_NAME" ] &&
|
||||
[ "$key" != "REPEATED_DTEST_VNODES" ] &&
|
||||
[ "$key" != "REPEATED_DTEST_COUNT" ] &&
|
||||
[ "$key" != "REPEATED_DTEST_STOP_ON_FAILURE" ] &&
|
||||
[ "$key" != "REPEATED_UPGRADE_DTEST_NAME" ] &&
|
||||
[ "$key" != "REPEATED_UPGRADE_DTEST_COUNT" ] &&
|
||||
[ "$key" != "REPEATED_UPGRADE_DTEST_STOP_ON_FAILURE" ] &&
|
||||
[ "$key" != "REPEATED_JVM_UPGRADE_DTEST_CLASS" ] &&
|
||||
[ "$key" != "REPEATED_JVM_UPGRADE_DTEST_METHODS" ] &&
|
||||
[ "$key" != "REPEATED_JVM_UPGRADE_DTEST_COUNT" ] &&
|
||||
[ "$key" != "REPEATED_JVM_UPGRADE_DTEST_STOP_ON_FAILURE" ]; then
|
||||
[ "$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_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_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_COUNT" ]; then
|
||||
die "Unrecognised environment variable name: $key"
|
||||
fi
|
||||
done
|
||||
|
|
@ -167,16 +185,104 @@ elif (!($has_env_vars)); then
|
|||
print_help
|
||||
fi
|
||||
|
||||
# add new or modified tests to the sets of tests to be repeated
|
||||
if (!($all)); then
|
||||
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} )
|
||||
for test in $tests; do
|
||||
echo " $test"
|
||||
has_env_vars=true
|
||||
if grep -q "${1}=" <<< "$env_vars"; then
|
||||
env_vars=$(sed -e "s/${1}=/${1}=${test},/" <<< $env_vars)
|
||||
elif [[ $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_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 "Setting environment variable $key: $val"
|
||||
echo " $key: $val"
|
||||
sed -i.bak "s|- $key:.*|- $key: $val|" $BASEDIR/config.yml
|
||||
done
|
||||
unset IFS
|
||||
fi
|
||||
|
||||
# define function to remove unneeded jobs
|
||||
delete_job()
|
||||
{
|
||||
delete_yaml_block()
|
||||
{
|
||||
sed -Ei.bak "/^ - ${1}/,/^ [^[:space:]]+|^ [^[:space:]]+/{//!d;}" $BASEDIR/config.yml
|
||||
sed -Ei.bak "/^ - ${1}/d" $BASEDIR/config.yml
|
||||
}
|
||||
delete_yaml_block "${1}"
|
||||
delete_yaml_block "start_${1}"
|
||||
}
|
||||
|
||||
# removed unneeded repeated jobs
|
||||
if [[ $env_vars != *"REPEATED_UTESTS="* ]]; then
|
||||
delete_job "j8_unit_tests_repeat"
|
||||
delete_job "j11_unit_tests_repeat"
|
||||
delete_job "utests_compression_repeat"
|
||||
delete_job "utests_system_keyspace_directory_repeat"
|
||||
fi
|
||||
if [[ $env_vars != *"REPEATED_UTESTS_LONG="* ]]; then
|
||||
delete_job "utests_long_repeat"
|
||||
fi
|
||||
if [[ $env_vars != *"REPEATED_UTESTS_STRESS="* ]]; then
|
||||
delete_job "utests_stress_repeat"
|
||||
fi
|
||||
if [[ $env_vars != *"REPEATED_UTESTS_FQLTOOL="* ]]; then
|
||||
delete_job "utests_fqltool_repeat"
|
||||
fi
|
||||
if [[ $env_vars != *"REPEATED_JVM_DTESTS="* ]]; then
|
||||
delete_job "j8_jvm_dtests_repeat"
|
||||
delete_job "j8_jvm_dtests_vnode_repeat"
|
||||
delete_job "j11_jvm_dtests_repeat"
|
||||
delete_job "j11_jvm_dtests_vnode_repeat"
|
||||
fi
|
||||
if [[ $env_vars != *"REPEATED_JVM_UPGRADE_DTESTS="* ]]; then
|
||||
delete_job "start_jvm_upgrade_dtests_repeat"
|
||||
delete_job "j8_jvm_upgrade_dtests_repeat"
|
||||
fi
|
||||
if [[ $env_vars != *"REPEATED_DTESTS="* ]]; then
|
||||
delete_job "j8_dtests_repeat"
|
||||
delete_job "j8_dtests_vnode_repeat"
|
||||
delete_job "j11_dtests_repeat"
|
||||
delete_job "j11_dtests_vnode_repeat"
|
||||
fi
|
||||
if [[ $env_vars != *"REPEATED_UPGRADE_DTESTS="* ]]; then
|
||||
delete_job "j8_upgrade_dtests_repeat"
|
||||
fi
|
||||
if [[ $env_vars != *"REPEATED_ANT_TEST_CLASS="* ]]; then
|
||||
delete_job "j8_repeated_ant_test"
|
||||
delete_job "j11_repeated_ant_test"
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
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-2_1.yml` file.
|
||||
automatically generated by the `generate.sh` script from the `config-2_1.yml` file.
|
||||
|
||||
The provided `config.yml` file uses low resources so users of the CircleCI free tier can
|
||||
use it. Additionally, there are three versions of this file using different resources so
|
||||
|
|
@ -43,33 +43,94 @@ requires the [CircleCI CLI](https://circleci.com/docs/2.0/local-cli/#install) to
|
|||
installed.
|
||||
|
||||
## Setting environment variables
|
||||
Both `config-2_1.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
|
||||
Both `config-2_1.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.
|
||||
|
||||
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
|
||||
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-2_1.yml` and then regenerate the
|
||||
A probably better approach is editing them in `config-2_1.yml` and then regenerate the
|
||||
`config.yml` file 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
|
||||
variable values to the `generate.sh` script with the `-e` flag. For example, to set the
|
||||
dtest repo and branch with MIDRES config you can run:
|
||||
|
||||
```
|
||||
generate.sh -m \
|
||||
-e DTEST_REPO=https://github.com/adelapena/cassandra-dtest.git \
|
||||
-e DTEST_BRANCH=CASSANDRA-8272
|
||||
```
|
||||
|
||||
Or you can set the test multiplexer for repeating a specific test with HIGHRES:
|
||||
-e DTEST_BRANCH=CASSANDRA-8272
|
||||
|
||||
```
|
||||
generate.sh -h \
|
||||
-e REPEATED_UTEST_TARGET=testsome \
|
||||
-e REPEATED_UTEST_CLASS=org.apache.cassandra.cql3.ViewTest \
|
||||
-e REPEATED_UTEST_METHODS=testCompoundPartitionKey,testStaticTable \
|
||||
-e REPEATED_UTEST_COUNT=100
|
||||
|
||||
## Running tests in a loop
|
||||
Running the `generate.sh` script with use `git diff` to find the new or modified tests.
|
||||
The script 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 -m \
|
||||
-e REPEATED_UTESTS_COUNT=500 \
|
||||
-e REPEATED_UTESTS_FQLTOOL_COUNT=500 \
|
||||
-e REPEATED_UTESTS_LONG_COUNT=100 \
|
||||
-e REPEATED_UTESTS_STRESS_COUNT=500 \
|
||||
-e REPEATED_SIMULATOR_DTESTS_COUNT=500 \
|
||||
-e REPEATED_JVM_DTESTS_COUNT=500 \
|
||||
-e REPEATED_JVM_UPGRADE_DTESTS_COUNT=500 \
|
||||
-e REPEATED_DTESTS_COUNT=500 \
|
||||
-e REPEATED_UPGRADE_DTESTS_COUNT=25 \
|
||||
-e REPEATED_ANT_TEST_COUNT=500
|
||||
```
|
||||
You can also specify whether the iteration should fail on the first test failure:
|
||||
```
|
||||
generate.sh -m -e REPEATED_TESTS_STOP_ON_FAILURE=false
|
||||
```
|
||||
In addition to the automatically detected tests, it's also possible to provide lists of
|
||||
specific tests to be repeated:
|
||||
```
|
||||
generate.sh -m \
|
||||
-e REPEATED_UTESTS=org.apache.cassandra.cql3.ViewTest,org.apache.cassandra.db.CellTest \
|
||||
-e REPEATED_UTESTS_FQLTOOL=org.apache.cassandra.fqltool.FQLCompareTest \
|
||||
-e REPEATED_UTESTS_LONG=org.apache.cassandra.io.sstable.CQLSSTableWriterLongTest#testWideRow \
|
||||
-e REPEATED_UTESTS_STRESS=org.apache.cassandra.stress.generate.DistributionGaussianTest \
|
||||
-e REPEATED_DTESTS=cql_test.py,consistency_test.py::TestAvailability::test_simple_strategy \
|
||||
-e REPEATED_JVM_DTESTS=org.apache.cassandra.distributed.test.PagingTest#testPaging \
|
||||
-e REPEATED_UPGRADE_DTESTS=upgrade_tests/cql_tests.py \
|
||||
-e REPEATED_JVM_UPGRADE_DTESTS=org.apache.cassandra.distributed.upgrade.GroupByTest
|
||||
```
|
||||
For particular Ant test targets that are not included in the regular test suites, you can
|
||||
use the `run_repeated_utest` job:
|
||||
```
|
||||
generate.sh -m \
|
||||
-e REPEATED_ANT_TEST_TARGET=test-cdc \
|
||||
-e REPEATED_ANT_TEST_CLASS=org.apache.cassandra.cql3.ViewTest \
|
||||
-e REPEATED_ANT_TEST_METHODS=testCompoundPartitionKey,testStaticTable \
|
||||
-e REPEATED_ANT_TEST_COUNT=500
|
||||
```
|
||||
Putting all together, you can have runs as complex as:
|
||||
```
|
||||
generate.sh -m \
|
||||
-e REPEATED_TESTS_STOP_ON_FAILURE=true \
|
||||
-e REPEATED_UTESTS=org.apache.cassandra.cql3.ViewTest,org.apache.cassandra.db.CellTest \
|
||||
-e REPEATED_UTESTS_COUNT=500 \
|
||||
-e REPEATED_UTESTS_FQLTOOL=org.apache.cassandra.fqltool.FQLCompareTest \
|
||||
-e REPEATED_UTESTS_FQLTOOL_COUNT=500 \
|
||||
-e REPEATED_UTESTS_LONG=org.apache.cassandra.io.sstable.CQLSSTableWriterLongTest#testWideRow \
|
||||
-e REPEATED_UTESTS_LONG_COUNT=100 \
|
||||
-e REPEATED_UTESTS_STRESS=org.apache.cassandra.stress.generate.DistributionGaussianTest \
|
||||
-e REPEATED_UTESTS_STRESS_COUNT=500 \
|
||||
-e REPEATED_DTESTS=cql_test.py,consistency_test.py::TestAvailability::test_simple_strategy \
|
||||
-e REPEATED_DTESTS_COUNT=500 \
|
||||
-e REPEATED_JVM_DTESTS=org.apache.cassandra.distributed.test.PagingTest#testPaging \
|
||||
-e REPEATED_JVM_DTESTS_COUNT=500 \
|
||||
-e REPEATED_UPGRADE_DTESTS=upgrade_tests/cql_tests.py \
|
||||
-e REPEATED_UPGRADE_DTESTS_COUNT=25 \
|
||||
-e REPEATED_JVM_UPGRADE_DTESTS=org.apache.cassandra.distributed.upgrade.GroupByTest \
|
||||
-e REPEATED_JVM_UPGRADE_DTESTS_COUNT=500 \
|
||||
-e REPEATED_ANT_TEST_TARGET=test-cdc \
|
||||
-e REPEATED_ANT_TEST_CLASS=org.apache.cassandra.cql3.ViewTest \
|
||||
-e REPEATED_ANT_TEST_METHODS=testCompoundPartitionKey,testStaticTable \
|
||||
-e REPEATED_ANT_TEST_COUNT=500
|
||||
```
|
||||
|
||||
## Updating the config
|
||||
|
|
@ -78,7 +139,7 @@ the `config.yml` file manually. Instead, you should edit the `config-2_1.yml` fi
|
|||
regenerate the `config.yml`, `config.yml.LOWRES`, `config.yml.MIDRES` and `config.yml.HIGHRES`
|
||||
files by runnining the `generate.sh` script without any flags. For using this script you
|
||||
need to install the [CircleCI CLI](https://circleci.com/docs/2.0/local-cli/#install).
|
||||
|
||||
|
||||
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-2_1.yml`
|
||||
and then regenerate `config.yml` with the `generate.sh` script using a `-l`/`-m`/`-h` flag.
|
||||
|
|
@ -92,27 +153,27 @@ again or use the `-l`/`-m`/`-h` script flags.
|
|||
Read below for details how to generate the files manually without the `generate.sh` script:
|
||||
|
||||
1. make your edits to config-2_1.yml - let it stay at lowres settings
|
||||
1. generate a valid LOWRES file:
|
||||
2. generate a valid LOWRES file:
|
||||
`circleci config process config-2_1.yml > config.yml.LOWRES`
|
||||
1. add the Apache license header to the newly created LOWRES file:
|
||||
3. add the Apache license header to the newly created LOWRES file:
|
||||
`cat license.yml config.yml.LOWRES > config.yml.LOWRES.new && mv config.yml.LOWRES.new config.yml.LOWRES`
|
||||
1. then apply the highres patch to config-2_1.yml;
|
||||
4. then apply the highres patch to config-2_1.yml;
|
||||
`patch -o config-2_1.yml.HIGHRES config-2_1.yml config-2_1.yml.high_res.patch`
|
||||
(this creates a new file `config-2_1.yml.HIGHRES` instead of in-place patching
|
||||
config-2_1.yml)
|
||||
Note that if the patch no longer applies to `config-2_1.yml` a new patch file
|
||||
is needed, do this by manually making `config-2_1.yml` high resource and create
|
||||
the patch file based on the diff (don't commit it though).
|
||||
1. generate the HIGHRES file:
|
||||
5. generate the HIGHRES file:
|
||||
`circleci config process config-2_1.yml.HIGHRES > config.yml.HIGHRES`
|
||||
1. remove the temporary patched HIGHRES file: `rm config-2_1.yml.HIGHRES`
|
||||
1. add the Apache license header to the newly created HIGHRES file:
|
||||
6. remove the temporary patched HIGHRES file: `rm config-2_1.yml.HIGHRES`
|
||||
7. add the Apache license header to the newly created HIGHRES file:
|
||||
`cat license.yml config.yml.HIGHRES > config.yml.HIGHRES.new && mv config.yml.HIGHRES.new config.yml.HIGHRES`
|
||||
1. repeat the last steps to generate the MIDRES file:
|
||||
8. repeat the last steps to generate the MIDRES file:
|
||||
```
|
||||
patch -o config-2_1.yml.MIDRES config-2_1.yml config-2_1.yml.mid_res.patch
|
||||
circleci config process config-2_1.yml.MIDRES > config.yml.MIDRES
|
||||
rm config-2_1.yml.MIDRES
|
||||
cat license.yml config.yml.MIDRES > config.yml.MIDRES.new && mv config.yml.MIDRES.new config.yml.MIDRES
|
||||
```
|
||||
|
||||
9. finally, remember to update the config.yml
|
||||
|
|
|
|||
Loading…
Reference in New Issue