From 94f16f14b7b47e83e13fc76b9048edad7b284a76 Mon Sep 17 00:00:00 2001 From: Simon Vrouwe Date: Wed, 13 Jul 2022 14:56:08 +0300 Subject: [PATCH] test: test_invoices add a stress test --- tests/test_invoices.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/test_invoices.py b/tests/test_invoices.py index dfc3f5949..b2cb94837 100644 --- a/tests/test_invoices.py +++ b/tests/test_invoices.py @@ -559,6 +559,7 @@ def test_waitanyinvoice_reversed(node_factory, executor): assert r['label'] == 'inv1' +@pytest.mark.xfail(strict=True) def test_autocleaninvoice(node_factory): l1 = node_factory.get_node() @@ -599,6 +600,13 @@ def test_autocleaninvoice(node_factory): assert len(l1.rpc.listinvoices('inv1')['invoices']) == 0 assert len(l1.rpc.listinvoices('inv2')['invoices']) == 0 + # stress test + l1.rpc.autocleaninvoice(cycle_seconds=0) + l1.rpc.autocleaninvoice(cycle_seconds=1) + l1.rpc.autocleaninvoice(cycle_seconds=0) + time.sleep(1) + l1.rpc.autocleaninvoice(cycle_seconds=1, expired_by=1) + def test_decode_unknown(node_factory): l1 = node_factory.get_node()