You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by GitBox <gi...@apache.org> on 2022/05/25 15:43:50 UTC

[GitHub] [cloudstack-go] tetra12 opened a new issue, #36: bug: async client don't support timeout

tetra12 opened a new issue, #36:
URL: https://github.com/apache/cloudstack-go/issues/36

   I'm trying to set an `async timeout of 1 sec` with the following code:
   
   ```go
   func MakeClient() *cloudstack.CloudStackClient {
   
   	apiURL := os.Getenv("NWS_API_URL")
   	apiKey := os.Getenv("NWS_API_KEY")
   	secretKey := os.Getenv("NWS_SECRET_KEY")
   
          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:
   ```bash
   === 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 :eyes: 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 :roll_eyes: 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@cloudstack.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] bug: async client don't support timeout [cloudstack-go]

Posted by "rohityadavcloud (via GitHub)" <gi...@apache.org>.
rohityadavcloud closed issue #36: bug: async client don't  support timeout
URL: https://github.com/apache/cloudstack-go/issues/36


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] bug: async client don't support timeout [cloudstack-go]

Posted by "rohityadavcloud (via GitHub)" <gi...@apache.org>.
rohityadavcloud commented on issue #36:
URL: https://github.com/apache/cloudstack-go/issues/36#issuecomment-1935385888

   Closing this on @tetra12 's remarks at https://github.com/apache/cloudstack-go/pull/37#issuecomment-1779378444
   `This refactor is NOT required, since current API implements both async and timeout`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org