From 42641a5b56efef8054477e4edb48272e9e8c9d24 Mon Sep 17 00:00:00 2001 From: Nikita Mikhaylov Date: Wed, 31 Jul 2019 18:43:55 +0300 Subject: [PATCH] update flappy test --- .../0_stateless/00974_text_log_table_not_empty.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/dbms/tests/queries/0_stateless/00974_text_log_table_not_empty.sh b/dbms/tests/queries/0_stateless/00974_text_log_table_not_empty.sh index 869f7a54b6b..10f095b53f6 100755 --- a/dbms/tests/queries/0_stateless/00974_text_log_table_not_empty.sh +++ b/dbms/tests/queries/0_stateless/00974_text_log_table_not_empty.sh @@ -4,6 +4,16 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) . $CURDIR/../shell_config.sh ${CLICKHOUSE_CLIENT} --query="SELECT 6103" -sleep 0.1 + +>00974_text_log_table_not_empty.tmp + +for (( i=1; i <= 50; i++ )) +do + ${CLICKHOUSE_CLIENT} --query="SYSTEM FLUSH LOGS" -${CLICKHOUSE_CLIENT} --query="SELECT count() > 0 FROM system.text_log WHERE position(system.text_log.message, 'SELECT 6103') > 0" +sleep 0.1; +if [[ $($CLICKHOUSE_CURL -sS "$CLICKHOUSE_URL" -d "SELECT count() > 0 FROM system.text_log WHERE position(system.text_log.message, 'SELECT 6103') > 0") == 1 ]]; then echo 1; exit; fi; + +done; + +