that is not really a fix. lets think about this first. what this is doing is just not running it on Windows.
lets first investigate why this is failing on windows. all our automation seems to run on unix like machines so this issue never came up in our development/deployment. currently this means it would fail for everyone developing on windows. if you follow the discussion here https://github.com/spring-io/initializr/issues/862 they found a bug in the end in their own code not in JUnit. Could it be that we are not closing a stream/file properly and somehow this is not an issue on unix like systems. I will have a look.
Suppressed: java.nio.file.FileSystemException: C:\Users\Cliff\AppData\Local\Temp\junit1581269591057766963\TestingComplexObsSaving_9064e534-7f4b-45be-b266-a78bd131b7fb.mp3: The process cannot access the file because it is being used by another process.
that something is holding on to the file/stream in these 2 tests that are failing. So either its our test that needs to close them or the implementation has a bug that hasn’t been detected. I will investigate further. I will ask @gcliff to try again as soon as I have changed things. Thank you for letting us know
Out of curiosity whats in the temp dir that cannot be deleted by JUnit? The one it shows when the test fails C:\Users\Cliff\AppData\Local\Temp\junit3772331837415344270
And is there any difference when you run this from your IDE?
with FileCopyUtils.copy(in, out); with import import org.springframework.util.FileCopyUtils;
The FileCopyUtils from Spring closes the in and outputstream.
I would be interested if that is solving it. Then we should have closed all stream/handles on the files JUnit wants to delete. At least that is my hope