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/util.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/util.py')
-rw-r--r-- | test/functional/test_framework/util.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/test_framework/util.py b/test/functional/test_framework/util.py index 7466a3cab3..6dfea7efd2 100644 --- a/test/functional/test_framework/util.py +++ b/test/functional/test_framework/util.py @@ -208,10 +208,10 @@ def str_to_b64str(string): def satoshi_round(amount): return Decimal(amount).quantize(Decimal('0.00000001'), rounding=ROUND_DOWN) -def wait_until(predicate, *, attempts=float('inf'), timeout=float('inf'), lock=None, factor=1.0): +def wait_until(predicate, *, attempts=float('inf'), timeout=float('inf'), lock=None, timeout_factor=1.0): if attempts == float('inf') and timeout == float('inf'): timeout = 60 - timeout = timeout * factor + timeout = timeout * timeout_factor attempt = 0 time_end = time.time() + timeout |