aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework/test_framework.py
diff options
context:
space:
mode:
authorMarcoFalke <6399679+MarcoFalke@users.noreply.github.com>2023-03-07 17:06:28 +0100
committerMarcoFalke <6399679+MarcoFalke@users.noreply.github.com>2023-03-07 17:04:27 +0100
commitfa27cf4cc7c24aa00a66dffabab849d4b3cb1c41 (patch)
treeb9a6c51baf34a11b89f7a5b24986bfd717a1a48c /test/functional/test_framework/test_framework.py
parentd4ebdceaef130e4b68e5d5db67eecfefd24b4239 (diff)
downloadbitcoin-fa27cf4cc7c24aa00a66dffabab849d4b3cb1c41.tar.xz
test: Default timeout factor to 4 under --valgrind
Diffstat (limited to 'test/functional/test_framework/test_framework.py')
-rwxr-xr-xtest/functional/test_framework/test_framework.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py
index 9620951a16..66a23b443c 100755
--- a/test/functional/test_framework/test_framework.py
+++ b/test/functional/test_framework/test_framework.py
@@ -120,8 +120,6 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
self.disable_autoconnect = True
self.set_test_params()
assert self.wallet_names is None or len(self.wallet_names) <= self.num_nodes
- if self.options.timeout_factor == 0 :
- self.options.timeout_factor = 99999
self.rpc_timeout = int(self.rpc_timeout * self.options.timeout_factor) # optionally, increase timeout by a factor
def main(self):
@@ -193,7 +191,7 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
help="run nodes under the valgrind memory error detector: expect at least a ~10x slowdown. valgrind 3.14 or later required. Forces --nosandbox.")
parser.add_argument("--randomseed", type=int,
help="set a random seed for deterministically reproducing a previous test run")
- parser.add_argument('--timeout-factor', dest="timeout_factor", type=float, default=1.0, help='adjust test timeouts by a factor. Setting it to 0 disables all timeouts')
+ parser.add_argument("--timeout-factor", dest="timeout_factor", type=float, help="adjust test timeouts by a factor. Setting it to 0 disables all timeouts")
self.add_options(parser)
# Running TestShell in a Jupyter notebook causes an additional -f argument
@@ -201,6 +199,9 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
# source: https://stackoverflow.com/questions/48796169/how-to-fix-ipykernel-launcher-py-error-unrecognized-arguments-in-jupyter/56349168#56349168
parser.add_argument("-f", "--fff", help="a dummy argument to fool ipython", default="1")
self.options = parser.parse_args()
+ if self.options.timeout_factor == 0:
+ self.options.timeout_factor = 99999
+ self.options.timeout_factor = self.options.timeout_factor or (4 if self.options.valgrind else 1)
self.options.previous_releases_path = previous_releases_path
config = configparser.ConfigParser()