mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 22:45:27 +01:00
pytest: make test_autocleaninvoice more reliable.
We're about to slow down the invoice rpc (esp. under valgrind), which breaks the delicate timing of the autocleaninvoice test. Change that so the autocleaner (and timestamp) starts after the invoices are added. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
96f05549b2
commit
704f8b5b0e
1 changed files with 2 additions and 3 deletions
|
@ -282,11 +282,10 @@ def test_waitanyinvoice_reversed(node_factory, executor):
|
|||
def test_autocleaninvoice(node_factory):
|
||||
l1 = node_factory.get_node()
|
||||
|
||||
start_time = time.time()
|
||||
l1.rpc.autocleaninvoice(cycle_seconds=8, expired_by=2)
|
||||
|
||||
l1.rpc.invoice(msatoshi=12300, label='inv1', description='description1', expiry=4)
|
||||
l1.rpc.invoice(msatoshi=12300, label='inv2', description='description2', expiry=12)
|
||||
l1.rpc.autocleaninvoice(cycle_seconds=8, expired_by=2)
|
||||
start_time = time.time()
|
||||
|
||||
# time 0
|
||||
# Both should still be there.
|
||||
|
|
Loading…
Add table
Reference in a new issue