From 63103db3f3c2b44ae95e339029032519437ce425 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 14 Aug 2019 08:17:21 +0930 Subject: [PATCH] pytest: disable some v. slow tests when !DEVELOPER. We've gone over 50 minutes with valgrind, and my measurements show these are the slowest. Signed-off-by: Rusty Russell --- Makefile | 2 +- tests/test_plugin.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 440c9d3da..100236ed5 100644 --- a/Makefile +++ b/Makefile @@ -52,7 +52,7 @@ endif # Timeout shortly before the 600 second travis silence timeout # (method=thread to support xdist) -PYTEST_OPTS := -v --timeout=550 --timeout_method=thread -p no:logging +PYTEST_OPTS := -v --timeout=550 --timeout_method=thread -p no:logging --duration=0 # This is where we add new features as bitcoin adds them. FEATURES := diff --git a/tests/test_plugin.py b/tests/test_plugin.py index 754606854..c655d8027 100644 --- a/tests/test_plugin.py +++ b/tests/test_plugin.py @@ -411,6 +411,7 @@ def test_openchannel_hook(node_factory, bitcoind): l1.rpc.fundchannel(l2.info['id'], 100001) +@unittest.skipIf(not DEVELOPER, "without DEVELOPER=1, gossip v slow") def test_htlc_accepted_hook_fail(node_factory): """Send payments from l1 to l2, but l2 just declines everything. @@ -447,6 +448,7 @@ def test_htlc_accepted_hook_fail(node_factory): assert len(inv) == 1 and inv[0]['status'] == 'unpaid' +@unittest.skipIf(not DEVELOPER, "without DEVELOPER=1, gossip v slow") def test_htlc_accepted_hook_resolve(node_factory): """l3 creates an invoice, l2 knows the preimage and will shortcircuit. """ @@ -482,6 +484,7 @@ def test_htlc_accepted_hook_direct_restart(node_factory, executor): f1.result() +@unittest.skipIf(not DEVELOPER, "without DEVELOPER=1, gossip v slow") def test_htlc_accepted_hook_forward_restart(node_factory, executor): """l2 restarts while it is pondering what to do with an HTLC. """