diff options
| author | MarcoFalke <[email protected]> | 2020-04-13 09:35:39 -0400 |
|---|---|---|
| committer | MarcoFalke <[email protected]> | 2020-04-13 09:35:48 -0400 |
| commit | d9fd7b5a675d94b99a5ee5b636bbc21088ed02fb (patch) | |
| tree | 4ce6fc5a33b5ff729d336c587cb341b17d57b7d2 | |
| parent | Merge #18502: doc: Update docs for getbalance (default minconf should be 0) (diff) | |
| parent | test: Try once more when RPC connection fails on Windows (diff) | |
| download | discoin-d9fd7b5a675d94b99a5ee5b636bbc21088ed02fb.tar.xz discoin-d9fd7b5a675d94b99a5ee5b636bbc21088ed02fb.zip | |
Merge #18596: test: Try once more when RPC connection fails on Windows
fab98992043f47fa7240d7c1217920d0c4f783a2 test: Try once more when RPC connection fails on Windows (MarcoFalke)
faa655731eac751d4eb494268e2c815493ba9382 test: Document why connection is re-constructed on windows (MarcoFalke)
fa9f4f663c36b0824406036445e5cff0a78174e9 test: Remove python 3.4 workaround (MarcoFalke)
fae760f2b24cb26494b65c0a7ac38b92ead345af cirrus: Bump freebsd to 12.1 (MarcoFalke)
Pull request description:
Fixes: #18548
ACKs for top commit:
hebasto:
ACK fab98992043f47fa7240d7c1217920d0c4f783a2, I have reviewed the code and it looks OK, I agree it can be merged.
Tree-SHA512: c4e9ed8d995b63a820ca66984f152ac216c83ba1f318b61b15c6d375c0e936c08f6bc3d38c255dddf3ee8952f848c7ababf684854e07a7c1b1d8504e6b7208ba
| -rw-r--r-- | .cirrus.yml | 4 | ||||
| -rw-r--r-- | test/functional/test_framework/authproxy.py | 19 |
2 files changed, 13 insertions, 10 deletions
diff --git a/.cirrus.yml b/.cirrus.yml index f9c3d844b..4a9bf8452 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,7 +1,7 @@ task: - name: "FreeBsd 12.0 amd64 [GOAL: install] [no depends, only system libs]" + name: "FreeBsd 12.1 amd64 [GOAL: install] [no depends, only system libs]" freebsd_instance: - image: freebsd-12-0-release-amd64 + image_family: freebsd-12-1 # https://cirrus-ci.org/guide/FreeBSD/ cpu: 8 memory: 8G timeout_in: 60m diff --git a/test/functional/test_framework/authproxy.py b/test/functional/test_framework/authproxy.py index 4ba6ac1db..05308931e 100644 --- a/test/functional/test_framework/authproxy.py +++ b/test/functional/test_framework/authproxy.py @@ -101,23 +101,26 @@ class AuthServiceProxy(): if os.name == 'nt': # Windows somehow does not like to re-use connections # TODO: Find out why the connection would disconnect occasionally and make it reusable on Windows + # Avoid "ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine" self._set_conn() try: self.__conn.request(method, path, postdata, headers) return self._get_response() - except http.client.BadStatusLine as e: - if e.line == "''": # if connection was closed, try again + except (BrokenPipeError, ConnectionResetError): + # Python 3.5+ raises BrokenPipeError when the connection was reset + # ConnectionResetError happens on FreeBSD + self.__conn.close() + self.__conn.request(method, path, postdata, headers) + return self._get_response() + except OSError as e: + retry = ( + '[WinError 10053] An established connection was aborted by the software in your host machine' in str(e)) + if retry: self.__conn.close() self.__conn.request(method, path, postdata, headers) return self._get_response() else: raise - except (BrokenPipeError, ConnectionResetError): - # Python 3.5+ raises BrokenPipeError instead of BadStatusLine when the connection was reset - # ConnectionResetError happens on FreeBSD with Python 3.4 - self.__conn.close() - self.__conn.request(method, path, postdata, headers) - return self._get_response() def get_request(self, *args, **argsn): AuthServiceProxy.__id_count += 1 |