aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm.test
diff options
context:
space:
mode:
authorNail Samatov <sanail@yandex.ru>2021-09-15 21:00:59 +0300
committerMatthias Sohn <matthias.sohn@sap.com>2022-01-30 17:16:02 -0500
commit2b01ac3389c11be88ec875048d6a2cc4ed6903f1 (patch)
tree9891d1d9df4bb21a6646bebc79dad27caff37960 /org.eclipse.jgit.pgm.test
parent8633ea4f07cbe10706a9edd1301f13aebe5be942 (diff)
downloadjgit-2b01ac3389c11be88ec875048d6a2cc4ed6903f1.tar.gz
jgit-2b01ac3389c11be88ec875048d6a2cc4ed6903f1.zip
[test] Fix closing of test repositories
Fix tests failing on Windows because Repository instance is created but not closed on tear down. Fix repositories closed twice, except in tests that test this behavior explicitly. Name the temporary directories the tests run in after the test method; that makes it easier to figure out in which tests repositories are closed twice if it should occur again in the future. Bug: 550111 Change-Id: I9398b58f0f36d2c29236d2a9a8599117d9083980 Signed-off-by: Nail Samatov <sanail@yandex.ru> Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.jgit.pgm.test')
-rw-r--r--org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/FetchTest.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/FetchTest.java b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/FetchTest.java
index 564bd5fa94..1c6b7839d3 100644
--- a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/FetchTest.java
+++ b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/FetchTest.java
@@ -33,6 +33,7 @@ public class FetchTest extends CLIRepositoryTestCase {
git.commit().setMessage("initial commit").call();
Repository remoteRepository = createWorkRepository();
+ addRepoToClose(remoteRepository);
remoteGit = new Git(remoteRepository);
// setup the first repository to fetch from the second repository