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>
This commit is contained in:
Shawn O. Pearce 2010-04-27 11:00:49 -07:00
parent f1946b0669
commit 23583e59bb
1 changed files with 9 additions and 0 deletions

View File

@ -114,6 +114,15 @@ protected void setUp() throws Exception {
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)) {