Search in sources :

Example 6 with DefaultCacheManager

use of org.infinispan.manager.DefaultCacheManager in project indy by Commonjava.

the class HttpProxyTest method setupClass.

@BeforeClass
public static void setupClass() {
    cacheManager = new DefaultCacheManager(new ConfigurationBuilder().simpleCache(true).build());
    contentMetadata = cacheManager.getCache("content-metadata", true);
}
Also used : DefaultCacheManager(org.infinispan.manager.DefaultCacheManager) ConfigurationBuilder(org.infinispan.configuration.cache.ConfigurationBuilder) BeforeClass(org.junit.BeforeClass)

Example 7 with DefaultCacheManager

use of org.infinispan.manager.DefaultCacheManager in project indy by Commonjava.

the class PromotionManagerTest method setupClass.

@BeforeClass
public static void setupClass() {
    cacheManager = new DefaultCacheManager(new ConfigurationBuilder().simpleCache(true).build());
    contentMetadata = cacheManager.getCache("content-metadata", true);
}
Also used : DefaultCacheManager(org.infinispan.manager.DefaultCacheManager) ConfigurationBuilder(org.infinispan.configuration.cache.ConfigurationBuilder) BeforeClass(org.junit.BeforeClass)

Example 8 with DefaultCacheManager

use of org.infinispan.manager.DefaultCacheManager in project indy by Commonjava.

the class FoloRecordCacheTest method setupClass.

//    @Rule
//    public TemporaryFolder temp = new TemporaryFolder();
@BeforeClass
public static void setupClass() {
    cacheManager = new DefaultCacheManager(new ConfigurationBuilder().simpleCache(true).build());
    sealed = cacheManager.getCache("sealed", true);
    inProgress = cacheManager.getCache("in-progress", true);
}
Also used : DefaultCacheManager(org.infinispan.manager.DefaultCacheManager) ConfigurationBuilder(org.infinispan.configuration.cache.ConfigurationBuilder) BeforeClass(org.junit.BeforeClass)

Example 9 with DefaultCacheManager

use of org.infinispan.manager.DefaultCacheManager in project indy by Commonjava.

the class KojiMavenMetadataProviderTest method setup.

@Before
public void setup() throws Exception {
    contentMetadata.clear();
    Thread.currentThread().setName(named.getMethodName());
    cacheMgr = new DefaultCacheManager();
    String mdCacheName = "koji-maven-metadata";
    cache = new CacheHandle(mdCacheName, cacheMgr.getCache(mdCacheName, true));
    kojiConfig = new IndyKojiConfig();
    kojiConfig.setEnabled(true);
    kojiConfig.setLockTimeoutSeconds(2);
    kojiConfig.setMaxConnections(2);
    kojiConfig.setMetadataTimeoutSeconds(2);
    kojiConfig.setRequestTimeoutSeconds(1);
    kojiConfig.setStorageRootUrl(server.formatUrl("kojiroot"));
    kojiConfig.setUrl(server.formatUrl("koji"));
    kojiConfig.setTargetGroups(Collections.singletonMap("public", "public"));
}
Also used : DefaultCacheManager(org.infinispan.manager.DefaultCacheManager) CacheHandle(org.commonjava.indy.subsys.infinispan.CacheHandle) IndyKojiConfig(org.commonjava.indy.koji.conf.IndyKojiConfig) Before(org.junit.Before)

Example 10 with DefaultCacheManager

use of org.infinispan.manager.DefaultCacheManager in project indy by Commonjava.

the class KojiMavenMetadataProviderTest method setupClass.

@BeforeClass
public static void setupClass() {
    cacheManager = new DefaultCacheManager(new ConfigurationBuilder().simpleCache(true).build());
    contentMetadata = cacheManager.getCache("content-metadata", true);
}
Also used : DefaultCacheManager(org.infinispan.manager.DefaultCacheManager) ConfigurationBuilder(org.infinispan.configuration.cache.ConfigurationBuilder) BeforeClass(org.junit.BeforeClass)

Aggregations

DefaultCacheManager (org.infinispan.manager.DefaultCacheManager)18 ConfigurationBuilder (org.infinispan.configuration.cache.ConfigurationBuilder)7 BeforeClass (org.junit.BeforeClass)5 Before (org.junit.Before)4 File (java.io.File)3 InputStream (java.io.InputStream)3 EmbeddedCacheManager (org.infinispan.manager.EmbeddedCacheManager)3 IOException (java.io.IOException)2 Properties (java.util.Properties)2 GlobalConfigurationBuilder (org.infinispan.configuration.global.GlobalConfigurationBuilder)2 Test (org.junit.Test)2 ByteArrayInputStream (java.io.ByteArrayInputStream)1 FileInputStream (java.io.FileInputStream)1 WeakReference (java.lang.ref.WeakReference)1 LinkedList (java.util.LinkedList)1 List (java.util.List)1 Consumer (java.util.function.Consumer)1 Function (java.util.function.Function)1 Supplier (java.util.function.Supplier)1 PostConstruct (javax.annotation.PostConstruct)1