Try to fix corrupted report for died server

This commit is contained in:
Mikhail f. Shiryaev 2022-04-27 13:31:10 +02:00
parent 2349d3d6a6
commit 5e019efb7e
No known key found for this signature in database
GPG Key ID: 4B02ED204C7D93F4

View File

@ -147,7 +147,6 @@ def stop_tests():
global restarted_tests
with stop_tests_triggered_lock:
print("Stopping tests")
if not stop_tests_triggered.is_set():
stop_tests_triggered.set()
@ -160,11 +159,17 @@ def stop_tests():
restarted_tests = [*restarted_tests]
# send signal to all processes in group to avoid hung check triggering
# (to avoid terminating clickhouse-test itself, the signal should be ignored)
# (to avoid terminating clickhouse-test itself, a signal should be ignored)
signal.signal(signal.SIGTERM, signal.SIG_IGN)
os.killpg(os.getpgid(os.getpid()), signal.SIGTERM)
signal.signal(signal.SIGTERM, signal.SIG_DFL)
# This message must be after the tests' messages are ended, otherwise
# it corrupts the output, example:
# 00993_system_parts_race_condition_drop_zookeeper: Stopping tests
# [ FAIL ] 0.00 sec. - server died
print("Stopped tests")
def get_db_engine(args, database_name):
if args.replicated_database: