bug: async client don't support timeout
tetra12 opened this issue · 1 comments
tetra12 commented
I'm trying to set an async timeout of 1 sec
with the following code:
func MakeClient() *cloudstack.CloudStackClient {
acsTimeout := 1 // sec
cs := cloudstack.NewAsyncClient(apiURL, apiKey, secretKey, false)
cs.AsyncTimeout(acsTimeout)
return cs
}
However, when I run a test on the real infra, I'm getting this:
=== RUN TestVPC_create
INFO[2022-05-25T18:36:01+03:00] Success
--- PASS: TestVPC_create (3.38s)
So this test took 3.38 sec
without being timed out by the ACS client. I also look 👀 into the impl and found out it to be rather poor.
Question: could anyone confirm the valid functionality of async
client? Otherwise, I'm taking a lead to update the async part to match the expected functionality 🙄
rohityadavcloud commented
Closing this on @tetra12 's remarks at #37 (comment)
This refactor is NOT required, since current API implements both async and timeout