pyvcloud icon indicating copy to clipboard operation
pyvcloud copied to clipboard

Add a timeout param to _do_request_prim

Open rocknes opened this issue 4 years ago • 0 comments

_do_request_prim in client.py doesn't have a timeout parameter, as a result there is no way to test connectivity to server without waiting for the request to timeout, which can be in minutes. By adding the timeout parameter, the client can control how long they need to wait before receiving a ReadTimeoutError.

Testing done: Wrote a custom script that made a GET /api/cse/system call to vCD with no CSE server running,

  1. without timeout the call took 30+ seconds to fail
  2. With a timeout of 3.05 seconds, the call returned the expected error in ~3 seconds.

This change is Reviewable

rocknes avatar Mar 12 '21 01:03 rocknes