You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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]fnfree_cell(){let clock = FakeRelativeClock::default();let rl = RateLimiter::direct_with_clock(Quota::per_second(nonzero!(5u32)), clock.clone());// consume the rate-limiterfor _ in1..=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 cellfor _ in1..=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!
The text was updated successfully, but these errors were encountered: