Search in sources :

Example 1 with IndyKojiConfig

use of org.commonjava.indy.koji.conf.IndyKojiConfig 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)

Aggregations

IndyKojiConfig (org.commonjava.indy.koji.conf.IndyKojiConfig)1 CacheHandle (org.commonjava.indy.subsys.infinispan.CacheHandle)1 DefaultCacheManager (org.infinispan.manager.DefaultCacheManager)1 Before (org.junit.Before)1