-
Notifications
You must be signed in to change notification settings - Fork 46
Description
Hello Salesforce team!
First of all thanks for your great testing library. During my use kafka-junit5, I found a bug. After I run the test code, there is a situation where the temporary file cannot be deleted. I think this is a windows 10 problem. Do you have any good solution? The specific error information is as follows:
9767 [Thread-39] ERROR o.a.z.server.NIOServerCnxnFactory - Thread Thread[Thread-39,5,main] died
java.lang.RuntimeException: Failed to delete C:\Users\Z006071\AppData\Local\Temp\kafka-unit39062411522753095261\AppData\Local\Temp\kafka-unit3906241152275309526\version-2\log.1: another program is using this file and the process cannot access it.
at com.salesforce.kafka.test.Utils.lambda$recursiveDeleteOnShutdownHook$0(Utils.java:86)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.nio.file.FileSystemException: C:\Users\Z00607
at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:86)
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
at sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:269)
at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103)
at java.nio.file.Files.delete(Files.java:1126)
at com.salesforce.kafka.test.Utils$1.visitFile(Utils.java:71)
at com.salesforce.kafka.test.Utils$1.visitFile(Utils.java:68)
at java.nio.file.Files.walkFileTree(Files.java:2670)
at java.nio.file.Files.walkFileTree(Files.java:2742)
at com.salesforce.kafka.test.Utils.lambda$recursiveDeleteOnShutdownHook$0(Utils.java:68)
... 1 common frames omitted
9767 [Thread-42] ERROR o.a.z.server.NIOServerCnxnFactory - Thread Thread[Thread-42,5,main] died
java.lang.RuntimeException: Failed to delete C:\Users\Z006071\AppData\Local\Temp\kafka-unit91053153488290730721\AppData\Local\Temp\kafka-unit9105315348829073072\BodyMSG0305000500-0\00000000000000000000.index: another program is using this file and the process cannot access it.
at com.salesforce.kafka.test.Utils.lambda$recursiveDeleteOnShutdownHook$0(Utils.java:86)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.nio.file.FileSystemException: C:\Users\Z00607
at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:86)
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
at sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:269)
at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103)
at java.nio.file.Files.delete(Files.java:1126)
at com.salesforce.kafka.test.Utils$1.visitFile(Utils.java:71)
at com.salesforce.kafka.test.Utils$1.visitFile(Utils.java:68)
at java.nio.file.Files.walkFileTree(Files.java:2670)
at java.nio.file.Files.walkFileTree(Files.java:2742)
at com.salesforce.kafka.test.Utils.lambda$recursiveDeleteOnShutdownHook$0(Utils.java:68)
... 1 common frames omitted
Thanks a lot! Looking forward to your reply.
Brian