Browse Source

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>
pull/2938/head
Rusty Russell 6 years ago
committed by neil saitug
parent
commit
ee8edfe6a6
  1. 13
      tests/test_connection.py

13
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): def test_funding_cancel_race(node_factory, bitcoind, executor):
l1 = node_factory.get_node() 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 # Speed up cleanup by not cleaning our test nodes: on my laptop, this goes
# from 214 to 15 seconds # 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) assert num_cancel + num_complete == len(nodes)
# We should have raced at least once! # We should have raced at least once!
assert num_cancel > 0 if not VALGRIND:
assert num_complete > 0 assert num_cancel > 0
assert num_complete > 0
def test_funding_external_wallet(node_factory, bitcoind): def test_funding_external_wallet(node_factory, bitcoind):

Loading…
Cancel
Save