mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-02 20:54:23 +01:00
testing: fix flake in test_ping_timeout
[ Folded 2 fixups --RR ]
This commit is contained in:
committed by
Rusty Russell
parent
c286eb053f
commit
175e0b54b3
@@ -3702,6 +3702,7 @@ def test_ping_timeout(node_factory):
|
||||
'disconnect': l1_disconnects},
|
||||
{}])
|
||||
# Takes 15-45 seconds, then another to try second ping
|
||||
l1.daemon.wait_for_log('Last ping unreturned: hanging up',
|
||||
timeout=45 + 45 + 5)
|
||||
wait_for(lambda: l1.rpc.getpeer(l2.info['id'])['connected'] is False)
|
||||
# Because of ping timer randomness we don't know which side hangs up first
|
||||
wait_for(lambda: l1.rpc.getpeer(l2.info['id'])['connected'] is False, timeout=45 + 45 + 5)
|
||||
wait_for(lambda: (l1.daemon.is_in_log('Last ping unreturned: hanging up')
|
||||
or l2.daemon.is_in_log('Last ping unreturned: hanging up')))
|
||||
|
||||
Reference in New Issue
Block a user