pytest: fix flake in test_sendcustommsg

We assume that because we've told l3 to shut down, l2 already sees it
as disconnected.  But CI is ...slow... today!

```
        # `l3` is disconnected and we can't send messages to it
>       assert(not l2.rpc.listpeers(l3.info['id'])['peers'][0]['connected'])
E       assert not True

tests/test_misc.py:2218: AssertionError
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2022-09-21 14:08:08 +09:30 committed by Christian Decker
parent 5a1c2447cb
commit 0db01c882f
1 changed files with 1 additions and 1 deletions

View File

@ -2215,7 +2215,7 @@ def test_sendcustommsg(node_factory):
l1.rpc.sendcustommsg(node_id, msg)
# `l3` is disconnected and we can't send messages to it
assert(not l2.rpc.listpeers(l3.info['id'])['peers'][0]['connected'])
wait_for(lambda: l2.rpc.listpeers(l3.info['id'])['peers'][0]['connected'] is False)
with pytest.raises(RpcError, match=r'Peer is not connected'):
l2.rpc.sendcustommsg(l3.info['id'], msg)