Skip to content

Add unit tests for the request rate limiter correctly blocking requests after the limit is exceeded #700

Description

@Chucks1093

Summary

The rate limiter allows N requests per wallet per 60-second window and blocks subsequent requests with a 429. Unit tests should confirm the limiter counts correctly, resets after the window, and includes the correct Retry-After header on blocked responses.

Scope

  • Test N requests within the window all succeed (200)
  • Test the N+1th request is blocked with 429
  • Test the response includes a Retry-After header with the correct seconds remaining
  • Test a request from a different wallet is not affected by another wallet's limit
  • Test the counter resets and the next request succeeds after the window expires

Acceptance Criteria

  • N requests within window succeed
  • N+1th request returns 429
  • Retry-After header present and correct on 429 response
  • Different wallets have independent counters
  • Counter resets after the 60-second window

ETA: 12 hours


Coordinate on Telegram

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions