Search in sources :

Example 51 with BeforeClass

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

the class MapReadWriteQuorumTest method initialize.

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

Example 52 with BeforeClass

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

the class MapWriteQuorumTest method initialize.

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

Example 53 with BeforeClass

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

the class TransactionalMapReadQuorumTest method initialize.

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

Example 54 with BeforeClass

use of org.junit.BeforeClass in project camel by apache.

the class SoapToSoapDontIgnoreTest method setup.

@BeforeClass
public static void setup() {
    namespacePrefixMap = new HashMap<String, String>();
    namespacePrefixMap.put("http://schemas.xmlsoap.org/soap/envelope/", "soap");
    namespacePrefixMap.put("http://www.w3.org/2001/XMLSchema", "xsd");
    namespacePrefixMap.put("http://www.w3.org/2001/XMLSchema-instance", "xsi");
    namespacePrefixMap.put("http://www.example.com/contact", "cont");
    namespacePrefixMap.put("http://www.example.com/soapheaders", "custom");
    soapjaxbModel = new SoapJaxbDataFormat("com.example.contact:com.example.soapheaders");
    soapjaxbModel.setNamespacePrefix(namespacePrefixMap);
    soapjaxbModel.setPrettyPrint(true);
    soapjaxbModel.setIgnoreUnmarshalledHeaders(false);
    soapjaxbModel.setIgnoreJAXBElement(false);
    soapjaxbModel.setElementNameStrategy(new TypeNameStrategy());
    soapjaxbModelDontIgnoreUnmarshalled = new SoapJaxbDataFormat("com.example.contact:com.example.soapheaders");
    soapjaxbModelDontIgnoreUnmarshalled.setNamespacePrefix(namespacePrefixMap);
    soapjaxbModelDontIgnoreUnmarshalled.setPrettyPrint(true);
    soapjaxbModelDontIgnoreUnmarshalled.setIgnoreUnmarshalledHeaders(false);
    soapjaxbModelDontIgnoreUnmarshalled.setElementNameStrategy(new TypeNameStrategy());
}
Also used : TypeNameStrategy(org.apache.camel.dataformat.soap.name.TypeNameStrategy) BeforeClass(org.junit.BeforeClass)

Example 55 with BeforeClass

use of org.junit.BeforeClass in project camel by apache.

the class SoapToSoapIgnoreTest method setup.

@BeforeClass
public static void setup() {
    namespacePrefixMap = new HashMap<String, String>();
    namespacePrefixMap.put("http://schemas.xmlsoap.org/soap/envelope/", "soap");
    namespacePrefixMap.put("http://www.w3.org/2001/XMLSchema", "xsd");
    namespacePrefixMap.put("http://www.w3.org/2001/XMLSchema-instance", "xsi");
    namespacePrefixMap.put("http://www.example.com/contact", "cont");
    namespacePrefixMap.put("http://www.example.com/soapheaders", "custom");
    soapjaxbModel = new SoapJaxbDataFormat("com.example.contact:com.example.soapheaders");
    soapjaxbModel.setNamespacePrefix(namespacePrefixMap);
    soapjaxbModel.setPrettyPrint(true);
    soapjaxbModel.setIgnoreUnmarshalledHeaders(false);
    soapjaxbModel.setIgnoreJAXBElement(false);
    soapjaxbModel.setElementNameStrategy(new TypeNameStrategy());
    soapjaxbModelIgnoreUnmarshalled = new SoapJaxbDataFormat("com.example.contact:com.example.soapheaders");
    soapjaxbModelIgnoreUnmarshalled.setNamespacePrefix(namespacePrefixMap);
    soapjaxbModelIgnoreUnmarshalled.setPrettyPrint(true);
    soapjaxbModelIgnoreUnmarshalled.setIgnoreUnmarshalledHeaders(true);
    soapjaxbModelIgnoreUnmarshalled.setElementNameStrategy(new TypeNameStrategy());
}
Also used : TypeNameStrategy(org.apache.camel.dataformat.soap.name.TypeNameStrategy) 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