From 72f61ae399ee2c9c608069764430c4d9183ec2d4 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Mon, 13 Feb 2023 16:46:56 +0100 Subject: [PATCH] Do not polute logs in clickhouse-test In case of there are less then 100 lines, there is no need to split lines with '#', and in fact, it will only looks it odd and hard to interpret. Signed-off-by: Azat Khuzhin --- tests/clickhouse-test | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/clickhouse-test b/tests/clickhouse-test index 2215982affe..1446c49b08f 100755 --- a/tests/clickhouse-test +++ b/tests/clickhouse-test @@ -76,7 +76,10 @@ def trim_for_log(s): if not s: return s lines = s.splitlines() - return "\n".join(lines[:50] + ["#" * 100] + lines[-50:]) + if len(lines) > 100: + return "\n".join(lines[:50] + ["#" * 100] + lines[-50:]) + else: + return "\n".join(lines) class HTTPError(Exception):