philipnee commented on code in PR #15594:
URL: https://github.com/apache/kafka/pull/15594#discussion_r1541985614


##########
tests/kafkatest/services/connect.py:
##########
@@ -534,33 +535,40 @@ def received_messages(self):
 
     def start(self):
         self.logger.info("Creating connector VerifiableSinkConnector %s", 
self.name)
-        self.cc.create_connector({
+        connector_config = {
             'name': self.name,
             'connector.class': 
'org.apache.kafka.connect.tools.VerifiableSinkConnector',
             'tasks.max': self.tasks,
             'topics': ",".join(self.topics)
-        })
+        }
+        if self.consumer_group_protocol is not None:
+            connector_config["consumer.override.group.protocol"] = 
self.consumer_group_protocol
+        self.cc.create_connector(connector_config)
 
 class MockSink(object):
 
-    def __init__(self, cc, topics, mode=None, delay_sec=10, name="mock-sink"):
+    def __init__(self, cc, topics, mode=None, delay_sec=10, name="mock-sink", 
consumer_group_protocol=None):
         self.cc = cc
         self.logger = self.cc.logger
         self.name = name
         self.mode = mode
         self.delay_sec = delay_sec
         self.topics = topics
+        self.consumer_group_protocol = consumer_group_protocol
 
     def start(self):
         self.logger.info("Creating connector MockSinkConnector %s", self.name)
-        self.cc.create_connector({
+        connector_config = {
             'name': self.name,
             'connector.class': 
'org.apache.kafka.connect.tools.MockSinkConnector',
             'tasks.max': 1,
             'topics': ",".join(self.topics),
             'mock_mode': self.mode,
             'delay_ms': self.delay_sec * 1000
-        })
+        }
+        if self.consumer_group_protocol is not None:
+            connector_config["consumer.override.group.protocol"] = 
self.consumer_group_protocol

Review Comment:
   thanks for the explanation. 



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