-
Notifications
You must be signed in to change notification settings - Fork 49
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
Clear lastVersion in a case of returning an empty TokenBucketState #30
Clear lastVersion in a case of returning an empty TokenBucketState #30
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #30 +/- ##
==========================================
+ Coverage 82.93% 83.00% +0.07%
==========================================
Files 10 10
Lines 1178 1183 +5
==========================================
+ Hits 977 982 +5
Misses 137 137
Partials 64 64 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
if t.raceCheck { | ||
// reset in a case of returning an empty TokenBucketState | ||
t.lastVersion = 0 | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think it makes sense to add the test that covers this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm.. let's keep the tests generic.
I will merge this PR as is.
if t.raceCheck { | ||
// reset in a case of returning an empty TokenBucketState | ||
t.lastVersion = 0 | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm.. let's keep the tests generic.
I will merge this PR as is.
Thanks for contributing! |
Solving #29