Open simonmarshall opened 5 years ago
Thanks for the report. Could you update the zip so it contains a complete pom.xml that reproduces the issue?
Hi Henry, with ~standalone-pom.zip~ build with mvn clean install -Ppitest -f standalone-pom.xml
(I'm using maven 3.5.2 as later versions give us issues)
@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. Interestingly, with this pom, I can see that the folders that are not deleted are created by the FileProvider create() method and FilePlugin ctor(), because (unlike previously) they appear in the log (included in zip). However, when I run with the standalone-pom, still folder clean up fails leaving 2 temporary folders behind.
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.