pitest / pitest-junit5-plugin

JUnit 5 test framework support for Pitest
Apache License 2.0
74 stars 26 forks source link

IOException with pitest-junit5-plugin and junit5 @TempDir #28

Open simonmarshall opened 5 years ago

simonmarshall commented 5 years ago

Please find attached pitest-maven.zip containing the following:

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.

hcoles commented 5 years ago

Thanks for the report. Could you update the zip so it contains a complete pom.xml that reproduces the issue?

simonmarshall commented 5 years ago

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)

hcoles commented 5 years ago

@simonmarshall I'm afraid it is not possible to reproduce the issue with this pom as it relies on private dependencies.

simonmarshall commented 5 years ago

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.

simonmarshall commented 5 years ago

hi @hcoles - was the latest zip enough for you to reproduce the issue?