Skip to content

Commit

Permalink
pytest: Stabilize test_reconnect_gossiping
Browse files Browse the repository at this point in the history
We weren't waiting for l2 to register the peer before asking it to ping it.
  • Loading branch information
cdecker committed May 26, 2019
1 parent a0fc915 commit 56f7efa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'] == [])
Expand Down

0 comments on commit 56f7efa

Please sign in to comment.