dengziming commented on a change in pull request #10560: URL: https://github.com/apache/kafka/pull/10560#discussion_r664191030
########## File path: core/src/test/scala/unit/kafka/coordinator/group/GroupMetadataManagerTest.scala ########## @@ -1349,6 +1357,10 @@ class GroupMetadataManagerTest { val topicPartition = new TopicPartition("foo", 0) val offset = 37 + val sensor = groupMetadataManager.offsetCommitsSensor + val offsetCommitCount = new WindowedCount() + sensor.add(metrics.metricName("commit-count", "unit-test", "offset commit count"), offsetCommitCount) Review comment: It seems that we can't get a metric from `offsetCommitsSensor` or `metrics`, only `Sensor` has a method `synchronized List<KafkaMetric> metrics()` which can get all metrics but it's package-private, do you think it's worthwhile to add a method in `Sensor` just for testing? -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org