Copilot commented on code in PR #23523:
URL: https://github.com/apache/kafka/pull/23523#discussion_r4073522690
##########
tests/kafkatest/services/streams.py:
##########
@@ -691,6 +691,26 @@ def prop_file(self):
cfg = KafkaConfig(**properties)
return cfg.render()
+ def start_cmd(self, node):
+ args = self.args.copy()
+ args['config_file'] = self.CONFIG_FILE
+ args['stdout'] = self.STDOUT_FILE
+ args['stderr'] = self.STDERR_FILE
+ args['pidfile'] = self.PID_FILE
+ args['log4j_param'] = get_log4j_config_param(node)
+ args['log4j'] = get_log4j_config_for_tools(node)
+ args['kafka_run_class'] = self.path.script("kafka-run-class.sh", node)
+
+ cmd = "( export KAFKA_LOG4J_OPTS=\"%(log4j_param)s%(log4j)s\"; " \
+ "INCLUDE_TEST_JARS=true " \
+ "%(kafka_run_class)s %(streams_class_name)s " \
+ " %(config_file)s %(user_test_args1)s %(user_test_args2)s
%(user_test_args3)s" \
+ " %(user_test_args4)s & echo $! >&3 ) 1>> %(stdout)s 2>>
%(stderr)s 3> %(pidfile)s" % args
+
+ self.logger.info("Executing streams cmd: " + cmd)
+
+ return cmd
Review Comment:
This override is byte-for-byte equivalent in behavior to
`StreamsTestBaseService.start_cmd` at lines 286–303, so it adds no support for
this test and creates a second command template that can drift from the base
implementation. Remove the override and inherit the existing implementation.
##########
tests/kafkatest/tests/streams/streams_static_membership_test.py:
##########
@@ -361,6 +362,53 @@ def test_fencing_static_streams_member(self,
fencing_stage, metadata_quorum):
self.producer.stop()
self.kafka.stop(timeout_sec=120)
+ @cluster(num_nodes=8)
+ @matrix(
+ broker_version=[str(LATEST_4_2), str(LATEST_4_3)],
+ metadata_quorum=[quorum.isolated_kraft]
+ )
+ def test_new_streams_client_static_membership_against_old_broker(
+ self, broker_version, metadata_quorum):
+ """
+ KAFKA-20971: a newer Kafka Streams client (dev/4.4+) using static
membership on the
+ `streams` group protocol should fail with a clear unsupported-version
error against
+ an older (4.2/4.3) broker that doesn't support the `streams` group
protocol.
Review Comment:
Kafka 4.2 introduced and enabled the Streams group protocol; these brokers
specifically lack static-membership support for that protocol. Saying they do
not support the protocol makes the test contract inaccurate (see
`server-common/src/main/java/org/apache/kafka/server/common/MetadataVersion.java:120-121`).
--
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]