use of org.apache.geode.test.dunit.IgnoredException in project geode by apache.
the class MyFunctionException method testDistributedRegionFunctionExecutionWithFunctionInvocationTargetException.
@Test
public void testDistributedRegionFunctionExecutionWithFunctionInvocationTargetException() {
// Empty
createCacheInVm();
normal.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.createCacheInVm());
replicate1.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.createCacheInVm());
replicate2.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.createCacheInVm());
replicate3.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.createCacheInVm());
registerFunction(new Boolean(true), new Integer(5));
createPeer(DataPolicy.EMPTY);
populateRegion();
normal.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.createPeer(DataPolicy.NORMAL));
replicate1.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.createPeer(DataPolicy.REPLICATE));
replicate2.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.createPeer(DataPolicy.REPLICATE));
replicate3.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.createPeer(DataPolicy.REPLICATE));
normal.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.registerFunction(new Boolean(true), new Integer(5)));
replicate1.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.registerFunction(new Boolean(true), new Integer(5)));
replicate2.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.registerFunction(new Boolean(true), new Integer(5)));
replicate3.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.registerFunction(new Boolean(true), new Integer(5)));
// add expected exception to avoid suspect strings
final IgnoredException ex = IgnoredException.addIgnoredException("I have been thrown");
replicate1.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.executeFunctionFunctionInvocationTargetException());
ex.remove();
}
use of org.apache.geode.test.dunit.IgnoredException in project geode by apache.
the class MyFunctionException method testDistributedRegionFunctionExecutionOnDataPolicyEmpty_ClientServer_FunctionInvocationTargetException_WithoutHA.
@Test
public void testDistributedRegionFunctionExecutionOnDataPolicyEmpty_ClientServer_FunctionInvocationTargetException_WithoutHA() {
VM empty1 = replicate3;
VM empty2 = normal;
empty2.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.createCacheInVm());
replicate1.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.createCacheInVm());
replicate2.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.createCacheInVm());
empty1.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.createCacheInVm());
createCacheInClientVm();
registerFunction(new Boolean(false), new Integer(0));
Integer port1 = (Integer) empty1.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.createServer(DataPolicy.EMPTY));
Integer port2 = (Integer) empty2.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.createServer(DataPolicy.EMPTY));
replicate1.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.createPeer(DataPolicy.REPLICATE));
replicate2.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.createPeer(DataPolicy.REPLICATE));
createClientAndPopulateClientRegion(DataPolicy.EMPTY, port1, port2);
empty1.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.registerFunction(new Boolean(false), new Integer(0)));
empty2.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.registerFunction(new Boolean(false), new Integer(0)));
replicate1.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.registerFunction(new Boolean(false), new Integer(0)));
replicate2.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.registerFunction(new Boolean(false), new Integer(0)));
// add expected exception to avoid suspect strings
final IgnoredException ex = IgnoredException.addIgnoredException("I have been thrown");
executeFunctionFunctionInvocationTargetException_ClientServer_WithoutHA();
ex.remove();
}
use of org.apache.geode.test.dunit.IgnoredException in project geode by apache.
the class MyFunctionException method testDistributedRegionFunctionExecutionWithFunctionInvocationTargetExceptionForEmptyDataPolicy.
@Test
public void testDistributedRegionFunctionExecutionWithFunctionInvocationTargetExceptionForEmptyDataPolicy() {
// Empty
createCacheInVm();
normal.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.createCacheInVm());
replicate1.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.createCacheInVm());
replicate2.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.createCacheInVm());
replicate3.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.createCacheInVm());
registerFunction(new Boolean(true), new Integer(5));
createPeer(DataPolicy.EMPTY);
populateRegion();
normal.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.createPeer(DataPolicy.NORMAL));
replicate1.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.createPeer(DataPolicy.REPLICATE));
replicate2.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.createPeer(DataPolicy.REPLICATE));
replicate3.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.createPeer(DataPolicy.REPLICATE));
normal.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.registerFunction(new Boolean(true), new Integer(5)));
replicate1.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.registerFunction(new Boolean(true), new Integer(5)));
replicate2.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.registerFunction(new Boolean(true), new Integer(5)));
replicate3.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.registerFunction(new Boolean(true), new Integer(5)));
// add expected exception to avoid suspect strings
final IgnoredException ex = IgnoredException.addIgnoredException("I have been thrown");
executeFunctionFunctionInvocationTargetException();
ex.remove();
}
use of org.apache.geode.test.dunit.IgnoredException in project geode by apache.
the class MyFunctionException method testDistributedRegionFunctionExecutionOnDataPolicyEmpty_ClientServer_FunctionInvocationTargetException.
@Test
public void testDistributedRegionFunctionExecutionOnDataPolicyEmpty_ClientServer_FunctionInvocationTargetException() {
VM empty1 = replicate3;
VM empty2 = normal;
empty2.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.createCacheInVm());
replicate1.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.createCacheInVm());
replicate2.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.createCacheInVm());
empty1.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.createCacheInVm());
createCacheInClientVm();
registerFunction(new Boolean(true), new Integer(5));
Integer port1 = (Integer) empty1.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.createServer(DataPolicy.EMPTY));
Integer port2 = (Integer) empty2.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.createServer(DataPolicy.EMPTY));
replicate1.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.createPeer(DataPolicy.REPLICATE));
replicate2.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.createPeer(DataPolicy.REPLICATE));
createClientAndPopulateClientRegion(DataPolicy.EMPTY, port1, port2);
empty1.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.registerFunction(new Boolean(true), new Integer(5)));
empty2.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.registerFunction(new Boolean(true), new Integer(5)));
replicate1.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.registerFunction(new Boolean(true), new Integer(5)));
replicate2.invoke(() -> DistributedRegionFunctionExecutionDUnitTest.registerFunction(new Boolean(true), new Integer(5)));
// add expected exception to avoid suspect strings
final IgnoredException ex = IgnoredException.addIgnoredException("I have been thrown");
executeFunctionFunctionInvocationTargetException_ClientServer();
ex.remove();
}
use of org.apache.geode.test.dunit.IgnoredException in project geode by apache.
the class PRClientServerRegionFunctionExecutionSingleHopDUnitTest method testServerSingleKeyExecution_SocketTimeOut.
@Test
public void testServerSingleKeyExecution_SocketTimeOut() {
createScenario();
Function function = new TestFunction(true, TestFunction.TEST_FUNCTION_SOCKET_TIMEOUT);
registerFunctionAtServer(function);
isByName = Boolean.TRUE;
// add expected exception for server going down after wait
final IgnoredException expectedEx = IgnoredException.addIgnoredException(DistributedSystemDisconnectedException.class.getName(), server1);
try {
client.invoke(() -> PRClientServerRegionFunctionExecutionSingleHopDUnitTest.serverSingleKeyExecutionSocketTimeOut(isByName));
} finally {
expectedEx.remove();
}
}
Aggregations