muralibasani commented on code in PR #16173:
URL: https://github.com/apache/kafka/pull/16173#discussion_r1624726122


##########
storage/src/test/java/org/apache/kafka/server/log/remote/storage/RemoteLogManagerConfigTest.java:
##########
@@ -105,4 +116,79 @@ private Map<String, Object> 
extractProps(RemoteLogManagerConfig remoteLogManager
                   remoteLogManagerConfig.remoteLogMetadataManagerPrefix());
         return props;
     }
+
+    @Test
+    public void testHashCode_ForAllAndTwoFields() {
+        String rsmPrefix = "__custom.rsm.";
+        String rlmmPrefix = "__custom.rlmm.";
+        Map<String, Object> rsmProps = Collections.singletonMap("rsm.prop", 
"val");
+        Map<String, Object> rlmmProps = Collections.singletonMap("rlmm.prop", 
"val");
+        RemoteLogManagerConfig config1 = getRemoteLogManagerConfig(false, 
rsmPrefix, rlmmPrefix, rsmProps, rlmmProps);
+        RemoteLogManagerConfig config2 = getRemoteLogManagerConfig(false, 
rsmPrefix, rlmmPrefix, rsmProps, rlmmProps);
+
+        // Initially, hash codes should be equal for default objects
+        assertEquals(config1.hashCode(), config2.hashCode());
+
+        // Test for specific field remoteLogManagerCopierThreadPoolSize
+        RemoteLogManagerConfig config3 = new RemoteLogManagerConfig(true, 
"dummy.remote.storage.class",

Review Comment:
   It's a very good improvement, and even I found it difficult. Is it ok if I 
work on this with a new improvement jira story ? I can create 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to