Closed jorge-ibm closed 4 years ago
@mkistler @padamstx - I've pushed an amended commit that adds the missing calculation of the refreshTime everytime we get a new token. I've also moved back the property refreshTime
to be a part of the iamTokenData
and cp4dTokenData
structs, respectfully.
As far as the concerns over using locks for network calls, it looks like by default we set a client side timeout of 30 seconds. I've added two new tests to simulate a client side timeout, TestIamGetTokenTimeoutError
and a test to simulate a 504 from the server, TestIamGetTokenServerError
.
Note: the client timeout doesn't cover the time spent sending a request rather the time spent reading/receiving.
:tada: This PR is included in version 3.3.1 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
This PR updates the design for token refresh by decoupling the refresh logic from active requests to be consistent with the other cores.
ref: https://github.ibm.com/arf/planning-sdk-squad/issues/1550