-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
tests: increase coverage for multiple files in vitess/go/stats
to 100%
#14997
Conversation
Signed-off-by: Eshaan Aggarwal <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
Signed-off-by: Eshaan Aggarwal <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #14997 +/- ##
==========================================
+ Coverage 47.33% 47.35% +0.02%
==========================================
Files 1142 1142
Lines 239009 239020 +11
==========================================
+ Hits 113125 113183 +58
+ Misses 117289 117242 -47
Partials 8595 8595 ☔ 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 to me, thank you!
Description
Added 100% test coverage for the following files:
vitess/go/stats/histogram
vitess/go/stats/hooks
vitess/go/stats/ring
vitess/go/stats/snake_case_converter
Also refactored some of the existing tests to use the
assert
library for cleaner tests, and added a function calledAddHook
on theHistogram
struct so that the users can register a hook on the histogram which can be called anytime a value is added to the same (this seemed to be the desired functionality according to the existing code, but the registration of the hook seems to be omitted)Related Issue(s)
Fixes part of #14931
Checklist
Deployment Notes