jeel2420 commented on code in PR #14483: URL: https://github.com/apache/kafka/pull/14483#discussion_r1348624218
########## core/src/test/scala/unit/kafka/log/remote/RemoteIndexCacheTest.scala: ########## @@ -568,27 +621,26 @@ class RemoteIndexCacheTest { } private def verifyFetchIndexInvocation(count: Int, - indexTypes: Seq[IndexType] = - Seq(IndexType.OFFSET, IndexType.TIMESTAMP, IndexType.TRANSACTION)): Unit = { + indexTypes: Seq[IndexType]): Unit = { for (indexType <- indexTypes) { verify(rsm, times(count)).fetchIndex(any(classOf[RemoteLogSegmentMetadata]), ArgumentMatchers.eq(indexType)) } } private def createTxIndexForSegmentMetadata(metadata: RemoteLogSegmentMetadata): TransactionIndex = { - val txnIdxFile = remoteTransactionIndexFile(tpDir, metadata) + val txnIdxFile = remoteTransactionIndexFile(new File(tpDir, DIR_NAME), metadata) txnIdxFile.createNewFile() new TransactionIndex(metadata.startOffset(), txnIdxFile) } private def createTimeIndexForSegmentMetadata(metadata: RemoteLogSegmentMetadata): TimeIndex = { val maxEntries = (metadata.endOffset() - metadata.startOffset()).asInstanceOf[Int] - new TimeIndex(remoteTimeIndexFile(tpDir, metadata), metadata.startOffset(), maxEntries * 12) + new TimeIndex(remoteTimeIndexFile(new File(tpDir, DIR_NAME), metadata), metadata.startOffset(), maxEntries * 12) Review Comment: Make sense. Reverted the change. -- 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