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

24 lines
702 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)
. "$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
2020-10-28 01:24:30 +00:00
"${CURDIR}"/01526_client_start_and_exit.expect | grep -v -P 'ClickHouse client|Connecting|Connected|:\) Bye\.|^\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