diff --git a/tests/TestHarness/Cluster.py b/tests/TestHarness/Cluster.py index cc954ba36a..87ab5eab23 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 6f3a1244ae..66bebd7cd4 100644 --- a/tests/TestHarness/TestHelper.py +++ b/tests/TestHarness/TestHelper.py @@ -184,3 +184,5 @@ def reportProductionAnalysis(thresholdMs): cluster.testFailed = not testSuccessful if walletMgr: walletMgr.testFailed = not testSuccessful + + cluster.shutdown() diff --git a/tests/trace_plugin_test.py b/tests/trace_plugin_test.py index 1bfe110c60..995bca74eb 100755 --- a/tests/trace_plugin_test.py +++ b/tests/trace_plugin_test.py @@ -117,6 +117,7 @@ def setUpClass(self): @classmethod def tearDownClass(self): TraceApiPluginTest.cluster.testFailed = not testSuccessful + TraceApiPluginTest.cluster.shutdown() if __name__ == "__main__": unittest.main()