Handle HTTP 429 status gracefully in end-to-end tests
What does this MR do and why?
Handles HTTP 429 status gracefully by waiting for the time specified in the retry_after
header.
Issue: https://gitlab.com/gitlab-org/quality/team-tasks/-/issues/1014 Also related to: #341123 (closed)
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Enable rate limits on local from Admin > Settings > Network > User and IP rate limits by checking off
Enable authenticated API request rate limit
andEnable unauthenticated API request rate limit
and settingMaximum unauthenticated API requests per rate limit period per IP
to a low value such as 2 or 3 andUnauthenticated API rate limit period in seconds
to 10 seconds (for example). - Run any e2e test and notice the following logs:
Received 429 - Too many requests....
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Sanad Liaquat