gabriellefu commented on code in PR #22213:
URL: https://github.com/apache/kafka/pull/22213#discussion_r3641007117
##########
group-coordinator/src/test/java/org/apache/kafka/coordinator/group/GroupConfigTest.java:
##########
@@ -345,6 +350,19 @@ public void testInvalidProps() {
doTestInvalidProps(props, ConfigException.class);
}
+ @Test
+ public void testStreamsRackAwareAssignmentTagsValidation() {
+ // Duplicate rack-aware assignment tags are rejected rather than
silently de-duplicated.
+ Map<String, String> props = createValidGroupConfig();
+ props.put(GroupConfig.STREAMS_RACK_AWARE_ASSIGNMENT_TAGS_CONFIG,
"zone,zone");
+ doTestInvalidProps(props, InvalidConfigurationException.class);
+
+ // Distinct rack-aware assignment tags are accepted.
+ props = createValidGroupConfig();
+ props.put(GroupConfig.STREAMS_RACK_AWARE_ASSIGNMENT_TAGS_CONFIG,
"zone,cluster");
+ doTestValidProps(props);
+ }
Review Comment:
Done. Added " zone , cluster " cases to both GroupConfigTest and
GroupCoordinatorConfigTest, asserting they parse to a clean [zone, cluster],
plus a " zone , zone " case verifying duplicate detection is whitespace
insensitive.
##########
group-coordinator/src/test/java/org/apache/kafka/coordinator/group/GroupMetadataManagerTest.java:
##########
@@ -29405,9 +29669,8 @@ private Map<Uuid,
DeleteShareGroupOffsetsResponseData.DeleteShareGroupOffsetsRes
* This matches what streamsGroupAssignmentConfigs() would return.
*/
private Map<String, String> getDefaultAssignmentConfigs() {
- // Use the same default value as
GroupCoordinatorConfig.STREAMS_GROUP_NUM_STANDBY_REPLICAS_DEFAULT
- return new TreeMap<>(Map.of(
- "num.standby.replicas",
String.valueOf(GroupCoordinatorConfig.STREAMS_GROUP_NUM_STANDBY_REPLICAS_DEFAULT)
- ));
+ Map<String, String> configs = new TreeMap<>();
+ configs.put("num.standby.replicas",
String.valueOf(GroupCoordinatorConfig.STREAMS_GROUP_NUM_STANDBY_REPLICAS_DEFAULT));
+ return configs;
Review Comment:
reverted
--
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]