jeel2420 commented on code in PR #14483:
URL: https://github.com/apache/kafka/pull/14483#discussion_r1347046103


##########
core/src/test/scala/unit/kafka/log/remote/RemoteIndexCacheTest.scala:
##########
@@ -132,7 +133,7 @@ class RemoteIndexCacheTest {
     // this call should have invoked fetchOffsetIndex, fetchTimestampIndex once
     val resultPosition = cache.lookupOffset(rlsMetadata, 
offsetPosition1.offset)
     assertEquals(offsetPosition1.position, resultPosition)
-    verifyFetchIndexInvocation(count = 1, Seq(IndexType.OFFSET, 
IndexType.TIMESTAMP))
+    verifyFetchIndexInvocation(count = 1, Seq(IndexType.OFFSET))

Review Comment:
   In the fetchIndex mock (in setup()), irrespective of the IndexType passed in 
the parameter, we are creating all the index files in the cacheDir and due to 
that, during cacheMiss, fetchIndex is getting invoked during OFFSET index fetch 
only and for other two index types, fetchIndex is not getting called as the 
index is getting fetched from the disk only.
   
   These test cases were passing earlier, as before we were creating those 
index files in tmpDir, not in the actual dir used for RemoteIndexCache, and 
after I fixed that issue, test cases started to fail, so I had to make this 
change and similar changes in other test cases as well.



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