ES test java.io.IOException: Could not remove the following files

when I test EncryptDirectoryWrapperTest which extends BaseDirectoryTestCase, it shows error:

java.io.IOException: Could not remove the following files (in the order of attempts):
C:\Users\anthonypeng\AppData\Local\Temp\org.noop.essecure.store.encrypt.EncryptDirectoryWrapperTest_4F7D51BC9DD97FD6-001\testCopy-001: java.nio.file.DirectoryNotEmptyException: C:\Users\anthonypeng\AppData\Local\Temp\org.noop.essecure.store.encrypt.EncryptDirectoryWrapperTest_4F7D51BC9DD97FD6-001\testCopy-001
C:\Users\anthonypeng\AppData\Local\Temp\org.noop.essecure.store.encrypt.EncryptDirectoryWrapperTest_4F7D51BC9DD97FD6-001\testCopy-001_1.tim: java.nio.file.AccessDeniedException: C:\Users\anthonypeng\AppData\Local\Temp\org.noop.essecure.store.encrypt.EncryptDirectoryWrapperTest_4F7D51BC9DD97FD6-001\testCopy-001_1.tim
C:\Users\anthonypeng\AppData\Local\Temp\org.noop.essecure.store.encrypt.EncryptDirectoryWrapperTest_4F7D51BC9DD97FD6-001: java.nio.file.DirectoryNotEmptyException: C:\Users\anthonypeng\AppData\Local\Temp\org.noop.essecure.store.encrypt.EncryptDirectoryWrapperTest_4F7D51BC9DD97FD6-001

at __randomizedtesting.SeedInfo.seed([4F7D51BC9DD97FD6]:0)
at org.apache.lucene.util.IOUtils.rm(IOUtils.java:329)
at org.apache.lucene.util.TestRuleTemporaryFilesCleanup.afterAlways(TestRuleTemporaryFilesCleanup.java:216)
at com.carrotsearch.randomizedtesting.rules.TestRuleAdapter$1.afterAlways(TestRuleAdapter.java:31)
at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:43)
at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
at org.apache.lucene.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:53)
at org.apache.lucene.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:47)
at org.apache.lucene.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:64)
at org.apache.lucene.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:54)
at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:368)
at java.base/java.lang.Thread.run(Thread.java:844)

How to make this test pass ?
thanks!

I'm sorry but EncryptDirectoryWrapperTest does not seem to be part of the Elasticsearch source tree, where is this class coming from? If it is from another product or plugin, you might want to to ask in that specific forum.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.