hudeqi commented on code in PR #14511:
URL: https://github.com/apache/kafka/pull/14511#discussion_r1359435180


##########
core/src/test/scala/unit/kafka/log/remote/RemoteIndexCacheTest.scala:
##########
@@ -525,7 +525,7 @@ class RemoteIndexCacheTest {
           .filter(path => path.getFileName.toString.endsWith(suffix))
           .findAny()
       } catch {
-        case _: FileNotFoundException => Optional.empty()
+        case _: NoSuchFileException => Optional.empty()

Review Comment:
   @showuon Ah, I think the `FileNotFoundException` added here may not be the 
correct exception thrown. This is what I discovered when merging the latest 
trunk:
   
https://ci-builds.apache.org/blue/organizations/jenkins/Kafka%2Fkafka-pr/detail/PR-14511/4/tests
   
   错误
   java.io.UncheckedIOException: java.nio.file.NoSuchFileException: 
/tmp/kafka-RemoteIndexCacheTest256653951450751431/x1qGOc3yRE6shFMJVKArpw:foo-0/remote-log-index-cache/0_TGK1Vu0nTCCcb0TN379YFA.timeindex.deleted
   栈跟踪
   java.io.UncheckedIOException: java.nio.file.NoSuchFileException: 
/tmp/kafka-RemoteIndexCacheTest256653951450751431/x1qGOc3yRE6shFMJVKArpw:foo-0/remote-log-index-cache/0_TGK1Vu0nTCCcb0TN379YFA.timeindex.deleted
        at 
java.nio.file.FileTreeIterator.fetchNextIfNeeded(FileTreeIterator.java:88)
        at java.nio.file.FileTreeIterator.hasNext(FileTreeIterator.java:104)
        at 
java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1811)
        at 
java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
        at 
java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:499)



##########
core/src/test/scala/unit/kafka/log/remote/RemoteIndexCacheTest.scala:
##########
@@ -525,7 +525,7 @@ class RemoteIndexCacheTest {
           .filter(path => path.getFileName.toString.endsWith(suffix))
           .findAny()
       } catch {
-        case _: FileNotFoundException => Optional.empty()
+        case _: NoSuchFileException => Optional.empty()

Review Comment:
   @showuon Ah, I think the `FileNotFoundException` added here may not be the 
correct exception thrown. This is what I discovered when merging the latest 
trunk:
   
https://ci-builds.apache.org/blue/organizations/jenkins/Kafka%2Fkafka-pr/detail/PR-14511/4/tests
   
   错误
   java.io.UncheckedIOException: java.nio.file.NoSuchFileException: 
/tmp/kafka-RemoteIndexCacheTest256653951450751431/x1qGOc3yRE6shFMJVKArpw:foo-0/remote-log-index-cache/0_TGK1Vu0nTCCcb0TN379YFA.timeindex.deleted
   栈跟踪
   java.io.UncheckedIOException: java.nio.file.NoSuchFileException: 
/tmp/kafka-RemoteIndexCacheTest256653951450751431/x1qGOc3yRE6shFMJVKArpw:foo-0/remote-log-index-cache/0_TGK1Vu0nTCCcb0TN379YFA.timeindex.deleted
        at 
java.nio.file.FileTreeIterator.fetchNextIfNeeded(FileTreeIterator.java:88)
        at java.nio.file.FileTreeIterator.hasNext(FileTreeIterator.java:104)
        at 
java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1811)
        at 
java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
        at 
java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:499)



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