m1a2st commented on code in PR #19852:
URL: https://github.com/apache/kafka/pull/19852#discussion_r2115018521


##########
core/src/test/scala/unit/kafka/server/ShareFetchAcknowledgeRequestTest.scala:
##########
@@ -116,21 +114,25 @@ class ShareFetchAcknowledgeRequestTest(cluster: 
ClusterInstance) extends GroupCo
 
     // Create a single-partition topic and find a broker which is not the 
leader
     val partitionToLeader = createTopicAndReturnLeaders(topic)
-    val topicIds = getTopicIds.asJava
+    val topicIds = getTopicIds
     val topicId = topicIds.get(topic)
     val topicIdPartition = new TopicIdPartition(topicId, new 
TopicPartition(topic, partition))
-    val topicNames = topicIds.asScala.map(_.swap).asJava
+    val topicNames = {
+      val map = new java.util.LinkedHashMap[Uuid, String]()
+      topicIds.forEach((k, v) => map.put(v, k)) // swap key and value
+      map
+    }
     val leader = partitionToLeader(topicIdPartition)
     val nonReplicaOpt = getBrokers.find(_.config.brokerId != leader)
     assertTrue(nonReplicaOpt.isDefined)
     val nonReplicaId =  nonReplicaOpt.get.config.brokerId
 
-    val send: Seq[TopicIdPartition] = Seq(topicIdPartition)
+    val send: util.List[TopicIdPartition] = util.List.of(topicIdPartition)

Review Comment:
   There are other usages like this, please clean those up as well.
   ```suggestion
       val send = util.List.of(topicIdPartition)
   ```



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

Reply via email to