aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework/test_node.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-12-17 13:39:03 +0100
committerMarcoFalke <falke.marco@gmail.com>2020-12-17 15:06:31 +0100
commitfab46b34f4b13abbb0af276c3fb548f25ccc28bd (patch)
treec1b89d98be6c1b0e99271756811695255947b45f /test/functional/test_framework/test_node.py
parentf0913f2f950c7a3e0a14d32216bd6ce4e19d85df (diff)
downloadbitcoin-fab46b34f4b13abbb0af276c3fb548f25ccc28bd.tar.xz
test: Fix restart node race
Diffstat (limited to 'test/functional/test_framework/test_node.py')
-rwxr-xr-xtest/functional/test_framework/test_node.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/functional/test_framework/test_node.py b/test/functional/test_framework/test_node.py
index a618706a77..e10ec1328b 100755
--- a/test/functional/test_framework/test_node.py
+++ b/test/functional/test_framework/test_node.py
@@ -308,7 +308,7 @@ class TestNode():
def version_is_at_least(self, ver):
return self.version is None or self.version >= ver
- def stop_node(self, expected_stderr='', wait=0):
+ def stop_node(self, expected_stderr='', *, wait=0, wait_until_stopped=True):
"""Stop the node."""
if not self.running:
return
@@ -337,6 +337,9 @@ class TestNode():
del self.p2ps[:]
+ if wait_until_stopped:
+ self.wait_until_stopped()
+
def is_node_stopped(self):
"""Checks whether the node has stopped.