From 2b01ac3389c11be88ec875048d6a2cc4ed6903f1 Mon Sep 17 00:00:00 2001 From: Nail Samatov Date: Wed, 15 Sep 2021 21:00:59 +0300 Subject: [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 Signed-off-by: Thomas Wolf --- org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/FetchTest.java | 1 + 1 file changed, 1 insertion(+) (limited to 'org.eclipse.jgit.pgm.test') 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 -- cgit v1.2.3