mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 00:30:49 +00:00
Cover system.processes.elapsed
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This commit is contained in:
parent
1307e6d323
commit
5f36f71729
@ -0,0 +1 @@
|
||||
OK
|
19
tests/queries/0_stateless/02558_system_processes_elapsed.sh
Executable file
19
tests/queries/0_stateless/02558_system_processes_elapsed.sh
Executable file
@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
# shellcheck source=../shell_config.sh
|
||||
. "$CUR_DIR"/../shell_config.sh
|
||||
|
||||
while :; do
|
||||
$CLICKHOUSE_CLIENT -q "select sleepEachRow(0.1) from numbers(100) settings max_block_size=1 format Null" &
|
||||
pid=$!
|
||||
sleep 1.5
|
||||
duration="$($CLICKHOUSE_CLIENT -q "select floor(elapsed) from system.processes where current_database = currentDatabase() and query not like '%system.processes%'")"
|
||||
kill -INT $pid
|
||||
wait
|
||||
$CLICKHOUSE_CLIENT -q "kill query where current_database = currentDatabase() sync format Null"
|
||||
if [[ $duration -eq 1 ]]; then
|
||||
echo "OK"
|
||||
break
|
||||
fi
|
||||
done
|
Loading…
Reference in New Issue
Block a user