Skip to content

Commit 6a9fd02

Browse files
committed
pytest: fix flake in test_blindedpath_privchan.
We reconnect from l3->l2, but l2 is also trying to reconnect and we can race: ``` # Now try when l3 uses scid for entry point of blinded path. l3.stop() l3.daemon.opts['dev-invoice-bpath-scid'] = None l3.start() > l3.rpc.connect(l2.info['id'], 'localhost', l2.port) tests/test_pay.py:5667: ... > raise RpcError(method, payload, resp['error']) E pyln.client.lightning.RpcError: RPC call failed: method: connect, payload: {'id': '022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59', 'host': 'localhost', 'port': 33557}, error: {'code': 402, 'message': 'disconnected during connection'} ``` Signed-off-by: Rusty Russell <[email protected]>
1 parent edb3865 commit 6a9fd02

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_pay.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5664,7 +5664,7 @@ def test_blindedpath_privchan(node_factory, bitcoind):
56645664
l3.stop()
56655665
l3.daemon.opts['dev-invoice-bpath-scid'] = None
56665666
l3.start()
5667-
l3.rpc.connect(l2.info['id'], 'localhost', l2.port)
5667+
wait_for(lambda: [p['connected'] for p in l3.rpc.listpeers(l2.info['id'])['peers']] == [True])
56685668

56695669
chan = only_one(l1.rpc.listchannels(source=l2.info['id'])['channels'])
56705670

0 commit comments

Comments
 (0)