From: Andrey Loskutov Date: Sun, 19 Aug 2018 16:08:50 +0000 (+0200) Subject: ReceivePackAdvertiseRefsHookTest.testSuccess() fails on Windows X-Git-Tag: v5.1.0.201808281540-m3~27 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6e4b9bd274fc50476eecdea1a0babe4972d2a623;p=jgit.git ReceivePackAdvertiseRefsHookTest.testSuccess() fails on Windows 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 --- diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackAdvertiseRefsHookTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackAdvertiseRefsHookTest.java index b77042220f..9cc6cfd393 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackAdvertiseRefsHookTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackAdvertiseRefsHookTest.java @@ -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);