Search in sources :

Example 31 with BeforeClass

use of org.junit.BeforeClass in project hazelcast by hazelcast.

the class ClientMapWriteQuorumTest method initialize.

@BeforeClass
public static void initialize() throws Exception {
    QuorumConfig quorumConfig = new QuorumConfig();
    quorumConfig.setName(QUORUM_ID);
    quorumConfig.setEnabled(true);
    quorumConfig.setSize(3);
    quorumConfig.setType(QuorumType.WRITE);
    MapConfig mapConfig = new MapConfig(MAP_NAME_PREFIX + "*");
    mapConfig.setQuorumName(QUORUM_ID);
    factory = new TestHazelcastFactory();
    cluster = new PartitionedCluster(factory).partitionFiveMembersThreeAndTwo(mapConfig, quorumConfig);
    initializeClients();
    verifyClients();
}
Also used : QuorumConfig(com.hazelcast.config.QuorumConfig) TestHazelcastFactory(com.hazelcast.client.test.TestHazelcastFactory) PartitionedCluster(com.hazelcast.quorum.PartitionedCluster) MapConfig(com.hazelcast.config.MapConfig) BeforeClass(org.junit.BeforeClass)

Example 32 with BeforeClass

use of org.junit.BeforeClass in project spring-security by spring-projects.

the class SpringCacheBasedAclCacheTests method initCacheManaer.

@BeforeClass
public static void initCacheManaer() {
    cacheManager = new ConcurrentMapCacheManager();
    // Use disk caching immediately (to test for serialization issue reported in
    // SEC-527)
    cacheManager.getCache("springcasebasedacltests");
}
Also used : ConcurrentMapCacheManager(org.springframework.cache.concurrent.ConcurrentMapCacheManager) BeforeClass(org.junit.BeforeClass)

Example 33 with BeforeClass

use of org.junit.BeforeClass in project spring-security by spring-projects.

the class EhCacheBasedTicketCacheTests method initCacheManaer.

// ~ Methods
// ========================================================================================================
@BeforeClass
public static void initCacheManaer() {
    cacheManager = CacheManager.create();
    cacheManager.addCache(new Cache("castickets", 500, false, false, 30, 30));
}
Also used : EhCacheBasedTicketCache(org.springframework.security.cas.authentication.EhCacheBasedTicketCache) Cache(net.sf.ehcache.Cache) BeforeClass(org.junit.BeforeClass)

Example 34 with BeforeClass

use of org.junit.BeforeClass in project spring-security by spring-projects.

the class SpringCacheBasedTicketCacheTests method initCacheManaer.

// ~ Methods
// ========================================================================================================
@BeforeClass
public static void initCacheManaer() {
    cacheManager = new ConcurrentMapCacheManager();
    cacheManager.getCache("castickets");
}
Also used : ConcurrentMapCacheManager(org.springframework.cache.concurrent.ConcurrentMapCacheManager) BeforeClass(org.junit.BeforeClass)

Example 35 with BeforeClass

use of org.junit.BeforeClass in project spring-security by spring-projects.

the class EhCacheBasedUserCacheTests method initCacheManaer.

// ~ Methods
// ========================================================================================================
@BeforeClass
public static void initCacheManaer() {
    cacheManager = CacheManager.create();
    cacheManager.addCache(new Cache("ehcacheusercachetests", 500, false, false, 30, 30));
}
Also used : EhCacheBasedUserCache(org.springframework.security.core.userdetails.cache.EhCacheBasedUserCache) Cache(net.sf.ehcache.Cache) BeforeClass(org.junit.BeforeClass)

Aggregations

BeforeClass (org.junit.BeforeClass)2813 File (java.io.File)388 Configuration (org.apache.hadoop.conf.Configuration)287 IOException (java.io.IOException)128 Connection (java.sql.Connection)126 Properties (java.util.Properties)108 Reader (java.io.Reader)99 SqlSessionFactoryBuilder (org.apache.ibatis.session.SqlSessionFactoryBuilder)98 Provisioning (com.zimbra.cs.account.Provisioning)93 ScriptRunner (org.apache.ibatis.jdbc.ScriptRunner)91 HiveConf (org.apache.hadoop.hive.conf.HiveConf)86 MockProvisioning (com.zimbra.cs.account.MockProvisioning)77 Path (org.apache.hadoop.fs.Path)75 URI (java.net.URI)73 HashMap (java.util.HashMap)70 URL (java.net.URL)63 SqlSession (org.apache.ibatis.session.SqlSession)62 MiniDFSCluster (org.apache.hadoop.hdfs.MiniDFSCluster)61 Injector (com.google.inject.Injector)57 CConfiguration (co.cask.cdap.common.conf.CConfiguration)56