From ee666448e92f04965636d62eda5f365ab0ed0bb0 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Mon, 17 Aug 2020 22:49:04 +0300 Subject: [PATCH] Simplify 01451_dist_logs test --- .../0_stateless/01451_dist_logs.reference | 20 +++++++++++++++++++ tests/queries/0_stateless/01451_dist_logs.sh | 10 +++++----- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/tests/queries/0_stateless/01451_dist_logs.reference b/tests/queries/0_stateless/01451_dist_logs.reference index e69de29bb2d..39d4be96554 100644 --- a/tests/queries/0_stateless/01451_dist_logs.reference +++ b/tests/queries/0_stateless/01451_dist_logs.reference @@ -0,0 +1,20 @@ +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 diff --git a/tests/queries/0_stateless/01451_dist_logs.sh b/tests/queries/0_stateless/01451_dist_logs.sh index 77b2a91c3aa..d192eb30251 100755 --- a/tests/queries/0_stateless/01451_dist_logs.sh +++ b/tests/queries/0_stateless/01451_dist_logs.sh @@ -1,12 +1,12 @@ #!/usr/bin/env bash +# level should be 'trace', otherwise it will not trigger the issue CLICKHOUSE_CLIENT_SERVER_LOGS_LEVEL=trace + CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) . "$CURDIR"/../shell_config.sh # triggered not for the first query -yes "select * from remote('127.{2,3}', system.numbers) where number = 10 limit 1;" 2>/dev/null | { - head -n20 | ${CLICKHOUSE_CLIENT} -n 2>&1 >/dev/null | grep 'DB::Exception: ' -} -# grep above will fail during diff with .reference -exit 0 +for _ in {1..20}; do + echo "select * from remote('127.{2,3}', system.numbers) where number = 10 limit 1;" +done | ${CLICKHOUSE_CLIENT} -n 2>/dev/null