mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-15 11:59:16 +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:
parent
5a1c2447cb
commit
0db01c882f
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue