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:
Christian Decker 2021-01-20 18:56:14 +01:00 committed by Rusty Russell
parent 8c94d1a358
commit 3d4c111721

View File

@ -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