Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-16231

Update consumer_test.py to support KIP-848’s group protocol config

    XMLWordPrintableJSON

Details

    Description

      This task is to update consumer_test.py to support the group.protocol configuration introduced in KIP-848 by adding an optional group_protocol argument to the tests and matrixes.

      For example, here's how it would look to add the new group_protocol parameter to the parameterized tests:

          @cluster(num_nodes=6)
          @matrix(
              assignment_strategy=["org.apache.kafka.clients.consumer.RangeAssignor",
                                   "org.apache.kafka.clients.consumer.RoundRobinAssignor",
                                   "org.apache.kafka.clients.consumer.StickyAssignor"], 
              metadata_quorum=[quorum.zk, quorum.isolated_kraft],
              use_new_coordinator=[False]
          )
          @matrix(
              metadata_quorum=[quorum.isolated_kraft],
              use_new_coordinator=[True],
              group_protocol=["classic", "consumer"]
          )
          def test_the_consumer(self, assignment_strategy, metadata_quorum=quorum.zk, use_new_coordinator=False, group_protocol="classic"):
              consumer = self.setup_consumer("my_topic", group_protocol=group_protocol)
      

      The group_protocol parameter will default to classic.

      Note: we only test the new group protocol setting when use_new_coordinator is True, as that is the only supported mode.

      Attachments

        Issue Links

          Activity

            People

              kirktrue Kirk True
              kirktrue Kirk True
              Lucas Brutschy Lucas Brutschy
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: