summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.junit/src
diff options
context:
space:
mode:
authorNail Samatov <sanail@yandex.ru>2020-10-27 17:37:24 +0300
committerMatthias Sohn <matthias.sohn@sap.com>2020-11-01 21:03:43 +0100
commit5dcc46591aa1ad63f19e5240eff2cabe6bb9f306 (patch)
tree7ceaa61b3658958b9f17d667758da995b316d075 /org.eclipse.jgit.junit/src
parentf802f06e7fd5a98f256b7b7727598491f563bf2f (diff)
downloadjgit-5dcc46591aa1ad63f19e5240eff2cabe6bb9f306.tar.gz
jgit-5dcc46591aa1ad63f19e5240eff2cabe6bb9f306.zip
Close Repository to fix tests failing on Windows
Fix tests failing on Windows because Repository instance is created but not closed on tear down. Change-Id: I72488ba5efeec95110926b1fbd56b7d96fca0d37 Signed-off-by: Nail Samatov <sanail@yandex.ru> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.junit/src')
-rw-r--r--org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java
index cc84f197aa..64556acc1c 100644
--- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java
+++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java
@@ -46,6 +46,7 @@ import org.eclipse.jgit.revwalk.RevWalk;
import org.eclipse.jgit.treewalk.FileTreeIterator;
import org.eclipse.jgit.util.FS;
import org.eclipse.jgit.util.FileUtils;
+import org.junit.After;
import org.junit.Before;
/**
@@ -187,6 +188,13 @@ public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase {
trash = db.getWorkTree();
}
+ @Override
+ @After
+ public void tearDown() throws Exception {
+ db.close();
+ super.tearDown();
+ }
+
/**
* Represent the state of the index in one String. This representation is
* useful when writing tests which do assertions on the state of the index.