Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pytest: fix flake in test_pay_disconnect
If channeld hasn't exited yet, it's possible we'll send the message (we would fail later, in waitsendpay, but just not immediately). So wait for that explicitly. ``` 2022-09-22T22:49:59.6737296Z with pytest.raises(RpcError, match=r'failed: WIRE_TEMPORARY_CHANNEL_FAILURE \(First peer not ready\)'): 2022-09-22T22:49:59.6737566Z > l1.rpc.sendpay(route, rhash, payment_secret=inv['payment_secret']) 2022-09-22T22:49:59.6737865Z E Failed: DID NOT RAISE <class 'pyln.client.lightning.RpcError'> 2022-09-22T22:49:59.6737873Z ``` And from the listpeers output, ou can see "connected" false, but owner channeld: ``` 2022-09-22T22:49:59.7493163Z DEBUG:root:{ 2022-09-22T22:49:59.7493320Z "id": "-c:listpeers#26", 2022-09-22T22:49:59.7493397Z "result": { 2022-09-22T22:49:59.7493477Z "peers": [ 2022-09-22T22:49:59.7493548Z { 2022-09-22T22:49:59.7493709Z "id": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", 2022-09-22T22:49:59.7493801Z "connected": false, 2022-09-22T22:49:59.7493884Z "channels": [ 2022-09-22T22:49:59.7493955Z { 2022-09-22T22:49:59.7494058Z "state": "CHANNELD_NORMAL", 2022-09-22T22:49:59.7494250Z "scratch_txid": "4b95a3b1b5e1a970401a169a3697f3a9bfbfbcb59d3d21434aa1f3fb2980db8d", 2022-09-22T22:49:59.7494365Z "last_tx_fee_msat": "7965000msat", 2022-09-22T22:49:59.7494437Z "feerate": { 2022-09-22T22:49:59.7494529Z "perkw": 11000, 2022-09-22T22:49:59.7494618Z "perkb": 44000 2022-09-22T22:49:59.7494690Z }, 2022-09-22T22:49:59.7494785Z "owner": "channeld", 2022-09-22T22:49:59.7494894Z "short_channel_id": "103x1x0", ``` Signed-off-by: Rusty Russell <[email protected]>
- Loading branch information