test: Fix restart node race

This commit is contained in:
MarcoFalke
2020-12-17 13:39:03 +01:00
parent f0913f2f95
commit fab46b34f4
2 changed files with 5 additions and 3 deletions

View File

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