Refactor throttle middleware tests as prone to intermittent failure
Open
help wanted
- Dominant language
- Go
- Stars
- 22.8k
- Forks
- 1.2k
- Avg merge
- 5h 17m
- Merged PRs (30d)
- 10
Description
https://github.com/go-chi/chi/blob/master/middleware/throttle_test.go
It's often that when I submit a PR, and the code runs through github ci, it will fail -- https://github.com/go-chi/chi/actions
I have to re-run the jobs to have it pass, it seems to be a timing issue. When running locally, it seems to work well pretty consistently, but I've seen the rare failing case.
Contributor guide
Research direction
Start with middleware/throttle_test.go and review the intermittent failures in the GitHub Actions runs linked in the issue. Reproduce the timing-sensitive behavior locally or in CI, then refactor the tests so the existing throttle coverage passes consistently without reruns.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, backend, testing
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100