Fail more quickly in clickhouse-test if server does not respond

This commit is contained in:
Alexey Milovidov 2020-09-25 05:27:13 +03:00
parent 85bfdbad24
commit 161ee1df3e

View File

@ -303,6 +303,14 @@ def run_tests_array(all_tests_with_params):
clickhouse_proc = Popen(shlex.split(args.client), stdin=PIPE, stdout=PIPE, stderr=PIPE)
clickhouse_proc.communicate("SELECT 'Running test {suite}/{case} from pid={pid}';".format(pid = os.getpid(), case = case, suite = suite))
if clickhouse_proc.returncode != 0:
failures += 1
print(MSG_FAIL, end='')
print_test_time(0)
print(" - server does not respond to health check")
SERVER_DIED = True
break
reference_file = os.path.join(suite_dir, name) + '.reference'
stdout_file = os.path.join(suite_tmp_dir, name) + '.stdout'
stderr_file = os.path.join(suite_tmp_dir, name) + '.stderr'