Search in sources :

Example 81 with DistributedSystem

use of org.apache.geode.distributed.DistributedSystem in project geode by apache.

the class HARegionQueueDUnitTest method createCache.

/**
   * create cache
   */
private InternalCache createCache() throws CacheException {
    Properties props = new Properties();
    DistributedSystem ds = getSystem(props);
    ds.disconnect();
    ds = getSystem(props);
    InternalCache cache = null;
    cache = (InternalCache) CacheFactory.create(ds);
    if (cache == null) {
        // TODO: never throw an anonymous inner class
        throw new CacheException("CacheFactory.create() returned null ") {
        };
    }
    return cache;
}
Also used : CacheException(org.apache.geode.cache.CacheException) InternalCache(org.apache.geode.internal.cache.InternalCache) Properties(java.util.Properties) DistributedSystem(org.apache.geode.distributed.DistributedSystem)

Example 82 with DistributedSystem

use of org.apache.geode.distributed.DistributedSystem in project geode by apache.

the class HARQueueNewImplDUnitTest method createCache.

private void createCache(Properties props) throws Exception {
    props.setProperty(DELTA_PROPAGATION, "false");
    DistributedSystem ds = getSystem(props);
    ds.disconnect();
    ds = getSystem(props);
    assertNotNull(ds);
    cache = CacheFactory.create(ds);
    assertNotNull(cache);
}
Also used : DistributedSystem(org.apache.geode.distributed.DistributedSystem)

Example 83 with DistributedSystem

use of org.apache.geode.distributed.DistributedSystem in project geode by apache.

the class ClearPropagationDUnitTest method createCache.

private void createCache(Properties props) throws Exception {
    DistributedSystem ds = getSystem(props);
    cache = CacheFactory.create(ds);
    assertNotNull(cache);
}
Also used : DistributedSystem(org.apache.geode.distributed.DistributedSystem)

Example 84 with DistributedSystem

use of org.apache.geode.distributed.DistributedSystem in project geode by apache.

the class Bug36269DUnitTest method createCache.

private void createCache(Properties props) throws Exception {
    DistributedSystem ds = getSystem(props);
    cache = CacheFactory.create(ds);
    assertNotNull(cache);
}
Also used : DistributedSystem(org.apache.geode.distributed.DistributedSystem)

Example 85 with DistributedSystem

use of org.apache.geode.distributed.DistributedSystem in project geode by apache.

the class CacheServerTransactionsDUnitTest method createCache.

private void createCache(Properties props) throws Exception {
    DistributedSystem ds = getSystem(props);
    assertNotNull(ds);
    ds.disconnect();
    ds = getSystem(props);
    cache = CacheFactory.create(ds);
    assertNotNull(cache);
}
Also used : DistributedSystem(org.apache.geode.distributed.DistributedSystem)

Aggregations

DistributedSystem (org.apache.geode.distributed.DistributedSystem)250 Properties (java.util.Properties)102 InternalDistributedSystem (org.apache.geode.distributed.internal.InternalDistributedSystem)65 ConfigurationProperties (org.apache.geode.distributed.ConfigurationProperties)61 Test (org.junit.Test)59 Cache (org.apache.geode.cache.Cache)55 AttributesFactory (org.apache.geode.cache.AttributesFactory)34 IntegrationTest (org.apache.geode.test.junit.categories.IntegrationTest)30 Region (org.apache.geode.cache.Region)24 IOException (java.io.IOException)20 CacheServer (org.apache.geode.cache.server.CacheServer)20 DistributedTest (org.apache.geode.test.junit.categories.DistributedTest)20 InternalCache (org.apache.geode.internal.cache.InternalCache)16 IgnoredException (org.apache.geode.test.dunit.IgnoredException)16 ArrayList (java.util.ArrayList)15 LogWriter (org.apache.geode.LogWriter)15 DistributedMember (org.apache.geode.distributed.DistributedMember)15 LocalRegion (org.apache.geode.internal.cache.LocalRegion)15 RegionAttributes (org.apache.geode.cache.RegionAttributes)14 Pool (org.apache.geode.cache.client.Pool)14