mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
Merge #8857: [qa] mininode: Only allow named args in wait_until
fa66609
[qa] mininode: Only allow named args in wait_until (MarcoFalke)
This commit is contained in:
parent
ba02e9d188
commit
16532f8ee0
@ -75,7 +75,7 @@ class TestNode(NodeConnCB):
|
||||
def received_pong():
|
||||
return (self.last_pong.nonce == self.ping_counter)
|
||||
self.connection.send_message(msg_ping(nonce=self.ping_counter))
|
||||
success = wait_until(received_pong, timeout)
|
||||
success = wait_until(received_pong, timeout=timeout)
|
||||
self.ping_counter += 1
|
||||
return success
|
||||
|
||||
|
@ -63,7 +63,7 @@ class TestNode(NodeConnCB):
|
||||
def received_pong():
|
||||
return (self.last_pong.nonce == self.ping_counter)
|
||||
self.connection.send_message(msg_ping(nonce=self.ping_counter))
|
||||
success = wait_until(received_pong, timeout)
|
||||
success = wait_until(received_pong, timeout=timeout)
|
||||
self.ping_counter += 1
|
||||
return success
|
||||
|
||||
|
@ -1041,7 +1041,7 @@ class msg_reject(object):
|
||||
% (self.message, self.code, self.reason, self.data)
|
||||
|
||||
# Helper function
|
||||
def wait_until(predicate, attempts=float('inf'), timeout=float('inf')):
|
||||
def wait_until(predicate, *, attempts=float('inf'), timeout=float('inf')):
|
||||
attempt = 0
|
||||
elapsed = 0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user