Browse Source

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 <spearce@spearce.org>
stable-0.8
Shawn O. Pearce 15 years ago
parent
commit
23583e59bb
  1. 9
      org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackRefFilterTest.java

9
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<String, Ref> refs;
TransportLocal t = new TransportLocal(src, uriOf(dst)) {

Loading…
Cancel
Save