-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Take always return without block if it enters the case branch #119
Comments
@smallnest can you please try the version from #120 and confirm if it works for you |
yes. Fixed. thanks |
The fixed PR isn't merged. @smallnest Please re-open the issue to notify the maintainer and other users to pay attention to it. It's a bug that leads to an incident in my prod service. 😢 😭 This issue is also associated with #106 . |
rabbbit
added a commit
that referenced
this issue
Mar 4, 2024
Fixes #119 The solution is a copy from #120, but follows the testing framework that we have - I did not want us to have a real `Sleep` in tests. I'm not exactly thrilled by the testing setup (especially the milliseconds) or the clock itself, but I'm not willing to totally give up on it like #120 proposes. I also wanted ALL implementations of the ratelimiter to be tested, not just the currently selected. Might follow up with some testing cleanups and/or clock migration.
rabbbit
added a commit
that referenced
this issue
Mar 4, 2024
Fixes #119 The solution is a copy from #120, but follows the testing framework that we have - I did not want us to have a real `Sleep` in tests. I'm not exactly thrilled by the testing setup (especially the milliseconds) or the clock itself, but I'm not willing to totally give up on it like #120 proposes. I also wanted ALL implementations of the ratelimiter to be tested, not just the currently selected. Might follow up with some testing cleanups and/or clock migration.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/uber-go/ratelimit/blob/main/limiter_atomic_int64.go#L72
you will find the case always (almost) returns true.
The below code is a test for reproduce:
ratelimit is v0.3.0
The text was updated successfully, but these errors were encountered: