diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2024-09-03 19:35:16 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2024-09-03 19:40:47 +0200 |
commit | 45689b4a2c39b820143140aa7185f23f445067ea (patch) | |
tree | b7602ac36a64a0091dfe37c5985cad835979a09b /org.eclipse.jgit.test | |
parent | b4bdf9841c286116955b2b31f776af2339950036 (diff) | |
download | jgit-45689b4a2c39b820143140aa7185f23f445067ea.tar.gz jgit-45689b4a2c39b820143140aa7185f23f445067ea.zip |
Revert "Remove deprecated
LocalDiskRepositoryTestCase#create(boolean,boolean)"
This reverts commit 3682611cef41ade46cf5ac194f0674b46367a395.
Reason: removing this deprecated method caused a ton of warnings about
closing an already closed Repository when running tests.
Change-Id: I3e9f224c55c167f92dad39caabfab5e43cf54cfb
Diffstat (limited to 'org.eclipse.jgit.test')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryCacheTest.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryCacheTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryCacheTest.java index 2a6551787f..cec69c4998 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryCacheTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryCacheTest.java @@ -159,8 +159,8 @@ public class RepositoryCacheTest extends RepositoryTestCase { @Test public void testRepositoryUsageCountWithRegisteredRepository() throws IOException { - @SuppressWarnings("resource") // We are testing the close() method - Repository repo = createRepository(false); + @SuppressWarnings({"resource", "deprecation"}) // We are testing the close() method + Repository repo = createRepository(false, false); assertEquals(1, repo.useCnt.get()); RepositoryCache.register(repo); assertEquals(1, repo.useCnt.get()); @@ -207,8 +207,10 @@ public class RepositoryCacheTest extends RepositoryTestCase { @Test public void testRepositoryUnregisteringWhenExpired() throws Exception { - Repository repoA = createRepository(true); - Repository repoB = createRepository(true); + @SuppressWarnings({"resource", "deprecation"}) // We are testing the close() method + Repository repoA = createRepository(true, false); + @SuppressWarnings({"resource", "deprecation"}) // We are testing the close() method + Repository repoB = createRepository(true, false); Repository repoC = createBareRepository(); RepositoryCache.register(repoA); RepositoryCache.register(repoB); @@ -241,7 +243,8 @@ public class RepositoryCacheTest extends RepositoryTestCase { @Test public void testReconfigure() throws InterruptedException, IOException { - Repository repo = createRepository(false); + @SuppressWarnings({"resource", "deprecation"}) // We are testing the close() method + Repository repo = createRepository(false, false); RepositoryCache.register(repo); assertTrue(RepositoryCache.isCached(repo)); repo.close(); |