Skip to content

Commit

Permalink
[qa] mininode: Only allow named args in wait_until
Browse files Browse the repository at this point in the history
Github-Pull: #8857
Rebased-From: fa666094cf5b9ac4a7c1732a7ffa001afffcd938
  • Loading branch information
MarcoFalke committed Oct 3, 2016
1 parent 624a007 commit 1f60d45
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion qa/rpc-tests/maxuploadtarget.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def sync_with_ping(self, timeout=30):
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

Expand Down
2 changes: 1 addition & 1 deletion qa/rpc-tests/p2p-mempool.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def sync_with_ping(self, timeout=30):
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

Expand Down
2 changes: 1 addition & 1 deletion qa/rpc-tests/test_framework/mininode.py
Original file line number Diff line number Diff line change
Expand Up @@ -1320,7 +1320,7 @@ def __repr__(self):
% (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

Expand Down

0 comments on commit 1f60d45

Please sign in to comment.