Browse Source

Merge #8839: test: Avoid ConnectionResetErrors during RPC tests

1d28faf test: Avoid ConnectionResetErrors during RPC tests (Wladimir J. van der Laan)
0.14
Wladimir J. van der Laan 8 years ago
parent
commit
0572acd63b
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 5
      qa/rpc-tests/test_framework/authproxy.py

5
qa/rpc-tests/test_framework/authproxy.py

@ -130,8 +130,9 @@ class AuthServiceProxy(object):
return self._get_response() return self._get_response()
else: else:
raise raise
except BrokenPipeError: except (BrokenPipeError,ConnectionResetError):
# Python 3.5+ raises this instead of BadStatusLine when the connection was reset # 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.close()
self.__conn.request(method, path, postdata, headers) self.__conn.request(method, path, postdata, headers)
return self._get_response() return self._get_response()

Loading…
Cancel
Save