ClickHouse/tests/queries/0_stateless/01526_client_start_and_exit.sh

25 lines
766 B
Bash
Raw Normal View History

2020-10-16 00:07:56 +00:00
#!/usr/bin/env bash
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
2020-12-28 11:46:53 +00:00
# shellcheck source=../shell_config.sh
2020-10-16 00:07:56 +00:00
. "$CURDIR"/../shell_config.sh
# Create a huge amount of tables, so Suggest will take a time to load
2020-10-25 02:31:58 +00:00
${CLICKHOUSE_CLIENT} -q "SELECT 'CREATE TABLE test_' || hex(randomPrintableASCII(40)) || '(x UInt8) Engine=Memory;' FROM numbers(10000)" --format=TSVRaw | ${CLICKHOUSE_BENCHMARK} -c32 -i 10000 -d 0 2>&1 | grep -F 'Loaded 10000 queries'
2020-10-16 00:07:56 +00:00
function stress()
{
while true; do
2021-01-21 18:01:32 +00:00
"${CURDIR}"/01526_client_start_and_exit.expect-not-a-test-case | grep -v -P 'ClickHouse client|Connecting|Connected|:\) Bye\.|new year|^\s*$|spawn bash|^0\s*$'
2020-10-16 00:07:56 +00:00
done
}
2020-10-28 01:24:30 +00:00
export CURDIR
2020-10-16 00:07:56 +00:00
export -f stress
for _ in {1..10}; do
timeout 3 bash -c stress &
done
wait