TaiJuWu commented on code in PR #18004: URL: https://github.com/apache/kafka/pull/18004#discussion_r1959253801
########## core/src/test/scala/unit/kafka/log/remote/RemoteIndexCacheTest.scala: ########## @@ -620,27 +638,29 @@ class RemoteIndexCacheTest { val entry0 = cache.getIndexEntry(metadataList(0)) val entry1 = cache.getIndexEntry(metadataList(1)) - cache.getIndexEntry(metadataList(2)) + val entry2 = cache.getIndexEntry(metadataList(2)) + val entries = List(entry0, entry1, entry2) assertCacheSize(2) - verifyEntryIsEvicted(metadataList(0), entry0) + verifyEntryIsEvicted(metadataList, entries, 1) // Reduce cache capacity to only store 1 entry cache.resizeCacheSize(1 * estimateEntryBytesSize) assertCacheSize(1) - verifyEntryIsEvicted(metadataList(1), entry1) + verifyEntryIsEvicted(metadataList, entries, 2) Review Comment: Done! Thanks for your detail explain and suggestion. The change is https://github.com/apache/kafka/pull/18004/commits/2f462967a040b3c419ce27a5f8bb2434cadc8bf0 -- 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