Owen-CH-Leung commented on code in PR #14136:
URL: https://github.com/apache/kafka/pull/14136#discussion_r1303027263


##########
core/src/test/scala/unit/kafka/server/ReplicaManagerTest.scala:
##########
@@ -3624,14 +3624,18 @@ class ReplicaManagerTest {
     val remoteLogManagerConfig = new RemoteLogManagerConfig(config)
     val mockLog = mock(classOf[UnifiedLog])
     val brokerTopicStats = new 
BrokerTopicStats(java.util.Optional.of(KafkaConfig.fromProps(props)))
+    val mockMetadataCache = mock(classOf[MetadataCache])
     val remoteLogManager = new RemoteLogManager(
       remoteLogManagerConfig,
       0,
       TestUtils.tempRelativeDir("data").getAbsolutePath,
       "clusterId",
       time,
       _ => Optional.of(mockLog),
-      brokerTopicStats)
+      brokerTopicStats,
+      mockMetadataCache
+    )
+    
when(remoteLogManager.metadataCache().getTopicId(topic)).thenReturn(topicId)

Review Comment:
   Thanks. I've changed to use `mockMetadataCache` instead



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