Browse Source

ConcurrentRepackTest: Don't use deprecated WindowCache.reconfigure

Replace with calls to WindowCacheConfig.install() as mentioned in
WindowCache.reconfigure's deprecation notice.

Change-Id: Ifdb33501a2209239029c815b1e4e844ea5b56075
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
stable-4.2
David Pursehouse 9 years ago
parent
commit
4319086892
  1. 7
      org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/ConcurrentRepackTest.java

7
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/ConcurrentRepackTest.java

@ -81,15 +81,14 @@ public class ConcurrentRepackTest extends RepositoryTestCase {
public void setUp() throws Exception { public void setUp() throws Exception {
WindowCacheConfig windowCacheConfig = new WindowCacheConfig(); WindowCacheConfig windowCacheConfig = new WindowCacheConfig();
windowCacheConfig.setPackedGitOpenFiles(1); windowCacheConfig.setPackedGitOpenFiles(1);
WindowCache.reconfigure(windowCacheConfig); windowCacheConfig.install();
super.setUp(); super.setUp();
} }
@After @After
public void tearDown() throws Exception { public void tearDown() throws Exception {
super.tearDown(); super.tearDown();
WindowCacheConfig windowCacheConfig = new WindowCacheConfig(); new WindowCacheConfig().install();
WindowCache.reconfigure(windowCacheConfig);
} }
@Test @Test
@ -206,7 +205,7 @@ public class ConcurrentRepackTest extends RepositoryTestCase {
private static void whackCache() { private static void whackCache() {
final WindowCacheConfig config = new WindowCacheConfig(); final WindowCacheConfig config = new WindowCacheConfig();
config.setPackedGitOpenFiles(1); config.setPackedGitOpenFiles(1);
WindowCache.reconfigure(config); config.install();
} }
private RevObject parse(final AnyObjectId id) private RevObject parse(final AnyObjectId id)

Loading…
Cancel
Save