schemathesis / schemathesis

Supercharge your API testing, catch bugs, and ensure compliance

Home Page:https://schemathesis.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] console rate limiting is not working as expected

itsc-Hohmann opened this issue · comments

Checklist

  • I checked the FAQ section of the documentation
  • I looked for similar issues in the issue tracker
  • I am using the latest version of Schemathesis

Describe the bug

My API with over 100 endpoints implements rate limiting. To avoid getting TooManyRequest 429 results I set --rate-limit=4/s to match the APIs rates. But the test run seems to ignore this setting and erroring on almost all tests with this error:
Bucket for item=b'' with Rate limit=4/1.0s is already full

To Reproduce

🚨 Mandatory 🚨: Steps to reproduce the behavior:

  1. Run this command 'st run --checks all https://server/swagger.json --auth user:password --set-header Client=Local Fuzzing --rate-limit=4/s --request-tls-verify=false --skip-deprecated-operations'

  2. See errors: Bucket for item=b'' with Rate limit=4/1.0s is already full

THE API has over 100 endpoints.

Expected behavior

I expect the test run to throttle requests based on the rate limit, not erroring out with the described error.

Environment

- OS: Windows
- Python version: 3.12.4-amd64
- Schemathesis version: newest stable (2024-06-11)
- Spec version: Open API 3.0.1

Additional context

none

Thank you for reporting, I'll look into this