mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 14:59:39 -04:00
test: Avoid redundant stop and error spam on shutdown
Trying to shut down a node after a test failure may fail and lead to an RPC error. Also, it is confusing to sidestep the existing fallback to kill any leftover nodes on a test failure. So just rely on the fallback. Idea by Hodlinator. Co-Authored-By: Hodlinator <172445034+hodlinator@users.noreply.github.com>
This commit is contained in:
parent
fae3bf6b87
commit
faf2f2c654
1 changed files with 6 additions and 3 deletions
|
@ -323,9 +323,12 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
|
||||||
|
|
||||||
self.log.debug('Closing down network thread')
|
self.log.debug('Closing down network thread')
|
||||||
self.network_thread.close()
|
self.network_thread.close()
|
||||||
self.log.info("Stopping nodes")
|
if self.success == TestStatus.FAILED:
|
||||||
if self.nodes:
|
self.log.info("Not stopping nodes as test failed. The dangling processes will be cleaned up later.")
|
||||||
self.stop_nodes()
|
else:
|
||||||
|
self.log.info("Stopping nodes")
|
||||||
|
if self.nodes:
|
||||||
|
self.stop_nodes()
|
||||||
|
|
||||||
should_clean_up = (
|
should_clean_up = (
|
||||||
not self.options.nocleanup and
|
not self.options.nocleanup and
|
||||||
|
|
Loading…
Add table
Reference in a new issue