aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-08-04 12:55:35 +0200
committerMarcoFalke <falke.marco@gmail.com>2020-08-04 16:13:33 +0200
commitfa4dfd215f62e88d668311701735c332c264fa2a (patch)
tree424588fce802c26e7aa4554c00081f8a2408954c /test/functional/test_framework
parent3c93623be20d534bb653410db03d38152135e2e6 (diff)
downloadbitcoin-fa4dfd215f62e88d668311701735c332c264fa2a.tar.xz
test: Wait until is_connected in add_p2p_connection
Diffstat (limited to 'test/functional/test_framework')
-rwxr-xr-xtest/functional/test_framework/mininode.py2
-rwxr-xr-xtest/functional/test_framework/test_node.py1
2 files changed, 2 insertions, 1 deletions
diff --git a/test/functional/test_framework/mininode.py b/test/functional/test_framework/mininode.py
index 53d6e474d9..eaf637fbb8 100755
--- a/test/functional/test_framework/mininode.py
+++ b/test/functional/test_framework/mininode.py
@@ -474,7 +474,7 @@ class P2PInterface(P2PConnection):
def test_function():
return "verack" in self.last_message
- self.wait_until(test_function, timeout=timeout, check_connected=False)
+ self.wait_until(test_function, timeout=timeout)
# Message sending helper functions
diff --git a/test/functional/test_framework/test_node.py b/test/functional/test_framework/test_node.py
index 66bb2c89b5..6432918bde 100755
--- a/test/functional/test_framework/test_node.py
+++ b/test/functional/test_framework/test_node.py
@@ -524,6 +524,7 @@ class TestNode():
p2p_conn.peer_connect(**kwargs, net=self.chain, timeout_factor=self.timeout_factor)()
self.p2ps.append(p2p_conn)
+ p2p_conn.wait_until(lambda: p2p_conn.is_connected, check_connected=False)
if wait_for_verack:
# Wait for the node to send us the version and verack
p2p_conn.wait_for_verack()