Skip to content

Commit 821e111

Browse files
committed
pytest: fix flake in test_onionmessage_forward_fail
We can fail to connect because l3 connects to l2 at the same time l2 connects to l3: ``` # The plugin in l2 fixes up the connection, so this works! > l1.rpc.fetchinvoice(offer['bolt12']) tests/test_connection.py:4792: ... elif "error" in resp: > raise RpcError(method, payload, resp['error']) E pyln.client.lightning.RpcError: RPC call failed: method: fetchinvoice, payload: {'offer': 'lno1qgsqvgnwgcg35z6ee2h3yczraddm72xrfua9uve2rlrm9deu7xyfzrcgqgqjczs7w3jhxazldahxjmmwd4jhxumpvaj47en0wfmkzunytanxz6tvzcssxhftzxfdlwsnfcgw2sy8t5mxa0ytcdfat2nkdwqvpy9nnsa9mzza'}, error: {'code': 1005, 'message': 'Timeout waiting for response'} ``` From logs: ``` lightningd-2 2025-05-07T21:20:54.367Z DEBUG 035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d-connectd: peer_out WIRE_INIT lightningd-2 2025-05-07T21:20:54.367Z DEBUG 035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d-connectd: Connect IN `` Signed-off-by: Rusty Russell <[email protected]>
1 parent 39ca910 commit 821e111

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/test_connection.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4780,9 +4780,11 @@ def test_onionmessage_forward_fail(node_factory, bitcoind):
47804780
opts=[{},
47814781
{'dev-allow-localhost': None,
47824782
'may_reconnect': True,
4783+
'dev-no-reconnect': None,
47834784
'plugin': os.path.join(os.getcwd(), 'tests/plugins/onionmessage_forward_fail_notification.py'),
47844785
},
47854786
{'dev-allow-localhost': None,
4787+
'dev-no-reconnect': None,
47864788
'may_reconnect': True}])
47874789

47884790
offer = l3.rpc.offer(300, "test_onionmessage_forward_fail")

0 commit comments

Comments
 (0)