showuon commented on code in PR #14482: URL: https://github.com/apache/kafka/pull/14482#discussion_r1351504132
########## core/src/test/scala/unit/kafka/log/remote/RemoteIndexCacheTest.scala: ########## @@ -540,6 +545,8 @@ class RemoteIndexCacheTest { "Failed to mark cache entry for cleanup after resizing cache.") TestUtils.waitUntilTrue(() => cacheEntry.isCleanStarted, "Failed to cleanup cache entry after resizing cache.") + TestUtils.waitUntilTrue(() => cacheEntry.isCleanFinished, + "Failed to finish cleanup cache entry after resizing cache.") // verify no index files on remote cache dir TestUtils.waitUntilTrue(() => !getIndexFileFromRemoteCacheDir(LogFileUtils.INDEX_FILE_SUFFIX).isPresent, Review Comment: @iit2009060 @hudeqi , adding an `isCleanFinished` flag just for test is not a good solution. In this case, could we catch the exception in the `getIndexFileFromRemoteCacheDir`? -- 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