Skip to content

Conversation

hiranya911
Copy link
Contributor

Fixed a flaky auth integration test by retrying the GetUser() API call a few times with a small delay.

@hiranya911 hiranya911 added the release:publish Publish a release candidate label Jun 16, 2020
@hiranya911 hiranya911 requested a review from rsgowman June 16, 2020 18:04
var getUsersResult *auth.UserRecord
for i := 0; i < 3; i++ {
var err error
getUsersResult, err = client.GetUser(context.Background(), userRecord.UID)
Copy link
Member

Choose a reason for hiding this comment

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

nit: Could you use := here and eliminate the var err statement on the previous line?

Optional.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That also declares a new getUsersResult variable in the nested scope. We want to reuse the one defined outside the for loop.

@hiranya911 hiranya911 merged commit e921fe9 into dev Jun 16, 2020
@hiranya911 hiranya911 deleted the hkj-refreshtime-fix branch June 16, 2020 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:publish Publish a release candidate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants