Repository navigation
test(auth): verify recovery after exhausted rate-limit retries - #1
Open
yifei-ambr wants to merge 1 commit into
Conversation
6 of 9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a regression for a login recovering on the next token lookup after its previous lookup exhausted both HTTP 429 retries. This contributes directly to the branch behind larksuite#2881; it changes no production behavior.
Changes
api/rate_limitwith code 429, makes exactly two requests, retains the original refresh credential and grant metadata, and does not request authorization.The existing tests cover retry exhaustion and success within one lookup separately. This covers recovery after the exhausted lookup has returned, including reuse of persisted state and release of the account lock. It is an in-process lookup test, not a claim of separate-process or live-endpoint coverage. The UTC fixture correction from the review suggestion is already in the base (
f6eaf122) and is not duplicated here.Test Plan
-raceagainst the locally deployed v1.0.98 backport.authentication/token_missinginstead ofapi/rate_limit.make vet,make fmt-check,make build,git diff --check.go mod tidy;go.modandgo.sumremain unchanged.make unit-test: 133 packages pass;shortcuts/apps/gitcredfails at the unchangedTestLockGlobalConfigSerializesWriterswithacquire global Git config lock: lockfile: lock already held. An isolated rerun fails identically. The same isolated test also fails on the exact unmodified basef6eaf122; this PR changes only an auth test file and leaves that package unchanged. No full-suite pass is claimed.The PR was rebased onto the accepted UTC fixture correction; the tested tree is unchanged (
b067ec248a6d55f60ecb285ba20cf143e9bec375).Related Issues