From 69e42b6dea41d4ab140b208ba0ba2d34046d6942 Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Wed, 31 Jan 2024 10:48:14 -0600 Subject: [PATCH] GH-2165 Use explicit shutdown of cluster as atexit doesn't work on errors --- tests/TestHarness/Cluster.py | 2 -- tests/TestHarness/TestHelper.py | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/TestHarness/Cluster.py b/tests/TestHarness/Cluster.py index c678ca4364..c098fa67f7 100644 --- a/tests/TestHarness/Cluster.py +++ b/tests/TestHarness/Cluster.py @@ -1,4 +1,3 @@ -import atexit import copy import subprocess import time @@ -76,7 +75,6 @@ def __init__(self, localCluster=True, host="localhost", port=8888, walletHost="l keepRunning: [True|False] If true, leave nodes running when Cluster is destroyed. Implies keepLogs. keepLogs: [True|False] If true, retain log files after cluster shuts down. """ - atexit.register(self.shutdown) self.accounts=[] self.nodes=[] self.unstartedNodes=[] diff --git a/tests/TestHarness/TestHelper.py b/tests/TestHarness/TestHelper.py index 47a62d1471..fe98e97c1b 100644 --- a/tests/TestHarness/TestHelper.py +++ b/tests/TestHarness/TestHelper.py @@ -187,3 +187,5 @@ def reportProductionAnalysis(thresholdMs): cluster.testFailed = not testSuccessful if walletMgr: walletMgr.testFailed = not testSuccessful + + cluster.shutdown()