Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Automatically delay requests based on the Retry-After header value #1722

Open
Stranger6667 opened this issue Mar 20, 2023 · 0 comments
Assignees
Labels
Core: Transport Sending data to the tested app Difficulty: Intermediate Requires some experience Priority: Low Cosmetic or low-impact changes Type: Feature New functionalities or enhancements UX: Usability Enhances user experience

Comments

@Stranger6667
Copy link
Member

Is your feature request related to a problem? Please describe.
Often Schemathesis tests are failing because of rate limits and generally are not executed as expected and don't test the service properly.

Describe the solution you'd like
There is a manual rate limiting (in #910), but it could happen that Schemathesis hits the limit anyway, for example, if no rate limit is set in CLI or just unexpected.

As a secondary measure, Schemathesis can read the Retry-After header and delay requests automatically.

Describe alternatives you've considered
Just a manual rate limit, but it could still fail for different reasons.

Additional context
There are a few unresolved issues:

  • Should it be the default behavior? If the delay time is too big, then it could unexpectedly slow down the tests.
  • How to indicate that delay is applied? Should it be reported somewhere?
  • What if there is an error in the 429 response (e.g. response does not match the schema) - how to report it?
  • Should we have a way (e.g. CLI option) to control such behavior
@Stranger6667 Stranger6667 added Status: Needs Triage Requires initial assessment to categorize and prioritize Type: Feature New functionalities or enhancements labels Mar 20, 2023
@Stranger6667 Stranger6667 self-assigned this Mar 20, 2023
@Stranger6667 Stranger6667 added Priority: Low Cosmetic or low-impact changes Difficulty: Intermediate Requires some experience UX: Usability Enhances user experience Core: Transport Sending data to the tested app and removed Status: Needs Triage Requires initial assessment to categorize and prioritize labels Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core: Transport Sending data to the tested app Difficulty: Intermediate Requires some experience Priority: Low Cosmetic or low-impact changes Type: Feature New functionalities or enhancements UX: Usability Enhances user experience
Projects
None yet
Development

No branches or pull requests

1 participant