Rusty Russell
d2e7831d87
pytest: fix flake in test_upgrade_statickey_onchaind
We need to make sure l1 has closed previous channel:
```
wait_for(lambda: only_one(l1.rpc.listpeerchannels()['channels'])['state'] == 'CHANNELD_NORMAL')
tests/test_connection.py:3866:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
contrib/pyln-testing/pyln/testing/utils.py:88: in wait_for
while not success():
tests/test_connection.py:3866: in <lambda>
wait_for(lambda: only_one(l1.rpc.listpeerchannels()['channels'])['state'] == 'CHANNELD_NORMAL')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
arr = [{'alias': {'local': '7000028x5013088x54781', 'remote': '3360520x6431919x56666'}, 'channel_id': 'fb198b27b1be882937eea...: ['static_remotekey/even']}, 'close_to': '5120888ab14b6e1655d1d00039b836d70b66e3351543ab6cd2f94166255f3d5e6cb5', ...}]
def only_one(arr):
"""Many JSON RPC calls return an array; often we only expect a single entry
"""
> assert len(arr) == 1
E AssertionError
```
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-01-31 13:39:23 +10:30
..
2024-01-23 20:21:48 +10:30
2024-01-26 10:30:22 +10:30
2023-09-21 20:08:24 +09:30
2023-09-21 20:08:24 +09:30
2024-01-29 19:13:12 +01:00
2024-01-26 10:30:22 +10:30
2023-11-21 08:23:39 +01:00
2024-01-31 09:15:46 +10:30
2024-01-31 13:39:23 +10:30
2024-01-31 09:15:46 +10:30
2024-01-31 09:15:46 +10:30
2024-01-26 10:30:22 +10:30
2024-01-31 09:15:46 +10:30
2024-01-31 09:15:46 +10:30
2024-01-29 10:05:03 +10:30
2024-01-31 09:15:46 +10:30
2024-01-29 10:48:24 +10:30
2023-10-17 14:58:40 +10:30
2024-01-31 09:15:46 +10:30
2023-12-15 09:42:45 +10:30
2024-01-31 09:15:46 +10:30
2023-11-01 14:11:28 +10:30
2024-01-29 13:40:34 +10:30