You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/05/29 15:42:52 UTC

[GitHub] [kafka] chia7712 commented on a change in pull request #8755: KAFKA-10069 The user-defined "predicate" and "negate" are not removed…

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



##########
File path: connect/runtime/src/test/java/org/apache/kafka/connect/runtime/ConnectorConfigTest.java
##########
@@ -434,5 +436,56 @@ 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);
+        Arrays.asList(PredicatedTransformation.PREDICATE_CONFIG,
+                PredicatedTransformation.NEGATE_CONFIG,
+                HasDuplicateConfigTransformation.MUST_EXIST_KEY)
+                .forEach(key -> {
+                    Assert.assertNotNull(def.configKeys().get(prefix + key));

Review comment:
       will roger that




----------------------------------------------------------------
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:
users@infra.apache.org