notes(bf-32n): document that bounds enforcement tests already exist
All acceptance criteria verified - TestAdaptiveRateLimiter_BasicBounds already exists and passes with injected window duration. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
2cdef80126
commit
906da31dec
1 changed files with 29 additions and 0 deletions
29
notes/bf-32n.md
Normal file
29
notes/bf-32n.md
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
# Bead bf-32n: Add bounds enforcement tests
|
||||
|
||||
## Status
|
||||
|
||||
**Already complete** - The required test `TestAdaptiveRateLimiter_BasicBounds` already exists and passes all acceptance criteria.
|
||||
|
||||
## Verification
|
||||
|
||||
All acceptance criteria met:
|
||||
|
||||
1. ✅ TestAdaptiveRateLimiter_BasicBounds test function exists (line 982)
|
||||
2. ✅ Table-driven with multiple bound scenarios (4 test cases)
|
||||
3. ✅ Tests use injected window duration (testWindow = 10ms, no sleep calls)
|
||||
4. ✅ Tests verify rate stays in [minRate, maxRate] under all conditions
|
||||
5. ✅ Tests pass: `go test ./proxy -v -run TestAdaptiveRateLimiter_BasicBounds`
|
||||
|
||||
## Scope Coverage
|
||||
|
||||
All required scenarios covered:
|
||||
- ✅ Rate never drops below minRate (default: 10)
|
||||
- ✅ Rate never exceeds maxRate (default: 100)
|
||||
- ✅ Heavy 429 load drives rate to min but not below
|
||||
- ✅ Continuous success drives rate to max but not above
|
||||
|
||||
## Original Implementation
|
||||
|
||||
Test was added in commit 88358f9 ("test(ratelimiter): add basic state and bounds tests for AdaptiveRateLimiter") and improved in commit 22644ea to use injected window duration for faster test execution.
|
||||
|
||||
Location: `proxy/ratelimiter_test.go:982-1066`
|
||||
Loading…
Add table
Reference in a new issue