chia7712 commented on code in PR #23422:
URL: https://github.com/apache/kafka/pull/23422#discussion_r4732145398
##########
connect/runtime/src/test/java/org/apache/kafka/connect/runtime/WorkerTest.java:
##########
@@ -715,6 +716,80 @@ public void testAddRemoveSinkTask(boolean
enableTopicCreation) {
verifyExecutorSubmit();
}
+ @ParameterizedTest
+ @CsvSource({
+ "true, consumer, true",
+ "false, consumer, true",
+ "true, classic, false",
+ "false, classic, false"
+ })
+ public void testWarnWhenStartingSinkTaskWithConsumerGroupProtocol(
+ boolean enableTopicCreation,
+ String groupProtocol,
+ boolean expectWarning) {
+ setup(enableTopicCreation);
+ workerProps.put("consumer." + ConsumerConfig.GROUP_PROTOCOL_CONFIG,
groupProtocol);
+ config = new StandaloneConfig(workerProps);
+ // Most of the other cases use source tasks; we make sure to get code
coverage for sink tasks here as well
Review Comment:
Could you create a helper method for the duplicate code? This test is mostly
a copy of `testAddRemoveSinkTask`.
##########
connect/runtime/src/test/java/org/apache/kafka/connect/runtime/WorkerTest.java:
##########
@@ -715,6 +716,80 @@ public void testAddRemoveSinkTask(boolean
enableTopicCreation) {
verifyExecutorSubmit();
}
+ @ParameterizedTest
+ @CsvSource({
+ "true, consumer, true",
+ "false, consumer, true",
+ "true, classic, false",
+ "false, classic, false"
+ })
+ public void testWarnWhenStartingSinkTaskWithConsumerGroupProtocol(
Review Comment:
Would you mind adding a test to verify the connector-level override
(`consumer.override.group.protocol`)? For example, the worker uses classic but
the connector overrides it to consumer.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]