cmccabe commented on a change in pull request #11649: URL: https://github.com/apache/kafka/pull/11649#discussion_r801159039
########## File path: core/src/test/scala/unit/kafka/integration/KafkaServerTestHarness.scala ########## @@ -254,11 +254,23 @@ abstract class KafkaServerTestHarness extends QuorumTestHarness { } def getTopicIds(): Map[String, Uuid] = { - getController().kafkaController.controllerContext.topicIds.toMap + if (isKRaftTest()) { + controllerServer.controller.findAllTopicIds(Long.MaxValue).get().asScala.toMap + } else { + getController().kafkaController.controllerContext.topicIds.toMap + } } def getTopicNames(): Map[Uuid, String] = { - getController().kafkaController.controllerContext.topicNames.toMap + if (isKRaftTest()) { + val result = new util.HashMap[Uuid, String]() + controllerServer.controller.findAllTopicIds(Long.MaxValue).get().entrySet().forEach { Review comment: Hmm, I don't see why that would need to be in the controller API. In general I wish this test harness function didn't exist (maybe we should mark it as @deprecated). ########## File path: core/src/test/scala/unit/kafka/integration/KafkaServerTestHarness.scala ########## @@ -254,11 +254,23 @@ abstract class KafkaServerTestHarness extends QuorumTestHarness { } def getTopicIds(): Map[String, Uuid] = { - getController().kafkaController.controllerContext.topicIds.toMap + if (isKRaftTest()) { + controllerServer.controller.findAllTopicIds(Long.MaxValue).get().asScala.toMap + } else { + getController().kafkaController.controllerContext.topicIds.toMap + } } def getTopicNames(): Map[Uuid, String] = { - getController().kafkaController.controllerContext.topicNames.toMap + if (isKRaftTest()) { + val result = new util.HashMap[Uuid, String]() + controllerServer.controller.findAllTopicIds(Long.MaxValue).get().entrySet().forEach { Review comment: Hmm, I don't see why that would need to be in the controller API. In general I wish this test harness function didn't exist (maybe we should mark it as `@deprecated`). -- 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