k-raina commented on code in PR #20144: URL: https://github.com/apache/kafka/pull/20144#discussion_r2292933114
########## clients/src/test/java/org/apache/kafka/common/telemetry/internals/ClientTelemetryUtilsTest.java: ########## @@ -123,10 +124,24 @@ public void testValidateIntervalMsInvalid(int pushIntervalMs) { @Test public void testPreferredCompressionType() { - assertEquals(CompressionType.NONE, ClientTelemetryUtils.preferredCompressionType(Collections.emptyList())); - assertEquals(CompressionType.NONE, ClientTelemetryUtils.preferredCompressionType(null)); - assertEquals(CompressionType.NONE, ClientTelemetryUtils.preferredCompressionType(Arrays.asList(CompressionType.NONE, CompressionType.GZIP))); - assertEquals(CompressionType.GZIP, ClientTelemetryUtils.preferredCompressionType(Arrays.asList(CompressionType.GZIP, CompressionType.NONE))); + // Test with no unsupported types + assertEquals(CompressionType.NONE, ClientTelemetryUtils.preferredCompressionType(List.of(), Set.of())); + assertEquals(CompressionType.NONE, ClientTelemetryUtils.preferredCompressionType(Arrays.asList(CompressionType.NONE, CompressionType.GZIP), Set.of())); Review Comment: Thanks @apoorvmittal10 for review Previous [comment](https://github.com/apache/kafka/pull/20144#discussion_r2285718764) was unclear, there were multiple instances of `Collections.emptyList() ,Collections.emptyList` in code unrelated to this PR. I have updated them. -- 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