Skip to content

Commit 7ed2126

Browse files
committed
pytest: fix flake in test_fetchinvoice_disconnected_reply.
Fails when l3 doesn't know address for l1, to connect to it: ``` 2024-11-16T04:45:42.2243366Z lightningd-3 2024-11-16T04:35:10.582Z DEBUG 022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59-connectd: peer_in WIRE_ONION_MESSAGE 2024-11-16T04:45:42.2244342Z lightningd-3 2024-11-16T04:35:10.582Z DEBUG lightningd: Got onionmsg reply_path 2024-11-16T04:45:42.2245398Z lightningd-3 2024-11-16T04:35:10.582Z DEBUG plugin-offers: Note: disallowing deprecated onion_message_recv.blinding 2024-11-16T04:45:42.2246408Z lightningd-3 2024-11-16T04:35:10.586Z UNUSUAL plugin-offers: No incoming channel for 5msat, so no blinded path 2024-11-16T04:45:42.2247289Z lightningd-3 2024-11-16T04:35:10.605Z DEBUG hsmd: Client: Received message 25 from client 2024-11-16T04:45:42.2248372Z lightningd-3 2024-11-16T04:35:10.606Z DEBUG plugin-offers: connecting directly to 0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518 2024-11-16T04:45:42.2249451Z lightningd-3 2024-11-16T04:35:10.606Z DEBUG gossipd: REPLY WIRE_GOSSIPD_GET_ADDRS_REPLY with 0 fds 2024-11-16T04:45:42.2250743Z lightningd-3 2024-11-16T04:35:10.607Z DEBUG 0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518-connectd: Failed connected out: Unable to connect, no address known for peer ``` This is because the test which was supposed to wait for addresses is wrong: it passes when l3 knows nothing! (`all([])` == `True`) Signed-off-by: Rusty Russell <[email protected]>
1 parent 9af01b0 commit 7ed2126

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_pay.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4746,7 +4746,7 @@ def test_fetchinvoice_disconnected_reply(node_factory, bitcoind):
47464746
# Make l1, l2 public (so l3 can auto connect).
47474747
node_factory.join_nodes([l1, l2], wait_for_announce=True)
47484748
# Make sure l3 knows about l1's public address
4749-
wait_for(lambda: all(['addresses' in n for n in l3.rpc.listnodes()['nodes']]))
4749+
wait_for(lambda: ['addresses' in n for n in l3.rpc.listnodes()['nodes']] == [True] * 2)
47504750

47514751
offer = l3.rpc.offer(amount='5msat', description='test_fetchinvoice_disconnected_reply')
47524752

0 commit comments

Comments
 (0)