Skip to content

Commit 08db34c

Browse files
committed
close the Git object
1 parent a4a222e commit 08db34c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

opengrok-indexer/src/test/java/org/opengrok/indexer/index/IndexDatabaseTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,20 +568,22 @@ void testHistoryBasedReindexVsProjectWithDiverseRepos(boolean useCvs) throws Exc
568568
// Clone Git repository underneath the project.
569569
String cloneUrl = Path.of(repository.getSourceRoot(), "git").toFile().toURI().toString();
570570
Path repositoryRootPath = Path.of(repository.getSourceRoot(), projectName, disabledGitRepoName);
571-
Git.cloneRepository()
571+
Git git = Git.cloneRepository()
572572
.setURI(cloneUrl)
573573
.setDirectory(repositoryRootPath.toFile())
574574
.call();
575+
git.close();
575576
assertTrue(repositoryRootPath.toFile().isDirectory());
576577
}
577578

578579
// Clone Git repository underneath the project and make a change there.
579580
String cloneUrl = Path.of(repository.getSourceRoot(), "git").toFile().toURI().toString();
580581
Path repositoryRootPath = Path.of(repository.getSourceRoot(), projectName, "git");
581-
Git.cloneRepository()
582+
Git git = Git.cloneRepository()
582583
.setURI(cloneUrl)
583584
.setDirectory(repositoryRootPath.toFile())
584585
.call();
586+
git.close();
585587
assertTrue(repositoryRootPath.toFile().isDirectory());
586588
changeGitRepository(repositoryRootPath.toFile());
587589

0 commit comments

Comments
 (0)