dongnuo123 commented on code in PR #17503:
URL: https://github.com/apache/kafka/pull/17503#discussion_r1800120007


##########
tests/kafkatest/tests/client/consumer_protocol_migration_test.py:
##########
@@ -0,0 +1,407 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from ducktape.mark import matrix
+from ducktape.utils.util import wait_until
+from ducktape.mark.resource import cluster
+
+from kafkatest.tests.verifiable_consumer_test import VerifiableConsumerTest
+from kafkatest.services.kafka import TopicPartition, quorum, consumer_group
+from kafkatest.version import LATEST_0_10_0, LATEST_0_10_1, LATEST_0_10_2, 
LATEST_0_11_0, \
+    LATEST_1_0, LATEST_1_1, LATEST_2_0, LATEST_2_1, LATEST_2_2, LATEST_2_3, 
LATEST_2_4, LATEST_2_5, LATEST_2_6, \
+    LATEST_2_7, LATEST_2_8, LATEST_3_0, LATEST_3_1, LATEST_3_2, LATEST_3_3, 
LATEST_3_4, LATEST_3_5, LATEST_3_6, \
+    LATEST_3_7, LATEST_3_8, DEV_BRANCH, KafkaVersion
+
+class ConsumerProtocolMigrationTest(VerifiableConsumerTest):
+    TOPIC = "test_topic"
+    NUM_PARTITIONS = 6
+
+    RANGE = "org.apache.kafka.clients.consumer.RangeAssignor"
+    ROUND_ROBIN = "org.apache.kafka.clients.consumer.RoundRobinAssignor"
+    STICKY = "org.apache.kafka.clients.consumer.StickyAssignor"
+    COOPERATIVE_STICKEY = 
"org.apache.kafka.clients.consumer.CooperativeStickyAssignor"
+    all_assignment_strategies = [RANGE, ROUND_ROBIN, COOPERATIVE_STICKEY, 
STICKY]
+
+    all_consumer_versions = [LATEST_0_10_0, LATEST_0_10_1, LATEST_0_10_2, 
LATEST_0_11_0, \
+                             LATEST_1_0, LATEST_1_1, LATEST_2_0, LATEST_2_1, 
LATEST_2_2, LATEST_2_3, LATEST_2_4, LATEST_2_5, LATEST_2_6, \
+                             LATEST_2_7, LATEST_2_8, LATEST_3_0, LATEST_3_1, 
LATEST_3_2, LATEST_3_3, LATEST_3_4, LATEST_3_5, LATEST_3_6, \
+                             LATEST_3_7, LATEST_3_8, DEV_BRANCH]

Review Comment:
   Here it involves too many tests (2100 of them). We can reduce the number of 
tests by
   - Only keeping tests using `range` and `cooperative_sticky` assignors.
   - Only keeping kafka versions with major change in consumer protocol. 
Possible options are
       -  `0.10.0`(the earliest version available for system test)
       - `2.1` (the consumer needs two join group requests to join)
       - `2.3` (static membership)
       - `2.5` (protocol type and protocol name)
       - `3.2` (skip assignment)



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