gabriellefu commented on code in PR #22213:
URL: https://github.com/apache/kafka/pull/22213#discussion_r3641011226
##########
group-coordinator/src/test/java/org/apache/kafka/coordinator/group/GroupCoordinatorConfigTest.java:
##########
@@ -603,6 +603,31 @@ private void testStreamsOtherConfigs() {
configs.put(GroupCoordinatorConfig.STREAMS_GROUP_MAX_WARMUP_REPLICAS_CONFIG,
-1);
assertEquals("Invalid value -1 for configuration
group.streams.max.warmup.replicas: Value must be at least 0",
assertThrows(ConfigException.class, () ->
createConfig(configs)).getMessage());
+
+
+ // group.streams.rack.aware.assignment.tags
+
+ // default is empty list
+ configs.clear();
+ GroupCoordinatorConfig defaultTagsConfig = createConfig(configs);
+ assertEquals(List.of(),
defaultTagsConfig.streamsGroupRackAwareAssignmentTags());
+
+ // can parse a non-empty value
+ configs.clear();
+
configs.put(GroupCoordinatorConfig.STREAMS_GROUP_RACK_AWARE_ASSIGNMENT_TAGS_CONFIG,
"zone,cluster");
+ GroupCoordinatorConfig nonEmptyTagsConfig = createConfig(configs);
+ assertEquals(List.of("zone", "cluster"),
nonEmptyTagsConfig.streamsGroupRackAwareAssignmentTags());
+
+ // rejects empty entries in the list
+ configs.clear();
+
configs.put(GroupCoordinatorConfig.STREAMS_GROUP_RACK_AWARE_ASSIGNMENT_TAGS_CONFIG,
"zone, ");
+ assertThrows(ConfigException.class, () -> createConfig(configs));
Review Comment:
Done, have updated all the test to verify error messages are also match
--
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]