The Jenkins git client plugin pull request [1] to evaluate JGit 7.7.0 is
failing the tests that push changes to a remote repository. The failure
is only on Windows and suggests that the pack file is being left open
by JGit 7.7.0. The same tests pass consistently with earlier versions
of JGit.
If others are aware of new failures in JGit push, I'd love to hear more.
The test failure details are available on our CI server [2]. They include:
org.apache.commons.io.IOExceptionList: 1 exception(s): [org.apache.commons.io.IOIndexedException: IOException #6: Cannot delete file: Z:\Temp\junit-3026785764829051725\junit-1153793973200\objects]
at org.apache.commons.io.IOExceptionList.checkEmpty(IOExceptionList.java:50)
at org.apache.commons.io.function.IOStream.forAll(IOStream.java:357)
at org.apache.commons.io.function.IOStreams.forAll(IOStreams.java:42)
at org.apache.commons.io.function.IOStreams.forAll(IOStreams.java:36)
at org.apache.commons.io.function.IOConsumer.forAll(IOConsumer.java:82)
at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:381)
at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1256)
at org.jenkinsci.plugins.gitclient.PushTest.removeBareRepository(PushTest.java:228)
Suppressed: org.junit.platform.commons.JUnitException: Failed to close extension context
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
Caused by: org.junit.jupiter.api.io.TempDirDeletionStrategy$DeletionException: Failed to delete temp directory Z:\Temp\junit-3026785764829051725. The following paths could not be deleted (see suppressed exceptions for details): <root>, junit-1153793973200, junit-1153793973200\objects, junit-1153793973200\objects\pack, junit-1153793973200\objects\pack\pack-1faac042fe87553d4452fed80f6dd82f68896365.pack
Suppressed: java.nio.file.DirectoryNotEmptyException: Z:\Temp\junit-3026785764829051725
Caused by: org.apache.commons.io.IOIndexedException: IOException #6: Cannot delete file: Z:\Temp\junit-3026785764829051725\junit-1153793973200\objects
at org.apache.commons.io.function.IOStream.lambda$forAll$11(IOStream.java:352)
at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:1024)
at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
at org.apache.commons.io.function.IOStream.forAll(IOStream.java:343)
... 6 more
Caused by: java.io.IOException: Cannot delete file: Z:\Temp\junit-3026785764829051725\junit-1153793973200\objects
at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1428)
at org.apache.commons.io.FileUtils.lambda$cleanDirectory$0(FileUtils.java:381)
at org.apache.commons.io.function.IOStream.lambda$forAll$11(IOStream.java:345)
... 9 more
Caused by: java.nio.file.FileSystemException: Z:\Temp\junit-3026785764829051725\junit-1153793973200\objects\pack\pack-1faac042fe87553d4452fed80f6dd82f68896365.pack: The process cannot access the file because it is being used by anot
her process
References:
[1] https://github.com/jenkinsci/git-client-plugin/pull/1770
[2] https://ci.jenkins.io/job/Plugins/job/git-client-plugin/job/PR-1770/2/testReport/