mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
un-flaky the test
This commit is contained in:
parent
0fd2d573ae
commit
ebad7062a8
@ -5,13 +5,16 @@ CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
|||||||
# shellcheck source=../shell_config.sh
|
# shellcheck source=../shell_config.sh
|
||||||
. "$CUR_DIR"/../shell_config.sh
|
. "$CUR_DIR"/../shell_config.sh
|
||||||
|
|
||||||
# Get the help message in short and vebose form and put them into txt files
|
# Unique identifier for concurrent execution
|
||||||
$CLICKHOUSE_CLIENT --help > help_msg.txt
|
PID=$$
|
||||||
$CLICKHOUSE_CLIENT --help --verbose > verbose_help_msg.txt
|
|
||||||
|
# Get the help message in short and verbose form and put them into txt files
|
||||||
|
$CLICKHOUSE_CLIENT --help > "help_msg_$PID.txt"
|
||||||
|
$CLICKHOUSE_CLIENT --help --verbose > "verbose_help_msg_$PID.txt"
|
||||||
|
|
||||||
# Sizes of files
|
# Sizes of files
|
||||||
size_short=$(stat -c %s help_msg.txt)
|
size_short=$(stat -c %s "help_msg_$PID.txt")
|
||||||
size_verbose=$(stat -c %s verbose_help_msg.txt)
|
size_verbose=$(stat -c %s "verbose_help_msg_$PID.txt")
|
||||||
|
|
||||||
# If the size of the short help message is less, everything is OK
|
# If the size of the short help message is less, everything is OK
|
||||||
if [ $size_short -lt $size_verbose ]; then
|
if [ $size_short -lt $size_verbose ]; then
|
||||||
@ -20,16 +23,15 @@ else
|
|||||||
echo "Not OK"
|
echo "Not OK"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm help_msg.txt
|
rm "help_msg_$PID.txt"
|
||||||
rm verbose_help_msg.txt
|
rm "verbose_help_msg_$PID.txt"
|
||||||
|
|
||||||
|
|
||||||
# The same for clickhouse local
|
# The same for clickhouse local
|
||||||
$CLICKHOUSE_LOCAL --help > help_msg.txt
|
$CLICKHOUSE_LOCAL --help > "help_msg_$PID.txt"
|
||||||
$CLICKHOUSE_LOCAL --help --verbose > verbose_help_msg.txt
|
$CLICKHOUSE_LOCAL --help --verbose > "verbose_help_msg_$PID.txt"
|
||||||
|
|
||||||
size_short=$(stat -c %s help_msg.txt)
|
size_short=$(stat -c %s "help_msg_$PID.txt")
|
||||||
size_verbose=$(stat -c %s verbose_help_msg.txt)
|
size_verbose=$(stat -c %s "verbose_help_msg_$PID.txt")
|
||||||
|
|
||||||
if [ $size_short -lt $size_verbose ]; then
|
if [ $size_short -lt $size_verbose ]; then
|
||||||
echo "OK"
|
echo "OK"
|
||||||
@ -37,5 +39,5 @@ else
|
|||||||
echo "Not OK"
|
echo "Not OK"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm help_msg.txt
|
rm "help_msg_$PID.txt"
|
||||||
rm verbose_help_msg.txt
|
rm "verbose_help_msg_$PID.txt"
|
||||||
|
Loading…
Reference in New Issue
Block a user