From 56f7efad464879a08211158e7a569a3322b579f9 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Wed, 22 May 2019 14:41:35 +0200 Subject: [PATCH] pytest: Stabilize test_reconnect_gossiping We weren't waiting for l2 to register the peer before asking it to ping it. --- tests/test_connection.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_connection.py b/tests/test_connection.py index 539d4bc40..58ffe9c0f 100644 --- a/tests/test_connection.py +++ b/tests/test_connection.py @@ -375,6 +375,8 @@ def test_reconnect_gossiping(node_factory): l2 = node_factory.get_node(disconnect=disconnects, may_reconnect=True) l1.rpc.connect(l2.info['id'], 'localhost', l2.port) + # Make sure l2 knows about l1 + wait_for(lambda: l2.rpc.listpeers(l1.info['id'])['peers'] != []) l2.rpc.ping(l1.info['id'], 1, 65532) wait_for(lambda: l1.rpc.listpeers(l2.info['id'])['peers'] == [])