apoorvmittal10 commented on code in PR #20144:
URL: https://github.com/apache/kafka/pull/20144#discussion_r2291882949


##########
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:
   Use List.of instead of Arrays.asList, same else where. I thought comment 
[here](https://github.com/apache/kafka/pull/20144#discussion_r2285718764) will 
help you understand that other places can be corrected as well.



-- 
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

Reply via email to