kamalcph commented on code in PR #14136: URL: https://github.com/apache/kafka/pull/14136#discussion_r1296153252
########## core/src/test/java/kafka/log/remote/RemoteLogManagerTest.java: ########## @@ -802,41 +817,25 @@ private void verifyInCache(TopicIdPartition... topicIdPartitions) { }); } - private void verifyNotInCache(TopicIdPartition... topicIdPartitions) { - Arrays.stream(topicIdPartitions).forEach(topicIdPartition -> { - assertThrows(KafkaException.class, () -> - remoteLogManager.fetchRemoteLogSegmentMetadata(topicIdPartition.topicPartition(), 0, 0L)); - }); - } - @Test void testTopicIdCacheUpdates() throws RemoteStorageException { Review Comment: Let's remove this test. ########## core/src/test/scala/unit/kafka/server/ReplicaManagerTest.scala: ########## @@ -3600,7 +3600,10 @@ class ReplicaManagerTest { "clusterId", time, _ => Optional.of(mockLog), - brokerTopicStats) + brokerTopicStats, + mock(classOf[MetadataCache]) Review Comment: Could you please extract the `mock` as variable before using it to keep it uniform? ``` val metadataCache = mock(classOf[MetadataCache]) ... when(metadataCache.getTopicId(topic))... ``` -- 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