mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-05 05:52:05 +00:00
61f27c9dab
CI: https://s3.amazonaws.com/clickhouse-test-reports/45282/e8cdb5e1c52791fb7e96a71df9c6a7bca15b5a59/fast_test.html Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
34 lines
1.1 KiB
Bash
Executable File
34 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Tags: no-parallel
|
|
# Tag no-parallel: since someone may create table in system database
|
|
|
|
# Server may ignore some exceptions, but it still print exceptions to logs and (at least in CI) sends Error and Warning log messages to client
|
|
# making test fail because of non-empty stderr. Ignore such log messages.
|
|
CLICKHOUSE_CLIENT_SERVER_LOGS_LEVEL=fatal
|
|
|
|
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
|
# shellcheck source=../shell_config.sh
|
|
. "$CURDIR"/../shell_config.sh
|
|
|
|
THREADS=8
|
|
RAND=$(($RANDOM))
|
|
LIMIT=10000
|
|
|
|
function run_selects()
|
|
{
|
|
thread_num=$1
|
|
readarray -t tables_arr < <(${CLICKHOUSE_CLIENT} -q "SELECT database || '.' || name FROM system.tables
|
|
WHERE database in ('system', 'information_schema', 'INFORMATION_SCHEMA') and name!='zookeeper' and name!='merge_tree_metadata_cache' and name!='models'
|
|
AND sipHash64(name || toString($RAND)) % $THREADS = $thread_num")
|
|
|
|
for t in "${tables_arr[@]}"
|
|
do
|
|
${CLICKHOUSE_CLIENT} -q "SELECT * FROM $t LIMIT $LIMIT FORMAT Null" # Suppress style check: database=$CLICKHOUSE_DATABASEs
|
|
done
|
|
}
|
|
|
|
for ((i=0; i<THREADS; i++)) do
|
|
run_selects "$i" &
|
|
done
|
|
wait
|