Skip to content

Commit

Permalink
GH-2165 Use explicit shutdown of cluster as atexit doesn't work on er…
Browse files Browse the repository at this point in the history
…rors
  • Loading branch information
heifner committed Jan 31, 2024
1 parent 218d40a commit 69e42b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 0 additions & 2 deletions tests/TestHarness/Cluster.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import atexit
import copy
import subprocess
import time
Expand Down Expand Up @@ -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=[]
Expand Down
2 changes: 2 additions & 0 deletions tests/TestHarness/TestHelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,5 @@ def reportProductionAnalysis(thresholdMs):
cluster.testFailed = not testSuccessful
if walletMgr:
walletMgr.testFailed = not testSuccessful

cluster.shutdown()

0 comments on commit 69e42b6

Please sign in to comment.