Skip to content

Commit 296ff33

Browse files
committed
pytest: restore and fix disabled test test_excluded_adjacent_routehint.
1. It was flaky, probably because it didn't wait for the remote update_channel. 2. Rusty applied a fix in 5f664da, not clear if it worked. 3. Christian disabled it altogether in 23ce9a9. Signed-off-by: Rusty Russell <[email protected]>
1 parent 407c2c4 commit 296ff33

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/test_pay.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3469,7 +3469,6 @@ def test_reject_invalid_payload(node_factory):
34693469
l2.daemon.wait_for_log(r'Failing HTLC because of an invalid payload')
34703470

34713471

3472-
@unittest.skip("Test is flaky causing CI to be unusable.")
34733472
def test_excluded_adjacent_routehint(node_factory, bitcoind):
34743473
"""Test case where we try have a routehint which leads to an adjacent
34753474
node, but the result exceeds our maxfee; we crashed trying to find
@@ -3478,10 +3477,15 @@ def test_excluded_adjacent_routehint(node_factory, bitcoind):
34783477
"""
34793478
l1, l2, l3 = node_factory.line_graph(3)
34803479

3480+
# Make sure l2->l3 is usable.
3481+
wait_for(lambda: 'remote' in only_one(l3.rpc.listpeerchannels()['channels'])['updates'])
3482+
34813483
# We'll be forced to use routehint, since we don't know about l3.
34823484
inv = l3.rpc.invoice(10**3, "lbl", "desc", exposeprivatechannels=l2.get_channel_scid(l3))
34833485

3484-
l1.wait_channel_active(l1.get_channel_scid(l2))
3486+
# Make sure l1->l2 is usable.
3487+
wait_for(lambda: 'remote' in only_one(l1.rpc.listpeerchannels()['channels'])['updates'])
3488+
34853489
# This will make it reject the routehint.
34863490
err = r'Fee exceeds our fee budget: 1msat > 0msat, discarding route'
34873491
with pytest.raises(RpcError, match=err):

0 commit comments

Comments
 (0)