chia7712 commented on code in PR #15989:
URL: https://github.com/apache/kafka/pull/15989#discussion_r1623140655


##########
connect/runtime/src/test/java/org/apache/kafka/connect/storage/KafkaConfigBackingStoreMockitoTest.java:
##########
@@ -1315,4 +1451,22 @@ private Map<String, Object> structToMap(Struct struct) {
         for (Field field : struct.schema().fields()) result.put(field.name(), 
struct.get(field));
         return result;
     }
+
+    // Manually insert a connector into config storage, updating the task 
configs, connector config, and root config
+    private void whiteBoxAddConnector(String connectorName, Map<String, 
String> connectorConfig, List<Map<String, String>> taskConfigs) {

Review Comment:
   we don't use `whiteBox` now, so that can be simplified:
   ```java
       private void addConnector(String connectorName, Map<String, String> 
connectorConfig, List<Map<String, String>> taskConfigs) {
           for (int i = 0; i < taskConfigs.size(); i++)
               configStorage.taskConfigs.put(new ConnectorTaskId(connectorName, 
i), taskConfigs.get(i));
           configStorage.connectorConfigs.put(connectorName, connectorConfig);
           configStorage.connectorTaskCounts.put(connectorName, 
taskConfigs.size());
       }
   ```



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