You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add test for fetcher/requests_fetcher covering the case of urllib3.ReadTimeoutError/tuf.SlowRetrievalError.
This can be achieved by using slow_retrieval_server.py instead of simple_servier.py for serving the test file.
One gotcha is that by default RequestFetcher.socket_timeout is set to 4s and the same value is used both for socket connect and read timeout. It means that the value would have to be modified to speed up the test case.
For example:
# Read timeoutdeftest_read_timeout(self):
self.fetcher.socket_timeout= (4, 0.1) # connect timeout: 4s, read timeout: 0.1s# Launch a new "slow retrieval" server sending one byte each 40sslow_server_process_handler=utils.TestServerProcess(log=logger, server='slow_retrieval_server.py')
...
The text was updated successfully, but these errors were encountered:
Description of issue or feature request:
Add test for fetcher/requests_fetcher covering the case of urllib3.ReadTimeoutError/tuf.SlowRetrievalError.
This can be achieved by using
slow_retrieval_server.py
instead ofsimple_servier.py
for serving the test file.One gotcha is that by default
RequestFetcher.socket_timeout
is set to 4s and the same value is used both for socket connect and read timeout. It means that the value would have to be modified to speed up the test case.For example:
The text was updated successfully, but these errors were encountered: