mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 09:02:00 +00:00
tests: omit python stacktace in case of signals/server died
It is simply useless and only create output that only distracts. Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This commit is contained in:
parent
ea1575f60a
commit
f9dcce6da3
@ -3438,11 +3438,12 @@ def parse_args():
|
|||||||
|
|
||||||
|
|
||||||
class Terminated(KeyboardInterrupt):
|
class Terminated(KeyboardInterrupt):
|
||||||
pass
|
def __init__(self, signal):
|
||||||
|
self.signal = signal
|
||||||
|
|
||||||
|
|
||||||
def signal_handler(sig, frame):
|
def signal_handler(signal, frame):
|
||||||
raise Terminated(f"Terminated with {sig} signal")
|
raise Terminated(signal)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
@ -3594,4 +3595,14 @@ if __name__ == "__main__":
|
|||||||
if args.replace_replicated_with_shared:
|
if args.replace_replicated_with_shared:
|
||||||
args.s3_storage = True
|
args.s3_storage = True
|
||||||
|
|
||||||
main(args)
|
try:
|
||||||
|
main(args)
|
||||||
|
except ServerDied as e:
|
||||||
|
print(f"{e}", file=sys.stderr)
|
||||||
|
sys.exit(1)
|
||||||
|
except Terminated as e:
|
||||||
|
print(f"Terminated with {e.signal} signal", file=sys.stderr)
|
||||||
|
sys.exit(128 + e.signal)
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
print("Interrupted")
|
||||||
|
sys.exit(128 + signal.SIGINT)
|
||||||
|
Loading…
Reference in New Issue
Block a user