]> source.dussan.org Git - jgit.git/commitdiff
ReceivePackAdvertiseRefsHookTest.testSuccess() fails on Windows 65/127665/1
authorAndrey Loskutov <loskutov@gmx.de>
Sun, 19 Aug 2018 16:08:50 +0000 (18:08 +0200)
committerAndrey Loskutov <loskutov@gmx.de>
Sun, 19 Aug 2018 18:24:20 +0000 (20:24 +0200)
The TransportLocal object created in
newTransportLocalWithStrictValidation() closes original repository and
increments use of test internal "dst" repository, but never decrements
use. Because of this, pack file is not closed and during tearDown on
Windows system is unable to delete it.

Bug: 538068
Change-Id: I96df8e91abfee78c91cf26c2466718e9145a69db
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackAdvertiseRefsHookTest.java

index b77042220f60c08e8b28d46184baa09c4e751ac5..9cc6cfd393279be19e137aeb341b24688f3b9bf8 100644 (file)
@@ -259,6 +259,7 @@ public class ReceivePackAdvertiseRefsHookTest extends LocalDiskRepositoryTestCas
                try (TransportLocal t = newTransportLocalWithStrictValidation()) {
                        t.setPushThin(true);
                        r = t.push(PM, Collections.singleton(u));
+                       dst.close();
                }
 
                assertNotNull("have result", r);