mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
test: test_invoices add a stress test
This commit is contained in:
committed by
Rusty Russell
parent
dbae5ae569
commit
94f16f14b7
@@ -559,6 +559,7 @@ def test_waitanyinvoice_reversed(node_factory, executor):
|
|||||||
assert r['label'] == 'inv1'
|
assert r['label'] == 'inv1'
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.xfail(strict=True)
|
||||||
def test_autocleaninvoice(node_factory):
|
def test_autocleaninvoice(node_factory):
|
||||||
l1 = node_factory.get_node()
|
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('inv1')['invoices']) == 0
|
||||||
assert len(l1.rpc.listinvoices('inv2')['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):
|
def test_decode_unknown(node_factory):
|
||||||
l1 = node_factory.get_node()
|
l1 = node_factory.get_node()
|
||||||
|
|||||||
Reference in New Issue
Block a user