dan-s1 commented on PR #9551: URL: https://github.com/apache/nifi/pull/9551#issuecomment-2504059847
> Thanks for working on improving the test behavior @dan-s1. > > The failures on Windows indicate a process still using some files. This points to resources not closed, which appears to be a latent issue in some tests. > > I plan to take a closer look soon, but Derby is particularly susceptible to this issue, so I recommend reviewing the behavior of other tests that use Derby. @exceptionfactory Looking closer at the logs closer I noticed the following `Caused by: java.io.IOException: Failed to delete temp directory C:\Users\RUNNER~1\AppData\Local\Temp\junit-6685 264502979446340. The following paths could not be deleted (see suppressed exceptions for details)` I then looked at the suppressed exception which was `Suppressed: java.nio.file.DirectoryNotEmptyException: C:\Users\RUNNER~1\AppData\Local\Temp\junit-66852645029 79446340^M` Some Google searching revealed > When you encounter a java.nio.file.DirectoryNotEmptyException while using JUnit 5's @TempDir annotation, it typically means that the temporary directory created for your test still contains files when JUnit tries to delete it. I therefore added code to manually delete the directories created under the Junit 5 tempdir. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
