Skip to content

Commit

Permalink
pytest: fix flake in test_gossip_force_broadcast_channel_msgs
Browse files Browse the repository at this point in the history
We can get more gossip_filter messages now.  And we can also go over max-messages,
so increase that too.

```
        del tally['query_short_channel_ids']
        del tally['query_channel_range']
        del tally['ping']
>       assert tally == {'channel_announce': 1,
                         'channel_update': 3,
                         'node_announce': 1,
                         'gossip_filter': 1}
E       AssertionError: assert {'channel_ann..._announce': 1} == {'channel_ann..._announce': 1}
E         Omitting 2 identical items, use -vv to show
E         Differing items:
E         {'gossip_filter': 2} != {'gossip_filter': 1}
E         {'channel_update': 2} != {'channel_update': 3}
E         Full diff:
E           {
E            'channel_announce': 1,...
E         
E         ...Full output truncated (10 lines hidden), use '-vv' to show

tests/test_gossip.py:2326: AssertionError
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
  • Loading branch information
rustyrussell committed Nov 22, 2024
1 parent a295099 commit 8566370
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/test_gossip.py
Original file line number Diff line number Diff line change
Expand Up @@ -2310,7 +2310,7 @@ def test_gossip_force_broadcast_channel_msgs(node_factory, bitcoind):
'--no-gossip',
'--hex',
'--network={}'.format(TEST_NETWORK),
'--max-messages={}'.format(7),
'--max-messages={}'.format(10),
'--timeout-after={}'.format(120),
'{}@localhost:{}'.format(l1.info['id'], l1.port)],
check=True,
Expand All @@ -2320,10 +2320,11 @@ def test_gossip_force_broadcast_channel_msgs(node_factory, bitcoind):
for l in lines:
tally[types[l[0:4]]] += 1

assert tally['gossip_filter'] >= 1
del tally['query_short_channel_ids']
del tally['query_channel_range']
del tally['ping']
del tally['gossip_filter']
assert tally == {'channel_announce': 1,
'channel_update': 3,
'node_announce': 1,
'gossip_filter': 1}
'node_announce': 1}

0 comments on commit 8566370

Please sign in to comment.