chia7712 commented on a change in pull request #8755:
URL: https://github.com/apache/kafka/pull/8755#discussion_r432809100



##########
File path: 
connect/runtime/src/test/java/org/apache/kafka/connect/runtime/ConnectorConfigTest.java
##########
@@ -434,5 +436,59 @@ public void configure(Map<String, ?> configs) {
         }
     }
 
+    @Test
+    public void testConfigDefOverrideByInitialConfigDef() {
+        String alias = "hdt";
+        String prefix = ConnectorConfig.TRANSFORMS_CONFIG + "." + alias + ".";
+        Map<String, String> props = new HashMap<>();
+        props.put(ConnectorConfig.TRANSFORMS_CONFIG, alias);
+        props.put(prefix + "type", 
HasDuplicateConfigTransformation.class.getName());
+        ConfigDef def = ConnectorConfig.enrich(MOCK_PLUGINS,
+                new ConfigDef(),
+                props,
+                false);
+        assertConfigDef(def, prefix, 
HasDuplicateConfigTransformation.MUST_EXIST_KEY, ConfigDef.Type.BOOLEAN);
+        assertConfigDef(def, prefix, 
PredicatedTransformation.PREDICATE_CONFIG, ConfigDef.Type.STRING);
+        assertConfigDef(def, prefix, PredicatedTransformation.NEGATE_CONFIG, 
ConfigDef.Type.BOOLEAN);
+    }
+
+    private static void assertConfigDef(ConfigDef def, String prefix, String 
keyName, ConfigDef.Type expectedType) {

Review comment:
       @tombentley Thanks for your reviews! I have addressed ur comment.




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to