mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 17:12:03 +00:00
tests: move random_str() helper into shell_config.sh
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This commit is contained in:
parent
1a71e44b28
commit
769017e1f5
@ -4,11 +4,6 @@ CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
# shellcheck source=../shell_config.sh
|
||||
. "$CUR_DIR"/../shell_config.sh
|
||||
|
||||
function random_str()
|
||||
{
|
||||
local n=$1 && shift
|
||||
tr -cd '[:lower:]' < /dev/urandom | head -c"$n"
|
||||
}
|
||||
function test_query_duration_ms()
|
||||
{
|
||||
local query_id
|
||||
|
@ -29,12 +29,6 @@ $CLICKHOUSE_CLIENT -nm -q "
|
||||
INSERT INTO in_order_agg_01710 SELECT 1, number%2, number%4, number FROM numbers(100000);
|
||||
"
|
||||
|
||||
function random_str()
|
||||
{
|
||||
local n=$1 && shift
|
||||
tr -cd '[:lower:]' < /dev/urandom | head -c"$n"
|
||||
}
|
||||
|
||||
function run_query()
|
||||
{
|
||||
local query=$1 && shift
|
||||
|
@ -35,12 +35,6 @@ $CLICKHOUSE_CLIENT -nm -q "
|
||||
INSERT INTO in_order_agg_partial_01710 SELECT 1, number%2, number%4, number FROM numbers(100000) LIMIT 50000, 100000;
|
||||
"
|
||||
|
||||
function random_str()
|
||||
{
|
||||
local n=$1 && shift
|
||||
tr -cd '[:lower:]' < /dev/urandom | head -c"$n"
|
||||
}
|
||||
|
||||
function run_query()
|
||||
{
|
||||
local query=$1 && shift
|
||||
|
@ -4,12 +4,6 @@ CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
# shellcheck source=../shell_config.sh
|
||||
. "$CUR_DIR"/../shell_config.sh
|
||||
|
||||
function random_str()
|
||||
{
|
||||
local n=$1 && shift
|
||||
tr -cd '[:lower:]' < /dev/urandom | head -c"$n"
|
||||
}
|
||||
|
||||
function check_refcnt_for_table()
|
||||
{
|
||||
local table=$1 && shift
|
||||
|
@ -143,3 +143,9 @@ function wait_for_queries_to_finish()
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
function random_str()
|
||||
{
|
||||
local n=$1 && shift
|
||||
tr -cd '[:lower:]' < /dev/urandom | head -c"$n"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user