diff options
author | Nail Samatov <sanail@yandex.ru> | 2021-09-15 21:00:59 +0300 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2022-01-30 17:16:02 -0500 |
commit | 2b01ac3389c11be88ec875048d6a2cc4ed6903f1 (patch) | |
tree | 9891d1d9df4bb21a6646bebc79dad27caff37960 /org.eclipse.jgit.http.test | |
parent | 8633ea4f07cbe10706a9edd1301f13aebe5be942 (diff) | |
download | jgit-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.http.test')
-rw-r--r-- | org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HookMessageTest.java | 1 | ||||
-rw-r--r-- | org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/MeasurePackSizeTest.java | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HookMessageTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HookMessageTest.java index db9f2ae3d7..20de2567c1 100644 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HookMessageTest.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HookMessageTest.java @@ -97,6 +97,7 @@ public class HookMessageTest extends AllFactoriesHttpTestCase { server.setUp(); remoteRepository = src.getRepository(); + addRepoToClose(remoteRepository); remoteURI = toURIish(app, srcName); StoredConfig cfg = remoteRepository.getConfig(); diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/MeasurePackSizeTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/MeasurePackSizeTest.java index 9ffa19efef..000eecdccf 100644 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/MeasurePackSizeTest.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/MeasurePackSizeTest.java @@ -90,6 +90,7 @@ public class MeasurePackSizeTest extends AllFactoriesHttpTestCase { server.setUp(); remoteRepository = src.getRepository(); + addRepoToClose(remoteRepository); remoteURI = toURIish(app, srcName); StoredConfig cfg = remoteRepository.getConfig(); |