Run stateful tests in stress test

This commit is contained in:
alesapin 2019-06-25 15:04:05 +03:00
parent 1ac09fa721
commit 12693e5687

View File

@ -1,4 +1,5 @@
FROM yandex/clickhouse-deb-builder
# docker build -t yandex/clickhouse-stress-test .
FROM yandex/clickhouse-stateful-test
RUN apt-get update -y \
&& env DEBIAN_FRONTEND=noninteractive \
@ -21,9 +22,10 @@ RUN apt-get update -y \
llvm-8 \
brotli
COPY ./stress /stress
ENV DATASETS="hits visits"
CMD dpkg -i package_folder/clickhouse-common-static_*.deb; \
dpkg -i package_folder/clickhouse-common-static-dbg_*.deb; \
dpkg -i package_folder/clickhouse-server_*.deb; \
@ -39,4 +41,15 @@ CMD dpkg -i package_folder/clickhouse-common-static_*.deb; \
echo "UBSAN_SYMBOLIZER_PATH=/usr/lib/llvm-6.0/bin/llvm-symbolizer" >> /etc/environment; \
echo "TSAN_SYMBOLIZER_PATH=/usr/lib/llvm-6.0/bin/llvm-symbolizer" >> /etc/environment; \
echo "LLVM_SYMBOLIZER_PATH=/usr/lib/llvm-6.0/bin/llvm-symbolizer" >> /etc/environment; \
service clickhouse-server start && sleep 1 && ./stress --output-folder test_output
service clickhouse-server start && sleep 5 \
&& /s3downloader --dataset-names $DATASETS \
&& chmod 777 -R /var/lib/clickhouse \
&& clickhouse-client --query "CREATE DATABASE IF NOT EXISTS datasets" \
&& clickhouse-client --query "CREATE DATABASE IF NOT EXISTS test" \
&& service clickhouse-server restart && sleep 5 \
&& clickhouse-client --query "SHOW TABLES FROM datasets" \
&& clickhouse-client --query "SHOW TABLES FROM test" \
&& clickhouse-client --query "RENAME TABLE datasets.hits_v1 TO test.hits" \
&& clickhouse-client --query "RENAME TABLE datasets.visits_v1 TO test.visits" \
&& clickhouse-client --query "SHOW TABLES FROM test" \
&& ./stress --output-folder test_output