mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 09:54:16 +01:00
pytest: Stabilize test_multiple_channels
If we're quick (or the node is slow) we end up reconnecting before our counterparty has realized the state transition, resulting in an unexpected re-establish.
This commit is contained in:
parent
8c94d1a358
commit
3d4c111721
@ -2071,6 +2071,12 @@ def test_multiple_channels(node_factory):
|
||||
|
||||
l1.rpc.close(chan)
|
||||
|
||||
# If we don't wait for l2 to make the transition we can end up
|
||||
# attempting to re-estabilishing the channel
|
||||
l2.daemon.wait_for_log(
|
||||
r'State changed from CLOSINGD_SIGEXCHANGE to CLOSINGD_COMPLETE'
|
||||
)
|
||||
|
||||
channels = only_one(l1.rpc.listpeers()['peers'])['channels']
|
||||
assert len(channels) == 3
|
||||
# Most in state ONCHAIN, last is CLOSINGD_COMPLETE
|
||||
|
Loading…
Reference in New Issue
Block a user