showuon commented on code in PR #14202:
URL: https://github.com/apache/kafka/pull/14202#discussion_r1294184526


##########
storage/src/test/java/org/apache/kafka/server/log/remote/storage/RemoteLogManagerConfigTest.java:
##########
@@ -52,6 +54,28 @@ public void testValidConfigs() {
         Assertions.assertEquals(expectedRemoteLogManagerConfig, 
remoteLogManagerConfig);
     }
 
+    @Test
+    public void testValidConfigsWithDefaultRemoteStorageManagerClass() {
+        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 expectedRemoteLogManagerConfig
+                = new RemoteLogManagerConfig(true, 
"dummy.remote.storage.class", "dummy.remote.storage.class.path",
+                
"org.apache.kafka.server.log.remote.metadata.storage.TopicBasedRemoteLogMetadataManager",
 "dummy.remote.log.metadata.class.path",

Review Comment:
   Could we replace the value with 
`DEFAULT_REMOTE_LOG_METADATA_MANAGER_CLASS_NAME`?



##########
storage/src/test/java/org/apache/kafka/server/log/remote/storage/RemoteLogManagerConfigTest.java:
##########
@@ -52,6 +54,28 @@ public void testValidConfigs() {
         Assertions.assertEquals(expectedRemoteLogManagerConfig, 
remoteLogManagerConfig);
     }
 
+    @Test
+    public void testValidConfigsWithDefaultRemoteStorageManagerClass() {
+        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 expectedRemoteLogManagerConfig
+                = new RemoteLogManagerConfig(true, 
"dummy.remote.storage.class", "dummy.remote.storage.class.path",
+                
"org.apache.kafka.server.log.remote.metadata.storage.TopicBasedRemoteLogMetadataManager",
 "dummy.remote.log.metadata.class.path",

Review Comment:
   Also, I think this test is basically identical to the `testValidConfigs` 
test, could we make it as `@ParameterizedTest`? Ex:
   ```
   @ParameterizedTest
   @ValueSource(booleans = {true, false})
   testValidConfigs(boolean useDefaultRemoteStorageManagerClass) 
   ```



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