mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 21:35:11 +01:00
pytest: fix sleep(1) in test_channel_persistence.
It's obviously not enough under load, as Travis demonstrates. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
b1182702ae
commit
e0c21debc2
@ -4148,8 +4148,10 @@ class LightningDTests(BaseLightningDTests):
|
||||
|
||||
# Now make sure this is really functional by sending a payment
|
||||
self.pay(l1, l2, 10000)
|
||||
time.sleep(1)
|
||||
assert l1.rpc.listpeers()['peers'][0]['channels'][0]['msatoshi_to_us'] == 99980000
|
||||
|
||||
# L1 doesn't actually update msatoshi_to_us until it receives
|
||||
# revoke_and_ack from L2, which can take a little bit.
|
||||
wait_for(lambda: l1.rpc.listpeers()['peers'][0]['channels'][0]['msatoshi_to_us'] == 99980000)
|
||||
assert l2.rpc.listpeers()['peers'][0]['channels'][0]['msatoshi_to_us'] == 20000
|
||||
|
||||
# Finally restart l1, and make sure it remembers
|
||||
|
Loading…
Reference in New Issue
Block a user