use of org.apache.geode.distributed.internal.LonerDistributionManager in project geode by apache.
the class MyFunctionException method bug41118.
public static void bug41118() {
InternalDistributedSystem ds = new DistributedRegionFunctionExecutionDUnitTest().getSystem();
assertNotNull(ds);
ds.disconnect();
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
ds = (InternalDistributedSystem) DistributedSystem.connect(props);
DM dm = ds.getDistributionManager();
assertEquals("Distributed System is not loner", true, dm instanceof LonerDistributionManager);
Cache cache = CacheFactory.create(ds);
AttributesFactory factory = new AttributesFactory();
factory.setScope(Scope.LOCAL);
factory.setDataPolicy(DataPolicy.REPLICATE);
assertNotNull(cache);
region = cache.createRegion(REGION_NAME, factory.create());
try {
executeInlineFunction();
ds.disconnect();
} catch (Exception e) {
LogWriterUtils.getLogWriter().info("Exception Occurred : " + e.getMessage());
e.printStackTrace();
Assert.fail("Test failed", e);
}
}
Aggregations