pytest: fix flake in test_closing_disconnected_notify

We might be disconnected, but the subd isn't dead yet:

```
>       assert out[0] == '# peer is offline, will negotiate once they reconnect (5 seconds before unilateral close).'
E       AssertionError: assert '# Timed out, forcing close.' == ('# peer is offline, will negotiate once they reconnect (5 seconds before '\n 'unilateral close).')
E         - # peer is offline, will negotiate once they reconnect (5 seconds before unilateral close).
E         + # Timed out, forcing close.

tests/test_closing.py:164: AssertionError
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2023-02-06 15:06:29 +10:30
parent bcab3f7e83
commit d06c1871a9

View File

@@ -152,7 +152,8 @@ def test_closing_disconnected_notify(node_factory, bitcoind, executor):
l1.pay(l2, 200000000)
l2.stop()
wait_for(lambda: not only_one(l1.rpc.listpeers(l2.info['id'])['peers'])['connected'])
# Wait until channeld is definitely gone.
wait_for(lambda: 'owner' not in only_one(l1.rpc.listpeerchannels()['channels']))
out = subprocess.check_output(['cli/lightning-cli',
'--network={}'.format(TEST_NETWORK),