Yunyung commented on code in PR #17802:
URL: https://github.com/apache/kafka/pull/17802#discussion_r1841668563
##########
core/src/test/scala/unit/kafka/server/BrokerRegistrationRequestTest.scala:
##########
@@ -57,7 +57,7 @@ class BrokerRegistrationRequestTest {
val saslMechanism: String = ""
- def isZkController: Boolean = !clusterInstance.isKRaftTest
+ def isZkController: Boolean = false
Review Comment:
To maintain code consistency here, I prefer to remove this until zk is
removed from `ControllerInformation`.
##########
tools/src/test/java/org/apache/kafka/tools/consumer/ConsoleConsumerTest.java:
##########
@@ -396,42 +396,22 @@ public void
testGroupMetadataMessageFormatter(ClusterInstance cluster) throws Ex
JsonNode jsonNode =
objectMapper.reader().readTree(out.toByteArray());
- // The new group coordinator writes an empty group metadata
record when the group is created for
- // the first time whereas the old group coordinator only
writes a group metadata record when
- // the first rebalance completes.
- if (cluster.isKRaftTest()) {
- JsonNode keyNode = jsonNode.get("key");
- GroupMetadataKey groupMetadataKey =
-
GroupMetadataKeyJsonConverter.read(keyNode.get("data"),
GroupMetadataKey.HIGHEST_SUPPORTED_VERSION);
- assertNotNull(groupMetadataKey);
- assertEquals(groupId, groupMetadataKey.group());
-
- JsonNode valueNode = jsonNode.get("value");
- GroupMetadataValue groupMetadataValue =
-
GroupMetadataValueJsonConverter.read(valueNode.get("data"),
GroupMetadataValue.HIGHEST_SUPPORTED_VERSION);
- assertNotNull(groupMetadataValue);
- assertEquals("", groupMetadataValue.protocolType());
- assertEquals(0, groupMetadataValue.generation());
- assertNull(groupMetadataValue.protocol());
- assertNull(groupMetadataValue.leader());
- assertEquals(0, groupMetadataValue.members().size());
- } else {
- JsonNode keyNode = jsonNode.get("key");
- GroupMetadataKey groupMetadataKey =
-
GroupMetadataKeyJsonConverter.read(keyNode.get("data"),
GroupMetadataKey.HIGHEST_SUPPORTED_VERSION);
- assertNotNull(groupMetadataKey);
- assertEquals(groupId, groupMetadataKey.group());
-
- JsonNode valueNode = jsonNode.get("value");
- GroupMetadataValue groupMetadataValue =
-
GroupMetadataValueJsonConverter.read(valueNode.get("data"),
GroupMetadataValue.HIGHEST_SUPPORTED_VERSION);
- assertNotNull(groupMetadataValue);
- assertEquals("consumer",
groupMetadataValue.protocolType());
- assertEquals(1, groupMetadataValue.generation());
- assertEquals("range", groupMetadataValue.protocol());
- assertNotNull(groupMetadataValue.leader());
- assertEquals(1, groupMetadataValue.members().size());
- }
+ // The group coordinator writes an empty group metadata record
when the group is created for the first time
+ JsonNode keyNode = jsonNode.get("key");
+ GroupMetadataKey groupMetadataKey =
+ GroupMetadataKeyJsonConverter.read(keyNode.get("data"),
GroupMetadataKey.HIGHEST_SUPPORTED_VERSION);
+ assertNotNull(groupMetadataKey);
+ assertEquals(groupId, groupMetadataKey.group());
+
+ JsonNode valueNode = jsonNode.get("value");
+ GroupMetadataValue groupMetadataValue =
+
GroupMetadataValueJsonConverter.read(valueNode.get("data"),
GroupMetadataValue.HIGHEST_SUPPORTED_VERSION);
+ assertNotNull(groupMetadataValue);
+ assertEquals("", groupMetadataValue.protocolType());
Review Comment:
Since the aim of this patch is to remove the code, I prefer to refine this
type of change in a follow-up if needed.
--
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]