diff options
author | codeShark149 <rajarshi149@gmail.com> | 2020-05-18 09:45:55 +0530 |
---|---|---|
committer | codeShark149 <rajarshi149@gmail.com> | 2020-05-18 21:18:04 +0530 |
commit | 784ae096259955ea7a294114f5c021c9489d2717 (patch) | |
tree | c9551ff0a48056cd6014f0f5f1a09b87c8eda5f6 /test/functional/test_framework/mininode.py | |
parent | dc5333d31f280e09bb1e8cdacfbe842f4ab9e69b (diff) | |
download | bitcoin-784ae096259955ea7a294114f5c021c9489d2717.tar.xz |
test: Add capability to disable RPC timeout in functional tests.
Modifies the existing --factor flag to --timeout-factor to better express intent.
Adds rules to disable timeout if --timeout-factor is set to 0.
Modfies --timeout-factor help doc to inform users about this feature.
Diffstat (limited to 'test/functional/test_framework/mininode.py')
-rwxr-xr-x | test/functional/test_framework/mininode.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/functional/test_framework/mininode.py b/test/functional/test_framework/mininode.py index ba0391625e..bbd7350bf1 100755 --- a/test/functional/test_framework/mininode.py +++ b/test/functional/test_framework/mininode.py @@ -122,9 +122,9 @@ class P2PConnection(asyncio.Protocol): def is_connected(self): return self._transport is not None - def peer_connect(self, dstaddr, dstport, *, net, factor): + def peer_connect(self, dstaddr, dstport, *, net, timeout_factor): assert not self.is_connected - self.factor = factor + self.timeout_factor = timeout_factor self.dstaddr = dstaddr self.dstport = dstport # The initial message to send after the connection was made: @@ -372,7 +372,7 @@ class P2PInterface(P2PConnection): # Connection helper methods def wait_until(self, test_function, timeout): - wait_until(test_function, timeout=timeout, lock=mininode_lock, factor=self.factor) + wait_until(test_function, timeout=timeout, lock=mininode_lock, timeout_factor=self.timeout_factor) def wait_for_disconnect(self, timeout=60): test_function = lambda: not self.is_connected |