diff options
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit')
-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(); |