This commit is contained in:
Alexander Tokmakov 2022-05-28 20:44:58 +02:00
parent be498b0658
commit 9e3e795353
3 changed files with 9 additions and 5 deletions

View File

@ -5,8 +5,8 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CURDIR"/../shell_config.sh
$CLICKHOUSE_CLIENT -q 'CREATE USER IF NOT EXISTS u1 IDENTIFIED WITH no_password'
$CLICKHOUSE_CLIENT -q 'GRANT ALL ON *.* TO u1'
$CLICKHOUSE_CLIENT -q 'CREATE USER IF NOT EXISTS u02104 IDENTIFIED WITH no_password'
$CLICKHOUSE_CLIENT -q 'GRANT ALL ON *.* TO u02104'
function overcommited()
{
@ -46,4 +46,4 @@ else
echo "OVERCOMMITED WITH USER LIMIT WAS KILLED"
fi
$CLICKHOUSE_CLIENT -q 'DROP USER IF EXISTS u1'
$CLICKHOUSE_CLIENT -q 'DROP USER IF EXISTS u02104'

View File

@ -63,7 +63,7 @@ SELECT indexOf(['a', 'b', NULL], toLowCardinality('a'));
"""
}
for i in `seq 1 32`; do go | grep -q "Exception" && echo 'FAIL' || echo 'OK' ||: & done
for _ in `seq 1 32`; do go | grep -q "Exception" && echo 'FAIL' || echo 'OK' ||: & done
wait

View File

@ -11,14 +11,18 @@ $CLICKHOUSE_CLIENT -q 'GRANT ALL ON *.* TO u02294'
function query()
{
while true; do
$CLICKHOUSE_CLIENT -u u02294 -q 'SELECT number FROM numbers(130000) GROUP BY number SETTINGS max_memory_usage_for_user=5000000,memory_overcommit_ratio_denominator=2000000000000000000,memory_usage_overcommit_max_wait_microseconds=500' >/dev/null 2>/dev/null
done
}
export -f query
TIMEOUT=10
for _ in {1..10};
do
clickhouse_client_loop_timeout 10 query &
timeout $TIMEOUT bash -c query &
done
wait