From fbf2168902a6af084ca73874446e8ac60ce1d861 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Sun, 3 Feb 2019 10:54:11 +1030 Subject: [PATCH] pytest: don't time out on test_pay_direct !DEVELOPER Travis timed out. Waiting for three fundchannel commands depends on the bitcoind polling interval (30 seconds), and then waiting for gossip propagation requires two propagation intervals (120 seconds). Signed-off-by: Rusty Russell --- tests/test_pay.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/test_pay.py b/tests/test_pay.py index 4bad1387d..1dea06e04 100644 --- a/tests/test_pay.py +++ b/tests/test_pay.py @@ -1356,20 +1356,23 @@ def test_pay_direct(node_factory, bitcoind): # Direct channel l0->l1->l3 l0.rpc.connect(l1.info['id'], 'localhost', l1.port) - l0.fund_channel(l1, 10**7) + # Waiting takes a *long* time if !DEVELOPER. + l0.fund_channel(l1, 10**7, wait_for_active=False) l1.rpc.connect(l3.info['id'], 'localhost', l3.port) - l1.fund_channel(l3, 10**7) + l1.fund_channel(l3, 10**7, wait_for_active=False) # Indirect route l0->l1->l2->l3 l1.rpc.connect(l2.info['id'], 'localhost', l2.port) - l1.fund_channel(l2, 10**7) + l1.fund_channel(l2, 10**7, wait_for_active=False) l2.rpc.connect(l3.info['id'], 'localhost', l3.port) - c3 = l2.fund_channel(l3, 10**7) + c3 = l2.fund_channel(l3, 10**7, wait_for_active=False) # Let channels lock in. bitcoind.generate_block(5) # Make sure l0 knows the l2->l3 channel. - l0.wait_channel_active(c3) + # Without DEVELOPER, channel lockin can take 30 seconds to detect, + # and gossip 2 minutes to propagate + wait_for(lambda: l0.is_channel_active(c3), timeout=180) # Find out how much msatoshi l1 owns on l1->l2 channel. l1l2msatreference = only_one(l1.rpc.getpeer(l2.info['id'])['channels'])['msatoshi_to_us']