]> source.dussan.org Git - gitblit.git/commitdiff
Fix broken unit test on Windows
authorJames Moger <james.moger@gitblit.com>
Tue, 23 Oct 2012 21:48:48 +0000 (17:48 -0400)
committerJames Moger <james.moger@gitblit.com>
Tue, 23 Oct 2012 21:48:48 +0000 (17:48 -0400)
tests/com/gitblit/tests/GitServletTest.java

index 17d462ac61ef42ccd64bd4f582fb3fd9358fc5fe..e65c61cbd6d760fd51d2e44df089f6da848109f1 100644 (file)
@@ -611,11 +611,13 @@ public class GitServletTest {
                }\r
                \r
                File personalRepo = new File(GitBlitSuite.REPOSITORIES, MessageFormat.format("~{0}/ticgit.git", user.username));\r
+               GitBlitSuite.close(personalRepo);\r
                if (personalRepo.exists()) {\r
                        FileUtils.delete(personalRepo, FileUtils.RECURSIVE);\r
                }\r
 \r
                File projectRepo = new File(GitBlitSuite.REPOSITORIES, "project/ticgit.git");\r
+               GitBlitSuite.close(projectRepo);\r
                if (projectRepo.exists()) {\r
                        FileUtils.delete(projectRepo, FileUtils.RECURSIVE);\r
                }\r
@@ -628,6 +630,8 @@ public class GitServletTest {
                clone.setCredentialsProvider(cp);\r
                Git git = clone.call();\r
                \r
+               GitBlitSuite.close(personalRepo);\r
+               \r
                // add a personal repository remote and a project remote\r
                git.getRepository().getConfig().setString("remote", "user", "url", MessageFormat.format("{0}/git/~{1}/ticgit.git", url, user.username));\r
                git.getRepository().getConfig().setString("remote", "project", "url", MessageFormat.format("{0}/git/project/ticgit.git", url));\r