tests: move random_str() helper into shell_config.sh

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This commit is contained in:
Azat Khuzhin 2022-06-28 12:14:23 +03:00
parent 1a71e44b28
commit 769017e1f5
5 changed files with 6 additions and 23 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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"
}