use of org.apache.geode.internal.cache.xmlcache.ResourceManagerCreation in project geode by apache.
the class CacheXml66DUnitTest method testPARTITION_OVERFLOW.
@Test
public void testPARTITION_OVERFLOW() throws Exception {
CacheCreation cache = new CacheCreation();
ResourceManagerCreation rmc = new ResourceManagerCreation();
rmc.setEvictionHeapPercentage(55.0f);
rmc.setCriticalHeapPercentage(80.0f);
cache.setResourceManagerCreation(rmc);
RegionCreation root = (RegionCreation) cache.createRegion("partitionoverflow", "PARTITION_OVERFLOW");
testXml(cache);
GemFireCacheImpl c = (GemFireCacheImpl) getCache();
Region r = c.getRegion("partitionoverflow");
assertNotNull(r);
RegionAttributes ra = r.getAttributes();
assertEquals(DataPolicy.PARTITION, ra.getDataPolicy());
assertNotNull(ra.getPartitionAttributes());
assertEquals(0, ra.getPartitionAttributes().getRedundantCopies());
assertEquals(EvictionAttributes.createLRUHeapAttributes(null, EvictionAction.OVERFLOW_TO_DISK), ra.getEvictionAttributes());
assertEquals(55.0f, c.getResourceManager().getEvictionHeapPercentage(), 0);
assertEquals(80.0f, c.getResourceManager().getCriticalHeapPercentage(), 0);
}
Aggregations