mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-23 17:14:22 +01:00
test_lightningd: make test_payment_failed_persistence more reliable.
We don't want the invoice to fail locally, which can happen if we're slow enough. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -2997,7 +2997,7 @@ class LightningDTests(BaseLightningDTests):
|
|||||||
self.fund_channel(l1, l2, 100000)
|
self.fund_channel(l1, l2, 100000)
|
||||||
|
|
||||||
# Expires almost immediately, so it will fail.
|
# Expires almost immediately, so it will fail.
|
||||||
inv1 = l2.rpc.invoice(1000, 'inv1', 'inv1', 1)
|
inv1 = l2.rpc.invoice(1000, 'inv1', 'inv1', 2)
|
||||||
|
|
||||||
# Fire off a pay request, it'll get interrupted by a restart
|
# Fire off a pay request, it'll get interrupted by a restart
|
||||||
fut = self.executor.submit(l1.rpc.pay, inv1['bolt11'])
|
fut = self.executor.submit(l1.rpc.pay, inv1['bolt11'])
|
||||||
@@ -3012,7 +3012,7 @@ class LightningDTests(BaseLightningDTests):
|
|||||||
l1.daemon.cmd_line.remove('--dev-disconnect=dev_disconnect')
|
l1.daemon.cmd_line.remove('--dev-disconnect=dev_disconnect')
|
||||||
|
|
||||||
# Make sure invoice has expired.
|
# Make sure invoice has expired.
|
||||||
time.sleep(2)
|
time.sleep(3)
|
||||||
|
|
||||||
# Should reconnect, and fail the payment
|
# Should reconnect, and fail the payment
|
||||||
l1.daemon.start()
|
l1.daemon.start()
|
||||||
|
|||||||
Reference in New Issue
Block a user