mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-12 23:56:55 +02:00
test: fix intermittent failure in wallet_reorgsrestore.py
Wait until the node's process has fully stopped before starting a new instance. Since the same code is used in tool_wallet.py, this consolidates the behavior into a 'kill_process()' function.
This commit is contained in:
@ -443,6 +443,11 @@ class TestNode():
|
||||
kwargs["expected_ret_code"] = 1 if expect_error else 0 # Whether node shutdown return EXIT_FAILURE or EXIT_SUCCESS
|
||||
self.wait_until(lambda: self.is_node_stopped(**kwargs), timeout=timeout)
|
||||
|
||||
def kill_process(self):
|
||||
self.process.kill()
|
||||
self.wait_until_stopped(expected_ret_code=1 if platform.system() == "Windows" else -9)
|
||||
assert self.is_node_stopped()
|
||||
|
||||
def replace_in_config(self, replacements):
|
||||
"""
|
||||
Perform replacements in the configuration file.
|
||||
|
Reference in New Issue
Block a user