Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

Add a timeout param to _do_request_prim #756

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rocknes
Copy link
Contributor

@rocknes rocknes commented Mar 12, 2021

_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

Copy link
Contributor

@Anirudh9794 Anirudh9794 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @shashim22)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants