akhileshchg commented on code in PR #12108: URL: https://github.com/apache/kafka/pull/12108#discussion_r865146433
########## core/src/test/scala/integration/kafka/api/PlaintextAdminIntegrationTest.scala: ########## @@ -1751,13 +1777,32 @@ class PlaintextAdminIntegrationTest extends BaseAdminIntegrationTest { new AlterConfigOp(new ConfigEntry(LogConfig.CleanupPolicyProp, LogConfig.Compact + "," + LogConfig.Delete), AlterConfigOp.OpType.SUBTRACT) ).asJavaCollection - alterResult = client.incrementalAlterConfigs(Map( + alterConfigs = Map( topic1Resource -> topic1AlterConfigs, topic2Resource -> topic2AlterConfigs - ).asJava) + ) + alterResult = client.incrementalAlterConfigs(alterConfigs.asJava) assertEquals(Set(topic1Resource, topic2Resource).asJava, alterResult.values.keySet) alterResult.all.get + if (isKRaftTest()) { Review Comment: I think this can be a util function: ``` TestUtils.waitForMetadataPropagation(brokers, condition: KRaftMetadataCache => Boolean): Unit = { assertTrue(isKRaftTest()) TestUtils.waitUntilTrue(() => { brokers.forall { broker => condition(broker.metadataCache.asInstanceOf[KRaftMetadataCache]) }, "Metadata is not propgated to all brokers") } ``` and we can call it as: ``` TestUtils.waitForMetadataPropagation(brokers, metadataCache => { // validation logic. }) ``` -- 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