chia7712 commented on code in PR #21758:
URL: https://github.com/apache/kafka/pull/21758#discussion_r2937493972


##########
group-coordinator/src/test/java/org/apache/kafka/coordinator/group/GroupConfigManagerTest.java:
##########
@@ -115,6 +115,21 @@ public void testClampWithCustomBrokerBounds() {
         assertEquals(49000, 
configManager.groupConfig(groupId).get().getInt(CONSUMER_SESSION_TIMEOUT_MS_CONFIG));
     }
 
+    @Test
+    public void testGroupIsRemovedWhenDynamicConfigsAreRemoved() {

Review Comment:
   Would you mind adding integration test? For example:
   ```java
           try (Admin admin = clusterInstance.admin()) {
               var cr = new ConfigResource(ConfigResource.Type.GROUP, "gp");
               assertEquals(List.of(), 
admin.listConfigResources(Set.of(ConfigResource.Type.GROUP), new 
ListConfigResourcesOptions()).all().get());
   
               // add dynamic config
               admin.incrementalAlterConfigs(Map.of(cr, List.of(new 
AlterConfigOp(
                       new ConfigEntry("consumer.session.timeout.ms", "45001"), 
AlterConfigOp.OpType.SET))))
                   .all()
                   .get();
   
               assertNotEquals(List.of(), 
admin.listConfigResources(Set.of(ConfigResource.Type.GROUP), new 
ListConfigResourcesOptions()).all().get());
   
               // remove dynamic config
               admin.incrementalAlterConfigs(Map.of(cr, List.of(new 
AlterConfigOp(
                       new ConfigEntry("consumer.session.timeout.ms", null), 
AlterConfigOp.OpType.DELETE))))
                   .all()
                   .get();
               assertEquals(List.of(), 
admin.listConfigResources(Set.of(ConfigResource.Type.GROUP), new 
ListConfigResourcesOptions()).all().get());
           }
   ```



-- 
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]

Reply via email to