Update send logs tests.

This commit is contained in:
Nikolai Kochetov 2019-07-29 13:51:56 +03:00
parent 40ae9aa60b
commit 52a9341082
2 changed files with 12 additions and 15 deletions

View File

@ -3,18 +3,18 @@
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
. $CURDIR/../shell_config.sh
clickhouse-client --send_logs_level="trace" --query="SELECT 1" 2>&1 | awk '{ print $8 }' | grep "Trace" | head -n 1
$CLICKHOUSE_BINARY client --send_logs_level="trace" --query="SELECT 1" 2>&1 | awk '{ print $8 }' | grep "Trace" | head -n 1
echo "."
clickhouse-client --send_logs_level="debug" --query="SELECT 1" 2>&1 | awk '{ print $8 }' | grep "Debug" | head -n 1
$CLICKHOUSE_BINARY client --send_logs_level="debug" --query="SELECT 1" 2>&1 | awk '{ print $8 }' | grep "Debug" | head -n 1
echo "."
clickhouse-client --send_logs_level="information" --query="SELECT 1" 2>&1 | awk '{ print $8 }' | grep "Information" | head -n 1
$CLICKHOUSE_BINARY client --send_logs_level="information" --query="SELECT 1" 2>&1 | awk '{ print $8 }' | grep "Information" | head -n 1
echo "."
clickhouse-client --send_logs_level="error" --query="SELECT throwIf(1)" 2>&1 | awk '{ print $8 }' | grep "Error" | head -n 1
$CLICKHOUSE_BINARY client --send_logs_level="error" --query="SELECT throwIf(1)" 2>&1 | awk '{ print $8 }' | grep "Error" | head -n 1
echo "-"
clickhouse-client --send_logs_level="debug" --query="SELECT 1" 2>&1 | awk '{ print $8 }' | grep "Trace" | head -n 1
$CLICKHOUSE_BINARY client --send_logs_level="debug" --query="SELECT 1" 2>&1 | awk '{ print $8 }' | grep "Trace" | head -n 1
echo "."
clickhouse-client --send_logs_level="information" --query="SELECT 1" 2>&1 | awk '{ print $8 }' | grep "Debug\|Trace" | head -n 1
$CLICKHOUSE_BINARY client --send_logs_level="information" --query="SELECT 1" 2>&1 | awk '{ print $8 }' | grep "Debug\|Trace" | head -n 1
echo "."
clickhouse-client --send_logs_level="error" --query="SELECT throwIf(1)" 2>&1 | awk '{ print $8 }' | grep "Debug\|Trace\|Information" | head -n 1
$CLICKHOUSE_BINARY client --send_logs_level="error" --query="SELECT throwIf(1)" 2>&1 | awk '{ print $8 }' | grep "Debug\|Trace\|Information" | head -n 1
echo "."
clickhouse-client --send_logs_level="None" --query="SELECT throwIf(1)" 2>&1 | awk '{ print $8 }' | grep "Debug\|Trace\|Information\|Error" | head -n 1
$CLICKHOUSE_BINARY client --send_logs_level="None" --query="SELECT throwIf(1)" 2>&1 | awk '{ print $8 }' | grep "Debug\|Trace\|Information\|Error" | head -n 1

View File

@ -3,12 +3,9 @@
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
. $CURDIR/../shell_config.sh
> 00965_send_logs_level_concurrent_queries_first.tmp
> 00965_send_logs_level_concurrent_queries_second.tmp
clickhouse-client --send_logs_level="trace" --query="SELECT * from numbers(100000);" 2>&1 | awk '{ print $8 }' > 00965_send_logs_level_concurrent_queries_first.tmp &
clickhouse-client --send_logs_level="trace" --query="SELECT * from numbers(100000);" 2>&1 | awk '{ print $8 }' > 00965_send_logs_level_concurrent_queries_second.tmp &
for i in {1..100}; do
$CLICKHOUSE_BINARY client --send_logs_level="trace" --query="SELECT * from numbers(100000);" > /dev/null 2> /dev/null &
$CLICKHOUSE_BINARY client --send_logs_level="information" --query="SELECT * from numbers(100000);" 2>&1 | awk '{ print $8 }' | grep "Debug\|Trace" &
done
wait
diff 00965_send_logs_level_concurrent_queries_first.tmp 00965_send_logs_level_concurrent_queries_second.tmp