mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 08:02:02 +00:00
Add tests
This commit is contained in:
parent
4a3ade1aa5
commit
0505e2e589
@ -0,0 +1,2 @@
|
||||
finished test_01948_tcp_default default SELECT * FROM\n (\n SELECT a.name as n\n FROM\n (\n SELECT \'Name\' as name, number FROM system.numbers LIMIT 2000000\n ) AS a,\n (\n SELECT \'Name\' as name, number FROM system.numbers LIMIT 2000000\n ) as b\n GROUP BY n\n )\n LIMIT 20\n FORMAT Null
|
||||
finished test_01948_http_default default SELECT * FROM\n (\n SELECT a.name as n\n FROM\n (\n SELECT \'Name\' as name, number FROM system.numbers LIMIT 2000000\n ) AS a,\n (\n SELECT \'Name\' as name, number FROM system.numbers LIMIT 2000000\n ) as b\n GROUP BY n\n )\n LIMIT 20\n FORMAT Null
|
54
tests/queries/0_stateless/01950_kill_large_group_by_query.sh
Executable file
54
tests/queries/0_stateless/01950_kill_large_group_by_query.sh
Executable file
@ -0,0 +1,54 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
# shellcheck source=../shell_config.sh
|
||||
. "$CURDIR"/../shell_config.sh
|
||||
|
||||
set -e -o pipefail
|
||||
|
||||
function wait_for_query_to_start()
|
||||
{
|
||||
while [[ $($CLICKHOUSE_CLIENT -q "SELECT count() FROM system.processes WHERE query_id = '$1'") == 0 ]]; do sleep 0.1; done
|
||||
}
|
||||
|
||||
|
||||
# TCP CLIENT
|
||||
|
||||
$CLICKHOUSE_CLIENT --max_execution_time 10 --query_id "test_01948_tcp_$CLICKHOUSE_DATABASE" -q \
|
||||
"SELECT * FROM
|
||||
(
|
||||
SELECT a.name as n
|
||||
FROM
|
||||
(
|
||||
SELECT 'Name' as name, number FROM system.numbers LIMIT 2000000
|
||||
) AS a,
|
||||
(
|
||||
SELECT 'Name' as name, number FROM system.numbers LIMIT 2000000
|
||||
) as b
|
||||
GROUP BY n
|
||||
)
|
||||
LIMIT 20
|
||||
FORMAT Null" > /dev/null 2>&1 &
|
||||
wait_for_query_to_start "test_01948_tcp_$CLICKHOUSE_DATABASE"
|
||||
$CLICKHOUSE_CLIENT --max_execution_time 10 -q "KILL QUERY WHERE query_id = 'test_01948_tcp_$CLICKHOUSE_DATABASE' SYNC"
|
||||
|
||||
|
||||
# HTTP CLIENT
|
||||
|
||||
${CLICKHOUSE_CURL_COMMAND} -q --max-time 10 -sS "$CLICKHOUSE_URL&query_id=test_01948_http_$CLICKHOUSE_DATABASE" -d \
|
||||
"SELECT * FROM
|
||||
(
|
||||
SELECT a.name as n
|
||||
FROM
|
||||
(
|
||||
SELECT 'Name' as name, number FROM system.numbers LIMIT 2000000
|
||||
) AS a,
|
||||
(
|
||||
SELECT 'Name' as name, number FROM system.numbers LIMIT 2000000
|
||||
) as b
|
||||
GROUP BY n
|
||||
)
|
||||
LIMIT 20
|
||||
FORMAT Null" > /dev/null 2>&1 &
|
||||
wait_for_query_to_start "test_01948_http_$CLICKHOUSE_DATABASE"
|
||||
$CLICKHOUSE_CURL --max-time 10 -sS "$CLICKHOUSE_URL" -d "KILL QUERY WHERE query_id = 'test_01948_http_$CLICKHOUSE_DATABASE' SYNC"
|
Loading…
Reference in New Issue
Block a user