Skip to content

Commit

Permalink
[FIX] Fix rate limit exceeded test by adding initial request
Browse files Browse the repository at this point in the history
- Add initial request to consume burst limit
- Keep explicit rate limit state control
- Retain error message validation
  • Loading branch information
PPeitsch committed Dec 26, 2024
1 parent 9512492 commit d6a8fb4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/integration/test_error_handling.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ def test_rate_limit_exceeded(
calls=1, period=1.0, _burst=1
)

# Make first request to use up the burst
strict_rate_limit_connector.get_principales_variables()

# Force rate limited state
now = time.monotonic()
strict_rate_limit_connector.rate_limiter._window.clear()
Expand Down

0 comments on commit d6a8fb4

Please sign in to comment.