From 23583e59bbd707d4f10e15af7c1c4f2874e13685 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Tue, 27 Apr 2010 11:00:49 -0700 Subject: [PATCH] Fix ReceivePackRefFilterTest on Windows 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 --- .../eclipse/jgit/transport/ReceivePackRefFilterTest.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackRefFilterTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackRefFilterTest.java index 2ec0acaa3..40c719f69 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackRefFilterTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackRefFilterTest.java @@ -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 refs; TransportLocal t = new TransportLocal(src, uriOf(dst)) {