You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// TODO: FIXME - This test is currently failing because topic ID resolution from metadata cache is not working correctly
4250
-
// The issue is that metadataCache.getTopicName(topicId) returns None even after addTopicToMetadataCache is called
4251
-
// This needs further investigation into how KRaftMetadataCache handles topic ID to name resolution
4252
4249
@Test
4253
4250
def testHandleListOffsetRequestWithTopicId(): Unit = {
4254
4251
val tp = new TopicPartition("foo", 0)
@@ -4300,8 +4297,9 @@ class KafkaApisTest extends Logging {
4300
4297
kafkaApis.handleListOffsetRequest(request)
4301
4298
4302
4299
val response = verifyNoThrottling[ListOffsetsResponse](request)
4303
-
assertTrue(response.topics.asScala.exists(_.name == tp.topic), s"Topic ${tp.topic} not found in response. Found: ${response.topics.asScala.map(_.name).mkString(", ")}")
4304
-
val topicResponse = response.topics.asScala.find(_.name == tp.topic).get
4300
+
// v12 does not return topic name, return topic id instead
4301
+
assertTrue(response.topics.asScala.exists(_.name == ""), s"Topic ${tp.topic} not found in response. Found: ${response.topics.asScala.map(_.name).mkString(", ")}")
4302
+
val topicResponse = response.topics.asScala.find(_.name == "").get
4305
4303
assertEquals(topicId, topicResponse.topicId)
4306
4304
val partitionData = topicResponse.partitions.asScala.find(_.partitionIndex == tp.partition).get
0 commit comments