Repository navigation
Commit 43f0c9c
authored
Freeze time in rate limit general-limit specs (#5526)
The per-user reset window is wall-clock aligned via next_expires_in.
When the 60-minute boundary falls between the burst of requests, the
counter resets mid-test and the final request is not rate limited,
returning 200 instead of 429. Freeze time around each burst so the
window cannot roll over.1 parent f29a864 commit 43f0c9c
1 file changed
Lines changed: 19 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
27 | 33 | | |
28 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
29 | 37 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
| |||
48 | 51 | | |
49 | 52 | | |
50 | 53 | | |
51 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
52 | 60 | | |
53 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
54 | 64 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | 65 | | |
61 | 66 | | |
62 | 67 | | |
| |||
0 commit comments