]> source.dussan.org Git - jgit.git/commitdiff
Fix ReceivePackRefFilterTest on Windows 20/620/3
authorShawn O. Pearce <spearce@spearce.org>
Tue, 27 Apr 2010 18:00:49 +0000 (11:00 -0700)
committerShawn O. Pearce <spearce@spearce.org>
Wed, 28 Apr 2010 00:21:19 +0000 (17:21 -0700)
The pack files were left open after the test ended, which meant
we could not delete them automatically when the test was over.

Make sure we close the repositories (and thus their underlying packs)
before the tear down finishes.

Bug: 310367
Change-Id: I4d2703efa4b2e0c347ea4f4475777899cf71073e
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackRefFilterTest.java

index 2ec0acaa3aa6a2fde89e52ba177c173bcf02bc6d..40c719f699722c2f040129343a6660644512e9c7 100644 (file)
@@ -114,6 +114,15 @@ public class ReceivePackRefFilterTest extends LocalDiskRepositoryTestCase {
                d.update(R_PRIVATE, P);
        }
 
+       @Override
+       protected void tearDown() throws Exception {
+               if (src != null)
+                       src.close();
+               if (dst != null)
+                       dst.close();
+               super.tearDown();
+       }
+
        public void testFilterHidesPrivate() throws Exception {
                Map<String, Ref> refs;
                TransportLocal t = new TransportLocal(src, uriOf(dst)) {