-
Notifications
You must be signed in to change notification settings - Fork 14.9k
MINOR: improve RLMQuotaMetricsTest #20425
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
Conversation
frankvicky
left a comment
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 like a typo 😄
m1a2st
left a comment
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.
Thanks, LGTM
| // Register the sensor | ||
| quotaMetrics.sensor(); | ||
| var avg = metrics.metricName("metric" + "-avg", "group", String.format("format", "average")); | ||
| var avg = metrics.metricName("metric" + "-avg", "group", "average"); |
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.
I guess it was intended to test the description format. Perhaps we could add such a test. for example:
RLMQuotaMetrics quotaMetrics = new RLMQuotaMetrics(metrics, "metric", "group", "this is %s", 5);
// Register the sensor
quotaMetrics.sensor();
var avg = metrics.metricName("metric" + "-avg", "group", "this is average");
// Verify that metrics are created
var result = metrics.metric(avg);
assertNotNull(result);
assertEquals(result.metricName().description(), avg.description());Adds metrics description verification to RLMQuotaMetricsTest. Reviewers: Ken Huang <s7133700@gmail.com>, TengYao Chi <kitingiao@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
Adds metrics description verification to RLMQuotaMetricsTest.
Reviewers: Ken Huang s7133700@gmail.com, TengYao Chi
kitingiao@gmail.com, Chia-Ping Tsai chia7712@gmail.com