-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IOException with pitest-junit5-plugin and junit5 @TempDir #28
Comments
Thanks for the report. Could you update the zip so it contains a complete pom.xml that reproduces the issue? |
Hi Henry, with |
@simonmarshall I'm afraid it is not possible to reproduce the issue with this pom as it relies on private dependencies. |
Sorry, try with standalone-pom.zip. |
hi @hcoles - was the latest zip enough for you to reproduce the issue? |
Please find attached pitest-maven.zip containing the following:
File file
based on the name in config, and its close() method callsfile.close()
. The ctor() logs the file used.FilePluginProvider provider
member and a@TempDir Path folder
member. Its single@Test
method creates dummy config using a path created from thefolder
member, and uses try-with-resources to create a FilePlugin with itsprovider
using the config.When I use mvn to run this test normally, the temporary folders are correctly cleaned up by junit5. However, when I run with pitest, folder clean up fails leaving 2 temporary folders behind. Interestingly, the folders that remain are different from the folder that is used for the actual test. The folder created and used by the test, ie, logged by the FileProvider create() method and FilePlugin ctor(), is correctly cleaned up. The folders that are not correctly cleaned up are generated by other mutations that seem not to involve calling the FilePluginProvider create() method.
This happens whether I use 1 thread or many threads for mvn or pitest-maven.
I'm using junit 5.4.2, pitest-junit5-plugin 0.8, pitest-maven 1.4.7.
The text was updated successfully, but these errors were encountered: