mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-03 18:57:06 +01:00
test_lightningd: Increase times in expiration waiting test.
Fixes: #916 Makes it less flaky, as, the increased times reduce the relative delay in processing by slower machines.
This commit is contained in:
parent
37670c04e0
commit
dcafce81ad
1 changed files with 7 additions and 7 deletions
|
@ -404,25 +404,25 @@ class LightningDTests(BaseLightningDTests):
|
|||
|
||||
# Test expiration waiting.
|
||||
# The second invoice created expires first.
|
||||
l2.rpc.invoice('any', 'inv1', 'description', 5)
|
||||
l2.rpc.invoice('any', 'inv2', 'description', 2)
|
||||
l2.rpc.invoice('any', 'inv3', 'description', 8)
|
||||
l2.rpc.invoice('any', 'inv1', 'description', 10)
|
||||
l2.rpc.invoice('any', 'inv2', 'description', 4)
|
||||
l2.rpc.invoice('any', 'inv3', 'description', 16)
|
||||
# Check waitinvoice correctly waits
|
||||
w1 = self.executor.submit(l2.rpc.waitinvoice, 'inv1')
|
||||
w2 = self.executor.submit(l2.rpc.waitinvoice, 'inv2')
|
||||
w3 = self.executor.submit(l2.rpc.waitinvoice, 'inv3')
|
||||
time.sleep(1) # total 1
|
||||
time.sleep(2) # total 2
|
||||
assert not w1.done()
|
||||
assert not w2.done()
|
||||
assert not w3.done()
|
||||
time.sleep(2) # total 3
|
||||
time.sleep(4) # total 6
|
||||
assert not w1.done()
|
||||
self.assertRaises(ValueError, w2.result)
|
||||
assert not w3.done()
|
||||
time.sleep(3) # total 6
|
||||
time.sleep(6) # total 12
|
||||
self.assertRaises(ValueError, w1.result)
|
||||
assert not w3.done()
|
||||
time.sleep(4) # total 10
|
||||
time.sleep(8) # total 20
|
||||
self.assertRaises(ValueError, w3.result)
|
||||
|
||||
def test_connect(self):
|
||||
|
|
Loading…
Add table
Reference in a new issue