mirror of
https://github.com/ElementsProject/lightning.git
synced 2026-08-19 13:17:42 +02:00
pytest: fix flake in test_gossip_store_compact_while_extending and test_gossmap_lost_node
node_factory.line_graph waits until all nodes have seen all channels,
not all node announcements, so we can get this:
```
> assert post_nodes == pre_nodes
...
E Full diff:
E [
E {
E + 'addresses': [],
E + 'alias': 'JUNIORYARD-b2d9563',
E + 'color': '02287b',
E + 'features': '808898880a8a59a1',
E + 'last_timestamp': 1771565748,
E 'nodeid': '02287bfac8b99b35477ebe9334eede1e32b189e24644eb701c079614712331cec0',
E },
E {
E 'addresses': [],
E 'alias': 'SILENTGOPHER-b2d9563',
E 'color': '033845',
E 'features': '808898880a8a59a1',
...
tests/test_gossip.py:1710: AssertionError
```
Since the same pattern occurs in test_gossmap_lost_node, fix that too.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
f318c13bf5
commit
0240882dda
1 changed files with 4 additions and 0 deletions
|
|
@ -1691,6 +1691,8 @@ def test_gossip_store_compact_while_extending(node_factory, bitcoind, executor):
|
|||
wait_for(lambda: sorted([c['fee_per_millionth'] for c in l1.rpc.listchannels(scid12)['channels']]) == [10, 1004])
|
||||
|
||||
pre_channels = l1.rpc.listchannels()
|
||||
# Make sure all node_announcements have been seen.
|
||||
wait_for(lambda: all(['alias' in n for n in l1.rpc.listnodes()['nodes']]))
|
||||
pre_nodes = sorted(l1.rpc.listnodes()['nodes'], key=lambda n: n['nodeid'])
|
||||
|
||||
# Compaction "continues".
|
||||
|
|
@ -2493,6 +2495,8 @@ def test_gossmap_lost_node(node_factory, bitcoind):
|
|||
assert l1.rpc.listchannels(scid23) == {'channels': []}
|
||||
|
||||
pre_channels = l1.rpc.listchannels()
|
||||
# Make sure all node_announcements have been seen.
|
||||
wait_for(lambda: all(['alias' in n for n in l1.rpc.listnodes()['nodes']]))
|
||||
pre_nodes = sorted(l1.rpc.listnodes()['nodes'], key=lambda n: n['nodeid'])
|
||||
l1.restart()
|
||||
post_channels = l1.rpc.listchannels()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue