use of org.apache.geode.internal.cache.GemFireCacheImpl in project geode by apache.
the class CacheXml66DUnitTest method testClientLOCAL.
@Test
public void testClientLOCAL() throws Exception {
ClientCacheCreation cache = new ClientCacheCreation();
RegionCreation root = (RegionCreation) cache.createRegion("local", "LOCAL");
testXml(cache);
GemFireCacheImpl c = (GemFireCacheImpl) getCache();
assertEquals(true, c.isClient());
Region r = c.getRegion("local");
assertNotNull(r);
RegionAttributes ra = r.getAttributes();
assertEquals(DataPolicy.NORMAL, ra.getDataPolicy());
assertEquals(Scope.LOCAL, ra.getScope());
assertEquals(null, ra.getPoolName());
}
use of org.apache.geode.internal.cache.GemFireCacheImpl in project geode by apache.
the class CacheXml66DUnitTest method testBackupFiles.
@Test
public void testBackupFiles() throws Exception {
CacheCreation cache = new CacheCreation();
File backup1 = new File("/back/me/up");
File backup2 = new File("/me/too/please");
cache.addBackup(backup1);
cache.addBackup(backup2);
testXml(cache);
GemFireCacheImpl c = (GemFireCacheImpl) getCache();
assertEquals(Arrays.asList(new File[] { backup1, backup2 }), c.getBackupFiles());
}
use of org.apache.geode.internal.cache.GemFireCacheImpl in project geode by apache.
the class CacheXml66DUnitTest method testPARTITION_PROXY_REDUNDANT.
@Test
public void testPARTITION_PROXY_REDUNDANT() throws Exception {
CacheCreation cache = new CacheCreation();
RegionCreation root = (RegionCreation) cache.createRegion("rpartitionProxy", "PARTITION_PROXY_REDUNDANT");
testXml(cache);
GemFireCacheImpl c = (GemFireCacheImpl) getCache();
Region r = c.getRegion("rpartitionProxy");
assertNotNull(r);
RegionAttributes ra = r.getAttributes();
assertEquals(DataPolicy.PARTITION, ra.getDataPolicy());
assertNotNull(ra.getPartitionAttributes());
assertEquals(1, ra.getPartitionAttributes().getRedundantCopies());
assertEquals(0, ra.getPartitionAttributes().getLocalMaxMemory());
}
use of org.apache.geode.internal.cache.GemFireCacheImpl in project geode by apache.
the class CacheXml66DUnitTest method testLOCAL.
@Test
public void testLOCAL() throws Exception {
CacheCreation cache = new CacheCreation();
RegionCreation root = (RegionCreation) cache.createRegion("local", "LOCAL");
testXml(cache);
GemFireCacheImpl c = (GemFireCacheImpl) getCache();
Region r = c.getRegion("local");
assertNotNull(r);
RegionAttributes ra = r.getAttributes();
assertEquals(DataPolicy.NORMAL, ra.getDataPolicy());
assertEquals(Scope.LOCAL, ra.getScope());
}
use of org.apache.geode.internal.cache.GemFireCacheImpl in project geode by apache.
the class CacheXml66DUnitTest method testPdxDefaults.
@Test
public void testPdxDefaults() throws Exception {
CacheCreation creation = new CacheCreation();
testXml(creation);
Cache c = getCache();
assertTrue(c instanceof GemFireCacheImpl);
c.loadCacheXml(generate(creation));
assertEquals(null, c.getPdxDiskStore());
assertEquals(null, c.getPdxSerializer());
assertEquals(false, c.getPdxPersistent());
assertEquals(false, c.getPdxReadSerialized());
assertEquals(false, c.getPdxIgnoreUnreadFields());
}
Aggregations