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_offer_paths
Gossipd can mess this test up by spontaneously opening connections! ``` # This will make us connect straight to l3 to use blinded path from there. l5.rpc.disconnect(l4.info['id']) l5.rpc.fetchinvoice(offer=offer['bolt12']) > assert l5.daemon.is_in_log('connecting') E AssertionError: assert None E + where None = <bound method TailableProc.is_in_log of <pyln.testing.utils.LightningD object at 0x7fc01cf38dc0>>('connecting') E + where <bound method TailableProc.is_in_log of <pyln.testing.utils.LightningD object at 0x7fc01cf38dc0>> = <pyln.testing.utils.LightningD object at 0x7fc01cf38dc0>.is_in_log E + where <pyln.testing.utils.LightningD object at 0x7fc01cf38dc0> = <fixtures.LightningNode object at 0x7fc01cf1e200>.daemon tests/test_pay.py:5733: AssertionError ``` You can see in the logs: ``` lightningd-5 2024-11-22T06:10:16.350Z DEBUG plugin-offers: Found path to 035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d: 032cf15d1ad9c4a08d26eab1918f732d8ef8fdc6abb9640bf3db174372c491304e(us) lightningd-5 2024-11-22T06:10:16.352Z DEBUG plugin-offers: -> 035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d ``` How did it find a path to l3? ``` lightningd-5 2024-11-22T06:10:10.609Z DEBUG gossipd: seeker: need more peers for gossip (have 1) lightningd-5 2024-11-22T06:10:10.611Z DEBUG lightningd: attempting connection to 035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d for additional gossip ``` If we see more flakes like this, we might want to set autoconnect-seeker-peers to 0 by default in pyln-testing. Signed-off-by: Rusty Russell <[email protected]>
- Loading branch information