Skip to content

Commit

Permalink
pytest: fix flake in test_funding_fail
Browse files Browse the repository at this point in the history
We may not see a disconnect instantly:

```
>       assert len(l2.rpc.listpeers()['peers']) == 0
E       assert 1 == 0
E         +1
E         -0
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
  • Loading branch information
rustyrussell committed Mar 16, 2022
1 parent 7eb450e commit 065ca1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -999,8 +999,8 @@ def test_funding_fail(node_factory, bitcoind):
l1.rpc.fundchannel(l2.info['id'], int(funds / 10))

# channels disconnect on failure
assert len(l1.rpc.listpeers()['peers']) == 0
assert len(l2.rpc.listpeers()['peers']) == 0
wait_for(lambda: len(l1.rpc.listpeers()['peers']) == 0)
wait_for(lambda: len(l2.rpc.listpeers()['peers']) == 0)

# Restart l2 without ridiculous locktime.
del l2.daemon.opts['watchtime-blocks']
Expand Down

0 comments on commit 065ca1e

Please sign in to comment.