From 1147e656022b440f129e57ca7ec1bae3af3ca4a8 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 29 May 2019 06:41:30 +0930 Subject: [PATCH] pytest: make test_gossip_notices_close more reliable. It's possible that it hasn't got the node_announcement messages; it will still list the nodes, however (the channel_announcement tells it the nodes exist). Check for the alias field instead. Signed-off-by: Rusty Russell --- tests/test_gossip.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_gossip.py b/tests/test_gossip.py index acab91776..803e6b0e5 100644 --- a/tests/test_gossip.py +++ b/tests/test_gossip.py @@ -944,9 +944,9 @@ def test_gossip_notices_close(node_factory, bitcoind): bitcoind.generate_block(5) - # Make sure l1 learns about channel. + # Make sure l1 learns about channel and nodes. wait_for(lambda: len(l1.rpc.listchannels()['channels']) == 2) - wait_for(lambda: len(l1.rpc.listnodes()['nodes']) == 2) + wait_for(lambda: ['alias' in n for n in l1.rpc.listnodes()['nodes']] == [True, True]) l1.rpc.disconnect(l2.info['id']) # Grab channel_announcement from io logs (ends in ')