mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-21 08:04:26 +01:00
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:
committed by
Christian Decker
parent
5a1c2447cb
commit
0db01c882f
@@ -2215,7 +2215,7 @@ def test_sendcustommsg(node_factory):
|
|||||||
l1.rpc.sendcustommsg(node_id, msg)
|
l1.rpc.sendcustommsg(node_id, msg)
|
||||||
|
|
||||||
# `l3` is disconnected and we can't send messages to it
|
# `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'):
|
with pytest.raises(RpcError, match=r'Peer is not connected'):
|
||||||
l2.rpc.sendcustommsg(l3.info['id'], msg)
|
l2.rpc.sendcustommsg(l3.info['id'], msg)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user