emitskevich-blp commented on code in PR #15722: URL: https://github.com/apache/kafka/pull/15722#discussion_r1573458599
########## clients/src/test/java/org/apache/kafka/common/network/SelectorTest.java: ########## @@ -1012,6 +1013,28 @@ public void testChannelCloseWhileProcessingReceives() throws Exception { assertEquals(0, selector.completedReceives().size()); } + /** + * Validate that correct subset of io metrics marked deprecated in docs + */ + @Test + public void testIoMetricsHaveCorrectDoc() { + List<String> actual = asList("io-ratio", "io-wait-ratio"); + List<String> deprecated = asList("iotime-total", "io-waittime-total"); + + // iterate through all metrics, since metrics.metric(metricName) requires + // knowing metric group and tag set, which are not trivial dependencies + for (MetricName metricName : metrics.metrics().keySet()) { Review Comment: I'm not sure we should. Could you please elaborate more? Below are my thoughts. What is expected to be verified by new suggested check? 1. Absence of human mistake during writing the test? Then it may become similar to testing the tests. 2. Actual presence of all these metrics in the registry? But I think this particular test shouldn't care if some of them are removed. The goal here is "for these names, if they are registered, we expect such docs". However, I'm concerning that if at some point **all of them** are removed, the test will stop doing anything meaningful without showing any sign of it. -- 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