Skip to content

Commit

Permalink
pytest: fix flake in test_gossip_pruning.
Browse files Browse the repository at this point in the history
If the first one doesn't use the entire timeout, the second might need longer
(I used TIMEOUT=10 normally):

```
FAILED tests/test_gossip.py::test_gossip_pruning - TimeoutError: Unable to find "[re.compile('Pruning channel 103x1x0 from network view')]" in logs.
```

Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
rustyrussell committed Nov 22, 2024
1 parent 90ab932 commit dba9746
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_gossip.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ def test_gossip_pruning(node_factory, bitcoind):
# We check every 120/4 seconds, and takes 120 seconds since last update.
l1.daemon.wait_for_log("Pruning channel {} from network view".format(scid2),
timeout=150)
l3.daemon.wait_for_log("Pruning channel {} from network view".format(scid1))
l3.daemon.wait_for_log("Pruning channel {} from network view".format(scid1),
timeout=150)

assert scid2 not in [c['short_channel_id'] for c in l1.rpc.listchannels()['channels']]
assert scid1 not in [c['short_channel_id'] for c in l3.rpc.listchannels()['channels']]
Expand Down

0 comments on commit dba9746

Please sign in to comment.