Kill not only database proc

This commit is contained in:
alesapin 2020-12-15 19:20:09 +03:00
parent 873d9d1e1e
commit 2e4aa6b9e1

View File

@ -168,7 +168,13 @@ def run_single_test(args, ext, server_logs_level, client_options, case_file, std
try:
clickhouse_proc_create.communicate(("DROP DATABASE " + database), timeout=seconds_left)
except TimeoutExpired:
total_time = (datetime.now() - start_time).total_seconds()
# kill test process because it can also hung
if proc.returncode is None:
try:
proc.kill()
except OSError as e:
if e.errno != ESRCH:
raise
return clickhouse_proc_create, "", "Timeout dropping database {} after test".format(database), total_time
total_time = (datetime.now() - start_time).total_seconds()