Better kill

This commit is contained in:
alesapin 2020-07-28 14:22:25 +03:00
parent a75657d88e
commit 3eb77ab076
2 changed files with 18 additions and 3 deletions

View File

@ -45,8 +45,7 @@ RUN apt-get --allow-unauthenticated update -y \
sudo \
moreutils \
curl \
brotli \
psmisc
brotli
RUN mkdir -p /tmp/clickhouse-odbc-tmp \
&& wget --quiet -O - ${odbc_driver_url} | tar --strip-components=1 -xz -C /tmp/clickhouse-odbc-tmp \

View File

@ -94,7 +94,23 @@ TESTS_TO_SKIP="parquet avro h3 odbc mysql sha256 _orc_ arrow 01098_temporary_and
clickhouse-test -j 4 --no-long --testname --shard --zookeeper --skip $TESTS_TO_SKIP 2>&1 | ts '%Y-%m-%d %H:%M:%S' | tee /test_output/test_log.txt
killall clickhouse-server
kill_clickhouse () {
kill `ps ax | grep clickhouse-server | grep -v 'grep' | awk '{print $1}'` 2>/dev/null
for i in {1..10}
do
if ! kill -0 `ps ax | grep clickhouse-server | grep -v 'grep' | awk '{print $1}'`; then
echo "No clickhouse process"
break
else
echo "Process" `ps ax | grep clickhouse-server | grep -v 'grep' | awk '{print $1}'` "still alive"
sleep 10
fi
done
}
kill_clickhouse
clickhouse-server --config /etc/clickhouse-server/config.xml --daemon