diff options
author | Andrey Loskutov <loskutov@gmx.de> | 2018-08-19 20:53:31 +0200 |
---|---|---|
committer | Andrey Loskutov <loskutov@gmx.de> | 2018-08-19 20:53:31 +0200 |
commit | 5a95e7e74bd18e0719306ac7363b7b60964ff915 (patch) | |
tree | f1a270f0327c2aed7c5632df3de8bff192bee20a /org.eclipse.jgit.test/tst | |
parent | c23d024ea8fc4a8330a134138d45e61d60403a97 (diff) | |
download | jgit-5a95e7e74bd18e0719306ac7363b7b60964ff915.tar.gz jgit-5a95e7e74bd18e0719306ac7363b7b60964ff915.zip |
SubmoduleDeinitTest fails on Windows
Bug: 538068
Change-Id: I982e8b12936582e8e119f45d7a3bf4888d3e0e1a
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
Diffstat (limited to 'org.eclipse.jgit.test/tst')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/submodule/SubmoduleDeinitTest.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/submodule/SubmoduleDeinitTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/submodule/SubmoduleDeinitTest.java index df4b96398f..815ce9b350 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/submodule/SubmoduleDeinitTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/submodule/SubmoduleDeinitTest.java @@ -136,10 +136,12 @@ public class SubmoduleDeinitTest extends RepositoryTestCase { generator.next(); //want to create a commit inside the repo... - Repository submoduleLocalRepo = generator.getRepository(); - JGitTestUtil.writeTrashFile(submoduleLocalRepo, "file.txt", "new data"); - Git.wrap(submoduleLocalRepo).commit().setAll(true).setMessage("local commit").call(); - + try (Repository submoduleLocalRepo = generator.getRepository()) { + JGitTestUtil.writeTrashFile(submoduleLocalRepo, "file.txt", + "new data"); + Git.wrap(submoduleLocalRepo).commit().setAll(true) + .setMessage("local commit").call(); + } SubmoduleDeinitResult result = runDeinit(new SubmoduleDeinitCommand(db).addPath("sub")); assertEquals(path, result.getPath()); assertEquals(SubmoduleDeinitCommand.SubmoduleDeinitStatus.DIRTY, result.getStatus()); |