chia7712 commented on code in PR #20425:
URL: https://github.com/apache/kafka/pull/20425#discussion_r2306444968
##########
storage/src/test/java/org/apache/kafka/server/log/remote/quota/RLMQuotaMetricsTest.java:
##########
@@ -58,7 +58,7 @@ public void testClose() {
// Register the sensor
quotaMetrics.sensor();
- var avg = metrics.metricName("metric" + "-avg", "group",
String.format("format", "average"));
+ var avg = metrics.metricName("metric" + "-avg", "group", "average");
Review Comment:
I guess it was intended to test the description format. Perhaps we could add
such a test. for example:
```java
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());
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]