DL1231 commented on code in PR #15067: URL: https://github.com/apache/kafka/pull/15067#discussion_r1667582518
########## core/src/test/scala/unit/kafka/server/DynamicConfigChangeTest.scala: ########## @@ -566,6 +574,45 @@ class DynamicConfigChangeTest extends KafkaServerTestHarness { } } + @ParameterizedTest + @ValueSource(strings = Array("kraft+kip848")) + def testDynamicGroupConfigChange(quorum: String): Unit = { + val newSessionTimeoutMs = 50000 + val consumerGroupId = "group-foo" + val admin = createAdminClient() + try { + val resource = new ConfigResource(ConfigResource.Type.GROUP, consumerGroupId) + val op = new AlterConfigOp(new ConfigEntry(GroupConfig.CONSUMER_SESSION_TIMEOUT_MS_CONFIG, newSessionTimeoutMs.toString), + OpType.SET) + admin.incrementalAlterConfigs(Map(resource -> List(op).asJavaCollection).asJava).all.get + } finally { + admin.close() + } + + TestUtils.retry(10000) { + brokers.head.groupCoordinator.groupMetadataTopicConfigs() + val configOpt = brokerServers.head.groupCoordinator.groupConfig(consumerGroupId) + assertTrue(configOpt.isPresent) + } + + val groupConfig = brokerServers.head.groupCoordinator.groupConfig(consumerGroupId).get() + assertEquals(newSessionTimeoutMs, groupConfig.sessionTimeoutMs) + } + + @ParameterizedTest + @ValueSource(strings = Array("kraft+kip848")) + def testIncrementalAlterDefaultGroupConfig(quorum: String): Unit = { + val admin = createAdminClient() + try { + val resource = new ConfigResource(ConfigResource.Type.GROUP, "") + val op = new AlterConfigOp(new ConfigEntry(GroupConfig.CONSUMER_SESSION_TIMEOUT_MS_CONFIG, "200000"), OpType.SET) + val future = admin.incrementalAlterConfigs(Map(resource -> List(op).asJavaCollection).asJava).all + TestUtils.assertFutureExceptionTypeEquals(future, classOf[InvalidRequestException]) Review Comment: Consider aligning with `testIncrementalAlterDefaultTopicConfig` -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org