From 293241cc22bdf0c6782957b52c60bfd0644c36c0 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sun, 31 May 2020 17:57:29 +0300 Subject: [PATCH] Better check for hung queries in clickhouse-test --- tests/clickhouse-test | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/clickhouse-test b/tests/clickhouse-test index 60390c999ab..219546c92f1 100755 --- a/tests/clickhouse-test +++ b/tests/clickhouse-test @@ -502,7 +502,14 @@ def main(args): total_tests_run += tests_n if args.hung_check: - processlist = get_processlist(args.client) + + # Some queries may execute in background for some time after test was finished. This is normal. + for n in range(1, 60): + processlist = get_processlist(args.client) + if not processlist: + break + sleep(1) + if processlist: print(colored("\nFound hung queries in processlist:", args, "red", attrs=["bold"])) print(processlist)