]> source.dussan.org Git - jgit.git/commitdiff
ReceivePackAdvertiseRefsHookTest: Don't close repositories in teardown 68/89668/2
authorDavid Pursehouse <david.pursehouse@gmail.com>
Fri, 27 Jan 2017 08:08:09 +0000 (17:08 +0900)
committerMatthias Sohn <matthias.sohn@sap.com>
Sat, 28 Jan 2017 16:46:28 +0000 (17:46 +0100)
The repositories get added to the "toClose" set by createBareRepository,
and are then closed in the superclass's tearDown method.

Explicitly closing them in this test class's teardown causes the use
count to go negative when subsequently closed again by the superclass.

Change-Id: Idcbb16b4cf4bf0640d7e4ac15d1926d8a27c1251
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackAdvertiseRefsHookTest.java

index 94bc383db76898f690c702a4ea5879b6102f7d12..d66ace53e80338992c07dfe17c8999e8b16ef2e4 100644 (file)
@@ -128,16 +128,6 @@ public class ReceivePackAdvertiseRefsHookTest extends LocalDiskRepositoryTestCas
                d.update(R_PRIVATE, P);
        }
 
-       @Override
-       @After
-       public void tearDown() throws Exception {
-               if (src != null)
-                       src.close();
-               if (dst != null)
-                       dst.close();
-               super.tearDown();
-       }
-
        @Test
        public void testFilterHidesPrivate() throws Exception {
                Map<String, Ref> refs;