Merge pull request #11321 from ClickHouse/better-hung-check

Better check for hung queries in clickhouse-test
This commit is contained in:
alexey-milovidov 2020-05-31 22:19:12 +03:00 committed by GitHub
commit 59c9e030b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -502,7 +502,14 @@ def main(args):
total_tests_run += tests_n total_tests_run += tests_n
if args.hung_check: if args.hung_check:
# 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) processlist = get_processlist(args.client)
if not processlist:
break
sleep(1)
if processlist: if processlist:
print(colored("\nFound hung queries in processlist:", args, "red", attrs=["bold"])) print(colored("\nFound hung queries in processlist:", args, "red", attrs=["bold"]))
print(processlist) print(processlist)