From ee8edfe6a61f30089d3ba86d8e7871870dec0292 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Fri, 14 Jun 2019 13:08:02 +0930 Subject: [PATCH] pytest: severely reduce scope of test_funding_cancel_race under valgrind. Otherwise we get timeouts across the board. Signed-off-by: Rusty Russell --- tests/test_connection.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tests/test_connection.py b/tests/test_connection.py index 7375a4f3e..56155e673 100644 --- a/tests/test_connection.py +++ b/tests/test_connection.py @@ -855,7 +855,13 @@ def test_funding_external_wallet_corners(node_factory, bitcoind): def test_funding_cancel_race(node_factory, bitcoind, executor): l1 = node_factory.get_node() - nodes = node_factory.get_nodes(100) + + if VALGRIND: + num = 5 + else: + num = 100 + + nodes = node_factory.get_nodes(num) # Speed up cleanup by not cleaning our test nodes: on my laptop, this goes # from 214 to 15 seconds @@ -904,8 +910,9 @@ def test_funding_cancel_race(node_factory, bitcoind, executor): assert num_cancel + num_complete == len(nodes) # We should have raced at least once! - assert num_cancel > 0 - assert num_complete > 0 + if not VALGRIND: + assert num_cancel > 0 + assert num_complete > 0 def test_funding_external_wallet(node_factory, bitcoind):