Close repository after each operation

This prevents the tests failing when they try to delete the
.git files, but there is still a file lock (in Snake YAML),
so does not yet fix gh-45.
This commit is contained in:
Dave Syer
2014-12-01 11:33:46 +00:00
parent 815f9be894
commit 66de92b4e2
2 changed files with 26 additions and 15 deletions

View File

@@ -45,7 +45,7 @@ public class JGitEnvironmentRepositoryTests {
String uri = ConfigServerTestUtils.prepareLocalRepo();
repository.setUri(uri);
if (basedir.exists()) {
FileUtils.delete(basedir, FileUtils.RECURSIVE);
FileUtils.delete(basedir, FileUtils.RECURSIVE | FileUtils.RETRY);
}
}