pytest: severely reduce scope of test_funding_cancel_race under valgrind.

Otherwise we get timeouts across the board.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2019-06-14 13:08:02 +09:30
committed by neil saitug
parent 9fdcb1a122
commit ee8edfe6a6

View File

@@ -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):