Hi, I'm wondering if this is expected behavior (and if so, what's the reasoning behind it) or a bug?
Here's a repro describing my issue:
Set a direct rate-limiter with a max_burst of 5
Consume that quota and verify another cell is not allowed
Advance time a couple of seconds
Now 6 cells are allowed?
#[test]
fn free_cell() {
let clock = FakeRelativeClock::default();
let rl = RateLimiter::direct_with_clock(Quota::per_second(nonzero!(5u32)), clock.clone());
// consume the rate-limiter
for _ in 1..=5 {
assert!(rl.check().is_ok());
}
assert!(rl.check().is_err());
// advance the clock
clock.advance(Duration::from_secs(2));
// Now I can get in one more extra cell
for _ in 1..=6 {
assert!(rl.check().is_ok());
}
assert!(rl.check().is_err());
}
Hi, I'm wondering if this is expected behavior (and if so, what's the reasoning behind it) or a bug?
Here's a repro describing my issue:
Perhaps the same issue as #107?
Thanks!