GitConstructionTest: Remove unnecessary calls to Repository.close()
The repositories are already closed in the superclass teardown due to being added to the "toClose" set. Change-Id: I768ba8a02fc585907687caf37e2e283434016c04 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
This commit is contained in:
parent
7dca5dc9f3
commit
a9a3af4af7
|
@ -55,7 +55,6 @@
|
|||
import org.eclipse.jgit.junit.RepositoryTestCase;
|
||||
import org.eclipse.jgit.lib.Repository;
|
||||
import org.eclipse.jgit.util.FileUtils;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
|
@ -80,14 +79,6 @@ public void setUp() throws Exception {
|
|||
addRepoToClose(bareRepo);
|
||||
}
|
||||
|
||||
@Override
|
||||
@After
|
||||
public void tearDown() throws Exception {
|
||||
db.close();
|
||||
bareRepo.close();
|
||||
super.tearDown();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testWrap() throws JGitInternalException, GitAPIException {
|
||||
Git git = Git.wrap(db);
|
||||
|
@ -141,7 +132,6 @@ public void testOpen() throws IOException, JGitInternalException,
|
|||
public void testClose() throws IOException, JGitInternalException,
|
||||
GitAPIException {
|
||||
File workTree = db.getWorkTree();
|
||||
db.close();
|
||||
Git git = Git.open(workTree);
|
||||
git.gc().setExpire(null).call();
|
||||
git.checkout().setName(git.getRepository().resolve("HEAD^").getName())
|
||||
|
|
Loading…
Reference in New Issue