Add multiple iterations test for TokenRateLimitPolicy#749
Merged
averevki merged 1 commit intoKuadrant:mainfrom Sep 12, 2025
Merged
Add multiple iterations test for TokenRateLimitPolicy#749averevki merged 1 commit intoKuadrant:mainfrom
averevki merged 1 commit intoKuadrant:mainfrom
Conversation
376b27a to
1dcec9b
Compare
averevki
reviewed
Sep 11, 2025
1dcec9b to
e33b680
Compare
averevki
reviewed
Sep 11, 2025
e33b680 to
dd9d325
Compare
1fdc714 to
c2e4568
Compare
averevki
reviewed
Sep 12, 2025
Signed-off-by: emmaaroche <eroche@redhat.com>
c2e4568 to
3ce5634
Compare
averevki
approved these changes
Sep 12, 2025
Contributor
averevki
left a comment
There was a problem hiding this comment.
> assert (
response.status_code == 429
), f"Iteration {i+1}: Expected 429 after {total_tokens} tokens, but got {response.status_code}"
E AssertionError: Iteration 9: Expected 429 after 13 tokens, but got 200
E assert 200 == 429
E + where 200 = <testsuite.httpx.Result object at 0x7fc2cc2798b0>.status_code
Failed for me one time randomly. Time to tokens relation might be a bit off for this test. But lets merge it and see how it runs on nightlies over this weekend. I'd prefer that and a smaller change later than to block this PR for a few more days. Good work! 😺
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.
Description
This PR adds a test to verify that the TokenRateLimitPolicy correctly enforces its limits and properly resets after multiple iterations.
This PR also restructures the TRLP tests to separate shared and story-specific fixtures:
Related issue