From 14302a4802e2dbb41f5189de88f99ddd5dda7736 Mon Sep 17 00:00:00 2001 From: Sebastian Falbesoner Date: Mon, 29 Aug 2022 03:19:52 +0200 Subject: [PATCH] test: fix test abort for high timeout values (and `--timeout-factor 0`) --- test/functional/test_framework/authproxy.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/functional/test_framework/authproxy.py b/test/functional/test_framework/authproxy.py index c4ffd1fbf63..1d11e03cb93 100644 --- a/test/functional/test_framework/authproxy.py +++ b/test/functional/test_framework/authproxy.py @@ -78,7 +78,10 @@ class AuthServiceProxy(): passwd = None if self.__url.password is None else self.__url.password.encode('utf8') authpair = user + b':' + passwd self.__auth_header = b'Basic ' + base64.b64encode(authpair) - self.timeout = timeout + # clamp the socket timeout, since larger values can cause an + # "Invalid argument" exception in Python's HTTP(S) client + # library on some operating systems (e.g. OpenBSD, FreeBSD) + self.timeout = min(timeout, 2147483) self._set_conn(connection) def __getattr__(self, name):