ClickHouse/docker/test/server-jepsen/run.sh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

53 lines
1.6 KiB
Bash
Raw Normal View History

2022-11-04 13:40:13 +00:00
#!/usr/bin/env bash
set -euo pipefail
CLICKHOUSE_PACKAGE=${CLICKHOUSE_PACKAGE:="https://clickhouse-builds.s3.amazonaws.com/$PR_TO_TEST/$SHA_TO_TEST/clickhouse_build_check/clang-17_relwithdebuginfo_none_unsplitted_disable_False_binary/clickhouse"}
2022-11-04 13:40:13 +00:00
CLICKHOUSE_REPO_PATH=${CLICKHOUSE_REPO_PATH:=""}
if [ -z "$CLICKHOUSE_REPO_PATH" ]; then
CLICKHOUSE_REPO_PATH=ch
rm -rf ch ||:
mkdir ch ||:
wget -nv -nd -c "https://clickhouse-test-reports.s3.amazonaws.com/$PR_TO_TEST/$SHA_TO_TEST/repo/clickhouse_no_subs.tar.gz"
tar -C ch --strip-components=1 -xf clickhouse_no_subs.tar.gz
ls -lath ||:
fi
2023-05-03 21:33:19 +00:00
clickhouse_source="--clickhouse-source $CLICKHOUSE_PACKAGE"
2023-05-03 12:40:18 +00:00
if [ -n "$WITH_LOCAL_BINARY" ]; then
clickhouse_source="--clickhouse-source /clickhouse"
fi
2023-05-03 19:05:19 +00:00
tests_count="--test-count $TESTS_TO_RUN"
2023-05-03 12:40:18 +00:00
tests_to_run="test-all"
workload=""
if [ -n "$WORKLOAD" ]; then
tests_to_run="test"
workload="--workload $WORKLOAD"
tests_count=""
fi
nemesis=""
if [ -n "$NEMESIS" ]; then
nemesis="--nemesis $NEMESIS"
fi
rate=""
if [ -n "$RATE" ]; then
rate="--rate $RATE"
fi
concurrency=""
if [ -n "$CONCURRENCY" ]; then
concurrency="--concurrency $CONCURRENCY"
fi
2022-11-04 13:40:13 +00:00
cd "$CLICKHOUSE_REPO_PATH/tests/jepsen.clickhouse"
2023-05-03 12:40:18 +00:00
(lein run server $tests_to_run $workload --keeper "$KEEPER_NODE" $concurrency $nemesis $rate --nodes-file "$NODES_FILE_PATH" --username "$NODES_USERNAME" --logging-json --password "$NODES_PASSWORD" --time-limit "$TIME_LIMIT" --concurrency 50 $clickhouse_source $tests_count --reuse-binary || true) | tee "$TEST_OUTPUT/jepsen_run_all_tests.log"
2022-11-04 13:40:13 +00:00
mv store "$TEST_OUTPUT/"