aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst/org/eclipse/jgit/api
diff options
context:
space:
mode:
authorChristian Halstrick <christian.halstrick@sap.com>2014-12-22 10:13:41 +0100
committerChristian Halstrick <christian.halstrick@sap.com>2014-12-22 10:13:41 +0100
commitd49c9ee84840f76604242b1ddf6cd5e6b898bdfa (patch)
treee112f06911854cab75c22efec3930f1992a0a2e9 /org.eclipse.jgit.test/tst/org/eclipse/jgit/api
parent75272ccdfc705a2e7c42cd5c27c4665c398b1b5d (diff)
downloadjgit-d49c9ee84840f76604242b1ddf6cd5e6b898bdfa.tar.gz
jgit-d49c9ee84840f76604242b1ddf6cd5e6b898bdfa.zip
Fix unit tests for windows by explicitly closing test repos
Change-Id: If5f67d739f744f19b45e6f5c7597a213fd5bf025
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit/api')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CloneCommandTest.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CloneCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CloneCommandTest.java
index ece1b324b0..ea07beed70 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CloneCommandTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CloneCommandTest.java
@@ -146,6 +146,7 @@ public class CloneCommandTest extends RepositoryTestCase {
command.setGitDir(new File(directory, ".git"));
command.setURI(fileUri());
Git git2 = command.call();
+ addRepoToClose(git2.getRepository());
assertEquals(directory, git2.getRepository().getWorkTree());
assertEquals(new File(directory, ".git"), git2.getRepository()
.getDirectory());
@@ -161,6 +162,7 @@ public class CloneCommandTest extends RepositoryTestCase {
command.setGitDir(gDir);
command.setURI(fileUri());
Git git2 = command.call();
+ addRepoToClose(git2.getRepository());
assertEquals(directory, git2.getRepository().getWorkTree());
assertEquals(gDir, git2.getRepository()
.getDirectory());
@@ -177,6 +179,7 @@ public class CloneCommandTest extends RepositoryTestCase {
command.setGitDir(gDir);
command.setURI(fileUri());
Git git2 = command.call();
+ addRepoToClose(git2.getRepository());
try {
assertNull(null, git2.getRepository().getWorkTree());
fail("Expected NoWorkTreeException");