Merge bitcoin/bitcoin#32069: test: fix intermittent failure in wallet_reorgsrestore.py

36b0713edc test: fix intermittent failure in wallet_reorgsrestore.py (furszy)

Pull request description:

  In response to #32066 intermittent failure.

  Wait until the node's process has fully stopped before starting a new instance of it.
  Same behavior as in the [tool_wallet.py](698f86964c/test/functional/tool_wallet.py (L540)) test.

ACKs for top commit:
  maflcko:
    lgtm ACK 36b0713edc
  Chand-ra:
    tACK [36b0713](36b0713edc)

Tree-SHA512: 8e01493ef1fb58589479f3e12d7429d02ca75a2183d5f79d3b6a2fbf13334878926274a20857f1b4729afc1d30b65789daed229ce06ba236b91d949b73f45d5a
This commit is contained in:
merge-script
2025-03-16 22:29:14 +08:00
3 changed files with 7 additions and 5 deletions

View File

@ -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.