Browse Source

[qa] mininode: Only allow named args in wait_until

Github-Pull: #8857
Rebased-From: fa666094cf
0.13
MarcoFalke 8 years ago
parent
commit
1f60d45504
  1. 2
      qa/rpc-tests/maxuploadtarget.py
  2. 2
      qa/rpc-tests/p2p-mempool.py
  3. 2
      qa/rpc-tests/test_framework/mininode.py

2
qa/rpc-tests/maxuploadtarget.py

@ -75,7 +75,7 @@ class TestNode(NodeConnCB):
def received_pong(): def received_pong():
return (self.last_pong.nonce == self.ping_counter) return (self.last_pong.nonce == self.ping_counter)
self.connection.send_message(msg_ping(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 self.ping_counter += 1
return success return success

2
qa/rpc-tests/p2p-mempool.py

@ -63,7 +63,7 @@ class TestNode(NodeConnCB):
def received_pong(): def received_pong():
return (self.last_pong.nonce == self.ping_counter) return (self.last_pong.nonce == self.ping_counter)
self.connection.send_message(msg_ping(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 self.ping_counter += 1
return success return success

2
qa/rpc-tests/test_framework/mininode.py

@ -1320,7 +1320,7 @@ class msg_reject(object):
% (self.message, self.code, self.reason, self.data) % (self.message, self.code, self.reason, self.data)
# Helper function # Helper function
def wait_until(predicate, attempts=float('inf'), timeout=float('inf')): def wait_until(predicate, *, attempts=float('inf'), timeout=float('inf')):
attempt = 0 attempt = 0
elapsed = 0 elapsed = 0

Loading…
Cancel
Save