iit2009060 commented on code in PR #15060: URL: https://github.com/apache/kafka/pull/15060#discussion_r1440126550
########## core/src/test/java/kafka/log/remote/RemoteLogManagerTest.java: ########## @@ -2065,6 +2066,11 @@ public Optional<RemoteLogSegmentMetadata> fetchRemoteLogSegmentMetadata(TopicPar return Optional.of(segmentMetadata); } + public Optional<RemoteLogSegmentMetadata> findNextSegmentMetadata(RemoteLogSegmentMetadata segmentMetadata, + Option<LeaderEpochFileCache> leaderEpochFileCacheOption) { + return Optional.ofNullable(null); Review Comment: done. ########## core/src/test/java/kafka/log/remote/RemoteLogManagerTest.java: ########## @@ -2161,6 +2167,85 @@ RecordBatch findFirstBatch(RemoteLogInputStream remoteLogInputStream, long offse } } + @Test + public void testReadForFirstBatchInLogCompaction() throws RemoteStorageException, IOException { + FileInputStream fileInputStream = mock(FileInputStream.class); + RemoteLogInputStream remoteLogInputStream = mock(RemoteLogInputStream.class); + ClassLoaderAwareRemoteStorageManager rsmManager = mock(ClassLoaderAwareRemoteStorageManager.class); + RemoteLogSegmentMetadata segmentMetadata = mock(RemoteLogSegmentMetadata.class); + LeaderEpochFileCache cache = mock(LeaderEpochFileCache.class); + when(cache.epochForOffset(anyLong())).thenReturn(OptionalInt.of(1)); + + when(remoteStorageManager.fetchLogSegment(any(RemoteLogSegmentMetadata.class), anyInt())) Review Comment: done -- 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