geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [26/44] incubator-geode git commit: Refactor dunit
Date Tue, 02 Feb 2016 20:21:33 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/MultiRegionFunctionExecutionDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/MultiRegionFunctionExecutionDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/MultiRegionFunctionExecutionDUnitTest.java
index d4a8826..230f73a 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/MultiRegionFunctionExecutionDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/MultiRegionFunctionExecutionDUnitTest.java
@@ -35,6 +35,7 @@ import com.gemstone.gemfire.cache30.CacheTestCase;
 import com.gemstone.gemfire.distributed.DistributedSystem;
 import com.gemstone.gemfire.internal.Assert;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.Invoke;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
 
@@ -73,7 +74,7 @@ public class MultiRegionFunctionExecutionDUnitTest extends CacheTestCase {
   public void tearDown2() throws Exception {
     super.tearDown2();
     cache = null;
-    invokeInEveryVM(new SerializableRunnable() { public void run() { cache = null; } });
+    Invoke.invokeInEveryVM(new SerializableRunnable() { public void run() { cache = null; } });
   }
   
   public void testMultiRegionFunctionExecution(){

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/OnGroupsFunctionExecutionDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/OnGroupsFunctionExecutionDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/OnGroupsFunctionExecutionDUnitTest.java
index ec6126c..c42be3b 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/OnGroupsFunctionExecutionDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/OnGroupsFunctionExecutionDUnitTest.java
@@ -45,9 +45,13 @@ import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
+import com.gemstone.gemfire.test.dunit.Invoke;
+import com.gemstone.gemfire.test.dunit.LogWriterSupport;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 /**
  * 
@@ -61,7 +65,7 @@ public class OnGroupsFunctionExecutionDUnitTest extends DistributedTestCase {
 
   @Override
   public void tearDown2() throws Exception {
-    invokeInEveryVM(new SerializableCallable() {
+    Invoke.invokeInEveryVM(new SerializableCallable() {
       @Override
       public Object call() throws Exception {
         Cache c = null;
@@ -84,7 +88,7 @@ public class OnGroupsFunctionExecutionDUnitTest extends DistributedTestCase {
 
     @Override
     public void execute(FunctionContext context) {
-      getLogWriter().fine("SWAP:1:executing OnGroupsFunction:"+invocationCount);
+      LogWriterSupport.getLogWriter().fine("SWAP:1:executing OnGroupsFunction:"+invocationCount);
       InternalDistributedSystem ds = InternalDistributedSystem.getConnectedInstance();
       synchronized (OnGroupsFunction.class) {
     	  invocationCount++;
@@ -229,7 +233,7 @@ public class OnGroupsFunctionExecutionDUnitTest extends DistributedTestCase {
     vm0.invoke(new SerializableCallable() {
       @Override
       public Object call() throws Exception {
-        getLogWriter().fine("SWAP:invoking on gm");
+        LogWriterSupport.getLogWriter().fine("SWAP:invoking on gm");
         DistributedSystem ds = getSystem();
         try {
           FunctionService.onMember("no such group");
@@ -256,7 +260,7 @@ public class OnGroupsFunctionExecutionDUnitTest extends DistributedTestCase {
       @Override
       public Object call() throws Exception {
         DistributedSystem ds = getSystem();
-        getLogWriter().fine("SWAP:invoking on g0");
+        LogWriterSupport.getLogWriter().fine("SWAP:invoking on g0");
         Execution e = FunctionService.onMembers("g0");
         ArrayList<String> args = new ArrayList<String>();
         args.add("g0");
@@ -296,7 +300,7 @@ public class OnGroupsFunctionExecutionDUnitTest extends DistributedTestCase {
     vm0.invoke(new SerializableCallable() {
       @Override
       public Object call() throws Exception {
-        getLogWriter().fine("SWAP:invoking on g0 g1");
+        LogWriterSupport.getLogWriter().fine("SWAP:invoking on g0 g1");
         InternalDistributedSystem ds = InternalDistributedSystem.getConnectedInstance();
         Execution e = FunctionService.onMembers("g0", "g1");
         ArrayList<String> args = new ArrayList<String>();
@@ -493,7 +497,7 @@ public class OnGroupsFunctionExecutionDUnitTest extends DistributedTestCase {
     
     //The test function deliberately throws a null pointer exception.
     //which is logged.
-    IgnoredException.addExpectedException(NullPointerException.class.getSimpleName());
+    IgnoredException.addIgnoredException(NullPointerException.class.getSimpleName());
     
     initVM(vm0, "g0,mg", regionName, false);
     initVM(vm1, "g1", regionName, false);
@@ -681,11 +685,11 @@ public class OnGroupsFunctionExecutionDUnitTest extends DistributedTestCase {
         } catch (CacheClosedException cce) {
         }
         disconnectFromDS();
-        getLogWriter().fine("SWAP:creating client cache");
+        LogWriterSupport.getLogWriter().fine("SWAP:creating client cache");
         ClientCacheFactory ccf = new ClientCacheFactory();
         ccf.addPoolLocator(hostName, locatorPort);
         ccf.setPoolServerGroup("mg");
-        ccf.set("log-level", getDUnitLogLevel());
+        ccf.set("log-level", LogWriterSupport.getDUnitLogLevel());
         ClientCache c = ccf.create();
 
         c.getLogger().info("SWAP:invoking function from client on g0");
@@ -779,11 +783,11 @@ public class OnGroupsFunctionExecutionDUnitTest extends DistributedTestCase {
         } catch (CacheClosedException cce) {
         }
         disconnectFromDS();
-        getLogWriter().fine("SWAP:creating client cache");
+        LogWriterSupport.getLogWriter().fine("SWAP:creating client cache");
         ClientCacheFactory ccf = new ClientCacheFactory();
         ccf.addPoolLocator(hostName, locatorPort);
         ccf.setPoolServerGroup("mg");
-        ccf.set("log-level", getDUnitLogLevel());
+        ccf.set("log-level", LogWriterSupport.getDUnitLogLevel());
         ClientCache c = ccf.create();
 
         c.getLogger().info("SWAP:invoking function from client on g0");
@@ -856,14 +860,14 @@ public class OnGroupsFunctionExecutionDUnitTest extends DistributedTestCase {
         } catch (CacheClosedException cce) {
         }
         disconnectFromDS();
-        getLogWriter().fine("SWAP:creating client cache");
+        LogWriterSupport.getLogWriter().fine("SWAP:creating client cache");
         ClientCacheFactory ccf = new ClientCacheFactory();
         ccf.addPoolLocator(hostName, locatorPort);
         ccf.setPoolServerGroup("mg");
-        ccf.set("log-level", getDUnitLogLevel());
+        ccf.set("log-level", LogWriterSupport.getDUnitLogLevel());
         ClientCache c = ccf.create();
 
-        IgnoredException ex = IgnoredException.addExpectedException("No member found");
+        IgnoredException ex = IgnoredException.addIgnoredException("No member found");
         try {
           InternalFunctionService.onServer(c, "no such group").execute(new OnGroupsFunction()).getResult();
          fail("expected exception not thrown");
@@ -936,14 +940,14 @@ public class OnGroupsFunctionExecutionDUnitTest extends DistributedTestCase {
         } catch (CacheClosedException cce) {
         }
         disconnectFromDS();
-        getLogWriter().fine("SWAP:creating client cache");
+        LogWriterSupport.getLogWriter().fine("SWAP:creating client cache");
         ClientCacheFactory ccf = new ClientCacheFactory();
         ccf.addPoolLocator(hostName, locatorPort);
         ccf.setPoolServerGroup("mg");
-        ccf.set("log-level", getDUnitLogLevel());
+        ccf.set("log-level", LogWriterSupport.getDUnitLogLevel());
         ClientCache c = ccf.create();
 
-        IgnoredException expected = IgnoredException.addExpectedException("No member found");
+        IgnoredException expected = IgnoredException.addIgnoredException("No member found");
         try {
           InternalFunctionService.onServers(c, "no such group").execute(new OnGroupsFunction()).getResult();
           fail("expected exception not thrown");
@@ -952,7 +956,7 @@ public class OnGroupsFunctionExecutionDUnitTest extends DistributedTestCase {
           expected.remove();
         }
 
-        IgnoredException.addExpectedException("NullPointerException");
+        IgnoredException.addIgnoredException("NullPointerException");
         Execution e = InternalFunctionService.onServers(c, "mg");
         ArrayList<String> args = new ArrayList<String>();
         args.add("runtime");
@@ -1013,11 +1017,11 @@ public class OnGroupsFunctionExecutionDUnitTest extends DistributedTestCase {
         } catch (CacheClosedException cce) {
         }
         disconnectFromDS();
-        getLogWriter().fine("SWAP:creating client cache");
+        LogWriterSupport.getLogWriter().fine("SWAP:creating client cache");
         ClientCacheFactory ccf = new ClientCacheFactory();
         ccf.addPoolLocator(hostName, locatorPort);
         ccf.setPoolServerGroup("mg");
-        ccf.set("log-level", getDUnitLogLevel());
+        ccf.set("log-level", LogWriterSupport.getDUnitLogLevel());
         ClientCache c = ccf.create();
 
         Execution e = InternalFunctionService.onServers(c, "g1");
@@ -1025,7 +1029,7 @@ public class OnGroupsFunctionExecutionDUnitTest extends DistributedTestCase {
         args.add("disconnect");
         e = e.withArgs(args);
         
-        IgnoredException.addExpectedException("FunctionInvocationTargetException");
+        IgnoredException.addIgnoredException("FunctionInvocationTargetException");
         try {
           e.execute(new OnGroupsExceptionFunction()).getResult();
           fail("expected exception not thrown");
@@ -1062,11 +1066,11 @@ public class OnGroupsFunctionExecutionDUnitTest extends DistributedTestCase {
         } catch (CacheClosedException cce) {
         }
         disconnectFromDS();
-        getLogWriter().fine("SWAP:creating client cache");
+        LogWriterSupport.getLogWriter().fine("SWAP:creating client cache");
         ClientCacheFactory ccf = new ClientCacheFactory();
         ccf.addPoolLocator(hostName, locatorPort);
         ccf.setPoolServerGroup("mg");
-        ccf.set("log-level", getDUnitLogLevel());
+        ccf.set("log-level", LogWriterSupport.getDUnitLogLevel());
         ClientCache c = ccf.create();
 
         Execution e = InternalFunctionService.onServers(c, "g1");
@@ -1074,7 +1078,7 @@ public class OnGroupsFunctionExecutionDUnitTest extends DistributedTestCase {
         args.add("disconnect");
         args.add("g2");
         e = e.withArgs(args);
-        IgnoredException.addExpectedException("FunctionInvocationTargetException");
+        IgnoredException.addIgnoredException("FunctionInvocationTargetException");
         try {
           e.execute(new OnGroupsExceptionFunction()).getResult();
           fail("expected exception not thrown");
@@ -1111,11 +1115,11 @@ public class OnGroupsFunctionExecutionDUnitTest extends DistributedTestCase {
         } catch (CacheClosedException cce) {
         }
         disconnectFromDS();
-        getLogWriter().fine("SWAP:creating client cache");
+        LogWriterSupport.getLogWriter().fine("SWAP:creating client cache");
         ClientCacheFactory ccf = new ClientCacheFactory();
         ccf.addPoolLocator(hostName, locatorPort);
         ccf.setPoolServerGroup("mg");
-        ccf.set("log-level", getDUnitLogLevel());
+        ccf.set("log-level", LogWriterSupport.getDUnitLogLevel());
         ClientCache c = ccf.create();
 
         Execution e = InternalFunctionService.onServers(c, "g1");
@@ -1125,7 +1129,7 @@ public class OnGroupsFunctionExecutionDUnitTest extends DistributedTestCase {
         e = e.withArgs(args);
         ((AbstractExecution)e).setIgnoreDepartedMembers(true);
         ArrayList l = (ArrayList) e.execute(new OnGroupsExceptionFunction()).getResult();
-        getLogWriter().info("SWAP:result:"+l);
+        LogWriterSupport.getLogWriter().info("SWAP:result:"+l);
         assertEquals(2, l.size());
         if (l.get(0) instanceof Throwable) {
           assertTrue((Boolean) l.get(1));
@@ -1153,7 +1157,7 @@ public class OnGroupsFunctionExecutionDUnitTest extends DistributedTestCase {
   public void testNoAckGroupsFunction() {
     //Workaround for #52005. This is a product bug
     //that should be fixed
-    IgnoredException.addExpectedException("Cannot return any result");
+    IgnoredException.addIgnoredException("Cannot return any result");
     Host host = Host.getHost(0);
     final VM server0 = host.getVM(0);
     final VM server1 = host.getVM(1);
@@ -1178,11 +1182,11 @@ public class OnGroupsFunctionExecutionDUnitTest extends DistributedTestCase {
         } catch (CacheClosedException cce) {
         }
         disconnectFromDS();
-        getLogWriter().fine("SWAP:creating client cache");
+        LogWriterSupport.getLogWriter().fine("SWAP:creating client cache");
         ClientCacheFactory ccf = new ClientCacheFactory();
         ccf.addPoolLocator(hostName, locatorPort);
         ccf.setPoolServerGroup("mg");
-        ccf.set("log-level", getDUnitLogLevel());
+        ccf.set("log-level", LogWriterSupport.getDUnitLogLevel());
         ClientCache c = ccf.create();
 
         c.getLogger().info("SWAP:invoking function from client on g0");
@@ -1204,7 +1208,7 @@ public class OnGroupsFunctionExecutionDUnitTest extends DistributedTestCase {
         return "OnGroupsNoAck invocation count mismatch";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 30000, 1000, true);
+    Wait.waitForCriterion(wc, 30000, 1000, true);
 
     resetInvocationCount(server0);
     resetInvocationCount(server1);
@@ -1220,7 +1224,7 @@ public class OnGroupsFunctionExecutionDUnitTest extends DistributedTestCase {
       }
     });
     // pause here to verify that we do not get more than 1 invocation
-    DistributedTestCase.pause(5000);
+    Wait.pause(5000);
     WaitCriterion wc2 = new WaitCriterion() {
       @Override
       public boolean done() {
@@ -1234,7 +1238,7 @@ public class OnGroupsFunctionExecutionDUnitTest extends DistributedTestCase {
         return "OnGroupsNoAck invocation count mismatch";
       }
     };
-    DistributedTestCase.waitForCriterion(wc2, 30000, 1000, true);
+    Wait.waitForCriterion(wc2, 30000, 1000, true);
     resetInvocationCount(server0);
     resetInvocationCount(server1);
     resetInvocationCount(server2);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerFunctionExecutionNoAckDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerFunctionExecutionNoAckDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerFunctionExecutionNoAckDUnitTest.java
index d923eda..9bea234 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerFunctionExecutionNoAckDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerFunctionExecutionNoAckDUnitTest.java
@@ -31,6 +31,7 @@ import com.gemstone.gemfire.cache.execute.ResultCollector;
 import com.gemstone.gemfire.distributed.DistributedMember;
 import com.gemstone.gemfire.distributed.DistributedSystem;
 import com.gemstone.gemfire.internal.cache.functions.TestFunction;
+import com.gemstone.gemfire.test.dunit.LogWriterSupport;
 
 public class PRClientServerFunctionExecutionNoAckDUnitTest extends PRClientServerTestBase{
   /**
@@ -66,7 +67,7 @@ public class PRClientServerFunctionExecutionNoAckDUnitTest extends PRClientServe
     
     isByName = new Boolean(true);
     toRegister = new Boolean(true);
-    getLogWriter()
+    LogWriterSupport.getLogWriter()
         .info(
             "PRClientServerFunctionExecutionNoAckDUnitTest#testServerFunctionExecution_NoAck : Starting test");
     client.invoke(PRClientServerFunctionExecutionNoAckDUnitTest.class,
@@ -84,7 +85,7 @@ public class PRClientServerFunctionExecutionNoAckDUnitTest extends PRClientServe
     registerFunctionAtServer(functionAck);
     toRegister = new Boolean(false);
     isByName = new Boolean(true);
-    getLogWriter()
+    LogWriterSupport.getLogWriter()
         .info(
             "PRClientServerFunctionExecutionNoAckDUnitTest#testServerFunctionExecution_NoAck : Starting test");
     client.invoke(PRClientServerFunctionExecutionNoAckDUnitTest.class,
@@ -94,7 +95,7 @@ public class PRClientServerFunctionExecutionNoAckDUnitTest extends PRClientServe
   }
   
   private void createScenario() {
-    getLogWriter()
+    LogWriterSupport.getLogWriter()
         .info(
             "PRClientServerFFunctionExecutionDUnitTest#createScenario : creating scenario");
     createClientServerScenarionWithoutRegion();
@@ -117,11 +118,11 @@ public class PRClientServerFunctionExecutionNoAckDUnitTest extends PRClientServe
       for(int i=0;i< NUM_ITERATION;i++)
         execute(member, Boolean.TRUE, functionNoAck, isByName, toRegister);
       t.stop();
-      getLogWriter().info("Time taken to execute boolean based" + NUM_ITERATION + "NoAck functions :" + t.getTimeInMs());      
+      LogWriterSupport.getLogWriter().info("Time taken to execute boolean based" + NUM_ITERATION + "NoAck functions :" + t.getTimeInMs());      
     }
     catch (Exception ex) {
       ex.printStackTrace();
-      getLogWriter().info("Exception : ", ex);
+      LogWriterSupport.getLogWriter().info("Exception : ", ex);
       fail("Test failed after the execute operation");
     }
         
@@ -135,11 +136,11 @@ public class PRClientServerFunctionExecutionNoAckDUnitTest extends PRClientServe
       for(int i=0;i< NUM_ITERATION;i++)
         execute(member, testKeysSet, functionNoAck, isByName, toRegister);
       t.stop();
-      getLogWriter().info("Time taken to execute setbased" + NUM_ITERATION + "NoAck functions :" + t.getTimeInMs());     
+      LogWriterSupport.getLogWriter().info("Time taken to execute setbased" + NUM_ITERATION + "NoAck functions :" + t.getTimeInMs());     
     }
     catch (Exception ex) {
       ex.printStackTrace();
-      getLogWriter().info("Exception : ", ex);
+      LogWriterSupport.getLogWriter().info("Exception : ", ex);
       fail("Test failed after the execute operationssssss");
     }
     if(toRegister.booleanValue()){
@@ -158,11 +159,11 @@ public class PRClientServerFunctionExecutionNoAckDUnitTest extends PRClientServe
         timeinms += t.getTimeInMs();
         assertEquals(Boolean.TRUE, ((List)rc.getResult()).get(0));
       }
-      getLogWriter().info("Time taken to execute boolean based" + NUM_ITERATION + "haveResults functions :" + timeinms);      
+      LogWriterSupport.getLogWriter().info("Time taken to execute boolean based" + NUM_ITERATION + "haveResults functions :" + timeinms);      
     }
     catch (Exception ex) {
       ex.printStackTrace();
-      getLogWriter().info("Exception : ", ex);
+      LogWriterSupport.getLogWriter().info("Exception : ", ex);
       fail("Test failed after the execute operation");
     }
         
@@ -184,11 +185,11 @@ public class PRClientServerFunctionExecutionNoAckDUnitTest extends PRClientServe
         }
         
       }
-      getLogWriter().info("Time taken to execute setbased" + NUM_ITERATION + "haveResults functions :" + timeinms);     
+      LogWriterSupport.getLogWriter().info("Time taken to execute setbased" + NUM_ITERATION + "haveResults functions :" + timeinms);     
     }
     catch (Exception ex) {
       ex.printStackTrace();
-      getLogWriter().info("Exception : ", ex);
+      LogWriterSupport.getLogWriter().info("Exception : ", ex);
       fail("Test failed after the execute operationssssss");
     }    
   }
@@ -211,7 +212,7 @@ public class PRClientServerFunctionExecutionNoAckDUnitTest extends PRClientServe
     }
     catch (Exception ex) {
       ex.printStackTrace();
-      getLogWriter().info("Exception : ", ex);
+      LogWriterSupport.getLogWriter().info("Exception : ", ex);
       fail("Test failed after the execute operation allserver   ");
     }
 
@@ -224,7 +225,7 @@ public class PRClientServerFunctionExecutionNoAckDUnitTest extends PRClientServe
     }
     catch (Exception ex) {
       ex.printStackTrace();
-      getLogWriter().info("Exception : ", ex);
+      LogWriterSupport.getLogWriter().info("Exception : ", ex);
       fail("Test failed after the execute operation");
     }
   }
@@ -234,15 +235,15 @@ public class PRClientServerFunctionExecutionNoAckDUnitTest extends PRClientServe
       throws Exception {
     if (isByName.booleanValue()) {// by name
       if(toRegister.booleanValue()){
-        getLogWriter().info("The function name to execute : " + function.getId());
+        LogWriterSupport.getLogWriter().info("The function name to execute : " + function.getId());
         Execution me = member.withArgs(args);
-        getLogWriter().info("The args passed  : " + args);
+        LogWriterSupport.getLogWriter().info("The args passed  : " + args);
         return me.execute(function.getId());
       }
       else {
-        getLogWriter().info("The function name to execute : (without Register) " + function.getId());
+        LogWriterSupport.getLogWriter().info("The function name to execute : (without Register) " + function.getId());
         Execution me = member.withArgs(args);
-        getLogWriter().info("The args passed  : " + args);
+        LogWriterSupport.getLogWriter().info("The args passed  : " + args);
         return me.execute(function.getId(), function.hasResult(),function.isHA(),function.optimizeForWrite());
       }
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionDUnitTest.java
index b2594f6..e46e256 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionDUnitTest.java
@@ -58,9 +58,11 @@ import com.gemstone.gemfire.internal.cache.tier.sockets.CacheServerTestUtil;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
+import com.gemstone.gemfire.test.dunit.LogWriterSupport;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServerTestBase {
   private static final String TEST_FUNCTION7 = TestFunction.TEST_FUNCTION7;
@@ -213,7 +215,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
     isByName = new Boolean(true);
     toRegister = new Boolean(true);
 
-    final IgnoredException ex = IgnoredException.addExpectedException("did not send last result");
+    final IgnoredException ex = IgnoredException.addIgnoredException("did not send last result");
     client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
         "serverSingleKeyExecution_NoLastResult", new Object[] { isByName,
             toRegister });
@@ -487,7 +489,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
       if (!(ex.getCause() instanceof ServerConnectivityException)
           && !(ex.getCause() instanceof FunctionInvocationTargetException)) {
         ex.printStackTrace();
-        getLogWriter().info("Exception : ", ex);
+        LogWriterSupport.getLogWriter().info("Exception : ", ex);
         fail("Test failed after the execute operation");
       }
     }
@@ -523,7 +525,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
       assertEquals(1, ((List)rs.getResult()).size());
     } catch (Exception ex) {
         ex.printStackTrace();
-        getLogWriter().info("Exception : ", ex);
+        LogWriterSupport.getLogWriter().info("Exception : ", ex);
         Assert.fail("Test failed after the execute operation", ex);
     }
   }
@@ -558,7 +560,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
       assertEquals(1, ((List)rs.getResult()).size());
     } catch (Exception ex) {
         ex.printStackTrace();
-        getLogWriter().info("Exception : ", ex);
+        LogWriterSupport.getLogWriter().info("Exception : ", ex);
         fail("Test failed after the execute operation");
     }
   }
@@ -670,7 +672,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
       String excuse;
       public boolean done() {
         int sz = pool.getConnectedServerCount();
-        getLogWriter().info(
+        LogWriterSupport.getLogWriter().info(
             "Checking for the Live Servers : Expected  : " + expectedLiveServers
                 + " Available :" + sz);
         if (sz == expectedLiveServers.intValue()) {
@@ -683,7 +685,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
         return excuse;
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 3 * 60 * 1000, 1000, true);
+    Wait.waitForCriterion(wc, 3 * 60 * 1000, 1000, true);
   }
   
   public static void executeFunction() throws ServerException,
@@ -703,7 +705,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
       ResultCollector rc1 = dataSet.withFilter(testKeysSet).withArgs(Boolean.TRUE).execute(
           function.getId());
       List l = ((List)rc1.getResult());
-      getLogWriter().info("Result size : " + l.size());
+      LogWriterSupport.getLogWriter().info("Result size : " + l.size());
       assertEquals(3, l.size());
 
       for (Iterator i = l.iterator(); i.hasNext();) {
@@ -711,7 +713,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
       }
     }
     catch (Exception e) {
-      getLogWriter().info("Got an exception : " + e.getMessage());
+      LogWriterSupport.getLogWriter().info("Got an exception : " + e.getMessage());
       assertTrue(e instanceof EOFException || e instanceof SocketException
           || e instanceof SocketTimeoutException
           || e instanceof ServerException || e instanceof IOException
@@ -732,7 +734,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
     ResultCollector rc1 = dataSet.withFilter(testKeysSet).withArgs(Boolean.TRUE).execute(
         function.getId());
     List l = ((List)rc1.getResult());
-    getLogWriter().info("Result size : " + l.size());
+    LogWriterSupport.getLogWriter().info("Result size : " + l.size());
     return l;
   }
   
@@ -780,7 +782,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
     PartitionedRegion region = (PartitionedRegion)cache.getRegion(PartitionedRegionName);
     HashMap localBucket2RegionMap = (HashMap)region
     .getDataStore().getSizeLocally();
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
     "Size of the " + PartitionedRegionName + " in this VM :- "
         + localBucket2RegionMap.size());
     Set entrySet = localBucket2RegionMap.entrySet();
@@ -823,7 +825,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
             .iterator().next());
       }
       catch (Exception expected) {
-        getLogWriter().info("Exception : " + expected.getMessage());
+        LogWriterSupport.getLogWriter().info("Exception : " + expected.getMessage());
         expected.printStackTrace();
         fail("Test failed after the put operation");
       }
@@ -852,7 +854,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
       List l = null;
       ResultCollector rc1 = execute(dataSet, testKeysSet, Boolean.TRUE,  function, isByName);
       l = ((List)rc1.getResult());
-      getLogWriter().info("Result size : " + l.size());
+      LogWriterSupport.getLogWriter().info("Result size : " + l.size());
       assertEquals(3, l.size());
       for (Iterator i = l.iterator(); i.hasNext();) {
         assertEquals(Boolean.TRUE, i.next());
@@ -904,7 +906,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
       ResultCollector rc1 = execute(dataSet, testKeysSet, Boolean.TRUE,
           function, isByName);
       l = ((List)rc1.getResult());
-      getLogWriter().info("Result size : " + l.size());
+      LogWriterSupport.getLogWriter().info("Result size : " + l.size());
       assertEquals(3, l.size());
       for (Iterator i = l.iterator(); i.hasNext();) {
         assertTrue(i.next() instanceof MyFunctionExecutionException);
@@ -989,7 +991,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
       ResultCollector rc1 = execute(dataSet, testKeysSet, Boolean.TRUE,
           function, isByName);
       l = ((List)rc1.getResult());
-      getLogWriter().info("Result size : " + l.size());
+      LogWriterSupport.getLogWriter().info("Result size : " + l.size());
       assertEquals(3, l.size());
       for (Iterator i = l.iterator(); i.hasNext();) {
         assertEquals(Boolean.TRUE, i.next());
@@ -1025,7 +1027,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
 
     }catch (Exception ex) {
       ex.printStackTrace();
-      getLogWriter().info("Exception : " , ex);
+      LogWriterSupport.getLogWriter().info("Exception : " , ex);
       Assert.fail("Test failed after the put operation",ex);
     }
   }
@@ -1069,13 +1071,13 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
         }
       });
       l = ((List)rc1.getResult());
-      getLogWriter().info("Result size : " + l.size());
+      LogWriterSupport.getLogWriter().info("Result size : " + l.size());
       assertEquals(3, l.size());
       for (Iterator i = l.iterator(); i.hasNext();) {
         assertEquals(Boolean.TRUE, i.next());
       }
     }catch(Exception e){
-      getLogWriter().info("Exception : " + e.getMessage());
+      LogWriterSupport.getLogWriter().info("Exception : " + e.getMessage());
       e.printStackTrace();
       fail("Test failed after the put operation");
       
@@ -1247,7 +1249,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
 
     }catch (Exception ex) {
       ex.printStackTrace();
-      getLogWriter().info("Exception : " , ex);
+      LogWriterSupport.getLogWriter().info("Exception : " , ex);
       Assert.fail("Test failed after the put operation",ex);
     }
   }
@@ -1302,7 +1304,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
     }
     catch (Exception ex) {
       ex.printStackTrace();
-      getLogWriter().info("Exception : ", ex);
+      LogWriterSupport.getLogWriter().info("Exception : ", ex);
       Assert.fail("Test failed after the put operation", ex);
     }
     
@@ -1322,7 +1324,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
     }
     catch (Exception ex) {
       ex.printStackTrace();
-      getLogWriter().info("Exception : ", ex);
+      LogWriterSupport.getLogWriter().info("Exception : ", ex);
       Assert.fail("Test failed after the put operation", ex);
     }
   }
@@ -1384,7 +1386,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
 
     }catch (Exception ex) {
       ex.printStackTrace();
-      getLogWriter().info("Exception : " , ex);
+      LogWriterSupport.getLogWriter().info("Exception : " , ex);
       Assert.fail("Test failed after the put operation",ex);
     }
     
@@ -1496,7 +1498,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
       });
     }
     catch (Exception expected) {
-      getLogWriter().fine("Exception occured : " + expected.getMessage());
+      LogWriterSupport.getLogWriter().fine("Exception occured : " + expected.getMessage());
       assertTrue(expected.getMessage().contains(
           "No target node found for KEY = " + testKey)
           || expected.getMessage()
@@ -1558,7 +1560,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
 
     }catch (Exception ex) {
       ex.printStackTrace();
-      getLogWriter().info("Exception : " , ex);
+      LogWriterSupport.getLogWriter().info("Exception : " , ex);
       Assert.fail("Test failed after the put operation",ex);
     }
   }
@@ -1614,7 +1616,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
       });
     }
     catch (Exception expected) {
-      getLogWriter().fine("Exception occured : " + expected.getMessage());
+      LogWriterSupport.getLogWriter().fine("Exception occured : " + expected.getMessage());
       assertTrue(expected.getCause().getMessage().contains(
           "Could not create an instance of  com.gemstone.gemfire.internal.cache.execute.PRClientServerRegionFunctionExecutionDUnitTest$UnDeserializable"));
     } finally {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionFailoverDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionFailoverDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionFailoverDUnitTest.java
index 50a6b6a..daf531f 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionFailoverDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionFailoverDUnitTest.java
@@ -46,10 +46,13 @@ import com.gemstone.gemfire.internal.cache.functions.TestFunction;
 import com.gemstone.gemfire.internal.cache.tier.sockets.CacheServerTestUtil;
 import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.DistributedTestSupport;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
+import com.gemstone.gemfire.test.dunit.LogWriterSupport;
+import com.gemstone.gemfire.test.dunit.NetworkSupport;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.Threads;
 import com.gemstone.gemfire.test.dunit.VM;
 
 public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
@@ -66,10 +69,10 @@ public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
   @Override
   public void setUp() throws Exception {
     super.setUp();
-    IgnoredException.addExpectedException("Connection reset");
-    IgnoredException.addExpectedException("SocketTimeoutException");
-    IgnoredException.addExpectedException("ServerConnectivityException");
-    IgnoredException.addExpectedException("Socket Closed");
+    IgnoredException.addIgnoredException("Connection reset");
+    IgnoredException.addIgnoredException("SocketTimeoutException");
+    IgnoredException.addIgnoredException("ServerConnectivityException");
+    IgnoredException.addIgnoredException("Socket Closed");
   }
   
   @Override
@@ -92,7 +95,7 @@ public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
    */
   public void testServerFailoverWithTwoServerAliveHA()
       throws InterruptedException {
-    IgnoredException.addExpectedException("FunctionInvocationTargetException");
+    IgnoredException.addIgnoredException("FunctionInvocationTargetException");
     ArrayList commonAttributes = createCommonServerAttributes(
         "TestPartitionedRegion", null, 1, 13, null);
     createClientServerScenarion(commonAttributes, 20, 20, 20);
@@ -118,7 +121,7 @@ public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
     client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
         "verifyDeadAndLiveServers", new Object[] { new Integer(1),
             new Integer(2) });
-    DistributedTestCase.join(async[0], 6 * 60 * 1000, getLogWriter());
+    Threads.join(async[0], 6 * 60 * 1000, LogWriterSupport.getLogWriter());
     if (async[0].getException() != null) {
       Assert.fail("UnExpected Exception Occured : ", async[0].getException());
     }
@@ -132,7 +135,7 @@ public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
    */
   public void testServerCacheClosedFailoverWithTwoServerAliveHA()
       throws InterruptedException {
-    IgnoredException.addExpectedException("FunctionInvocationTargetException");
+    IgnoredException.addIgnoredException("FunctionInvocationTargetException");
     ArrayList commonAttributes = createCommonServerAttributes(
         "TestPartitionedRegion", null, 1, 13, null);
     createClientServerScenarion(commonAttributes, 20, 20, 20);
@@ -158,7 +161,7 @@ public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
     client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
         "verifyDeadAndLiveServers", new Object[] { new Integer(1),
             new Integer(2) });
-    DistributedTestCase.join(async[0], 5 * 60 * 1000, getLogWriter());
+    Threads.join(async[0], 5 * 60 * 1000, LogWriterSupport.getLogWriter());
     if (async[0].getException() != null) {
       Assert.fail("UnExpected Exception Occured : ", async[0].getException());
     }
@@ -182,7 +185,7 @@ public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
 
   public void testOnRegionFailoverWithTwoServerDownHA()
       throws InterruptedException {
-    IgnoredException.addExpectedException("FunctionInvocationTargetException");
+    IgnoredException.addIgnoredException("FunctionInvocationTargetException");
     createScenario();
 
     server1.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
@@ -196,7 +199,7 @@ public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
 
     client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
         "createProxyRegion",
-        new Object[] { getServerHostName(server1.getHost()) });
+        new Object[] { NetworkSupport.getServerHostName(server1.getHost()) });
 
     Function function = new TestFunction(true,
         TestFunction.TEST_FUNCTION_HA_REGION);
@@ -213,7 +216,7 @@ public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
   // retry attempts is 2
   public void testOnRegionFailoverWithOneServerDownHA()
       throws InterruptedException {
-    IgnoredException.addExpectedException("FunctionInvocationTargetException");
+    IgnoredException.addIgnoredException("FunctionInvocationTargetException");
     createScenario();
 
     server1.invokeAsync(PRClientServerRegionFunctionExecutionDUnitTest.class,
@@ -227,7 +230,7 @@ public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
 
     client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
         "createProxyRegion",
-        new Object[] { getServerHostName(server1.getHost()) });
+        new Object[] { NetworkSupport.getServerHostName(server1.getHost()) });
 
     Function function = new TestFunction(true,
         TestFunction.TEST_FUNCTION_HA_REGION);
@@ -247,7 +250,7 @@ public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
    */
   public void testOnRegionFailoverNonHA() throws InterruptedException { // See #47489 before enabling it
     createScenario();
-    IgnoredException.addExpectedException("FunctionInvocationTargetException");
+    IgnoredException.addIgnoredException("FunctionInvocationTargetException");
     server1.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
         "createReplicatedRegion");
 
@@ -259,7 +262,7 @@ public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
 
     client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
         "createProxyRegion",
-        new Object[] { getServerHostName(server1.getHost()) });
+        new Object[] { NetworkSupport.getServerHostName(server1.getHost()) });
 
     Function function = new TestFunction(true,
         TestFunction.TEST_FUNCTION_NONHA_REGION);
@@ -292,7 +295,7 @@ public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
 
     client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
         "createProxyRegion",
-        new Object[] { getServerHostName(server1.getHost()) });
+        new Object[] { NetworkSupport.getServerHostName(server1.getHost()) });
 
     //Make sure the buckets are created.
     client.invoke(new SerializableRunnable() {
@@ -343,7 +346,7 @@ public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
 
   public void testServerBucketMovedException() throws InterruptedException {
 
-    IgnoredException.addExpectedException("BucketMovedException");
+    IgnoredException.addIgnoredException("BucketMovedException");
     final Host host = Host.getHost(0);
     VM server1 = host.getVM(0);
     VM server2 = host.getVM(1);
@@ -357,7 +360,7 @@ public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
 
     final int portLocator = AvailablePort
         .getRandomAvailablePort(AvailablePort.SOCKET);
-    final String hostLocator = getServerHostName(server1.getHost());
+    final String hostLocator = NetworkSupport.getServerHostName(server1.getHost());
     final String locator = hostLocator + "[" + portLocator + "]";
 
     startLocatorInVM(portLocator);
@@ -402,7 +405,7 @@ public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
 
   public void testServerBucketMovedException_LocalServer()
       throws InterruptedException {
-    IgnoredException.addExpectedException("BucketMovedException");
+    IgnoredException.addIgnoredException("BucketMovedException");
 
     final Host host = Host.getHost(0);
     VM server1 = host.getVM(0);
@@ -415,7 +418,7 @@ public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
 
     final int portLocator = AvailablePort
         .getRandomAvailablePort(AvailablePort.SOCKET);
-    final String hostLocator = getServerHostName(server1.getHost());
+    final String hostLocator = NetworkSupport.getServerHostName(server1.getHost());
     final String locator = hostLocator + "[" + portLocator + "]";
 
     startLocatorInVM(portLocator);
@@ -462,7 +465,7 @@ public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
     File logFile = new File("locator-" + locatorPort + ".log");
 
     Properties props = new Properties();
-    props = getAllDistributedSystemProperties(props);
+    props = DistributedTestSupport.getAllDistributedSystemProperties(props);
     props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
     
     try {
@@ -507,7 +510,7 @@ public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
     attr.setPartitionAttributes(paf.create());
     region = cache.createRegion(regionName, attr.create());
     assertNotNull(region);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region " + regionName + " created Successfully :"
             + region.toString());
     return port;
@@ -540,7 +543,7 @@ public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
     RegionAttributes attrs = factory.create();
     region = cache.createRegion(regionName, attrs);
     assertNotNull(region);
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Distributed Region " + regionName + " created Successfully :"
             + region.toString());
   }
@@ -549,7 +552,7 @@ public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
     for(int i = 0 ; i < 113; i++){
       region.put(i, "KB_"+i);
     }
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Distributed Region " + regionName + " Have size :"
             + region.size());
   }
@@ -558,7 +561,7 @@ public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
     Execution execute = FunctionService.onRegion(region);
     ResultCollector rc = execute.withArgs(Boolean.TRUE).execute(
         new TestFunction(true, TestFunction.TEST_FUNCTION_LASTRESULT));
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Exeuction Result :"
             + rc.getResult());
     List l = ((List)rc.getResult());
@@ -566,7 +569,7 @@ public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
   }
   
   public static void checkSize(){
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Partitioned Region " + regionName + " Have size :"
             + region.size());
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.java
index 9091155..aa77e5a 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.java
@@ -49,8 +49,11 @@ import com.gemstone.gemfire.internal.cache.functions.TestFunction;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
+import com.gemstone.gemfire.test.dunit.LogWriterSupport;
+import com.gemstone.gemfire.test.dunit.Threads;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
     PRClientServerTestBase {
@@ -331,7 +334,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
    */
   public void testServerFailoverWithTwoServerAliveHA()
       throws InterruptedException {
-    IgnoredException.addExpectedException("FunctionInvocationTargetException");
+    IgnoredException.addIgnoredException("FunctionInvocationTargetException");
     ArrayList commonAttributes = createCommonServerAttributes(
         "TestPartitionedRegion", null, 1, 13, null);
     createClientServerScenarion(commonAttributes, 20, 20, 20);
@@ -364,7 +367,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
     client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
         "verifyDeadAndLiveServers", new Object[] { new Integer(1),
             new Integer(2) });
-    DistributedTestCase.join(async[0], 6 * 60 * 1000, getLogWriter());
+    Threads.join(async[0], 6 * 60 * 1000, LogWriterSupport.getLogWriter());
     if (async[0].getException() != null) {
       Assert.fail("UnExpected Exception Occured : ", async[0].getException());
     }
@@ -379,7 +382,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
    */
   public void testServerCacheClosedFailoverWithTwoServerAliveHA()
       throws InterruptedException {
-    IgnoredException.addExpectedException("FunctionInvocationTargetException");
+    IgnoredException.addIgnoredException("FunctionInvocationTargetException");
     ArrayList commonAttributes = createCommonServerAttributes(
         "TestPartitionedRegion", null, 1, 13, null);
     createClientServerScenarion(commonAttributes, 20, 20, 20);
@@ -412,7 +415,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
         PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.class,
         "verifyDeadAndLiveServers", new Object[] { new Integer(1),
             new Integer(2) });
-    DistributedTestCase.join(async[0], 5 * 60 * 1000, getLogWriter());
+    Threads.join(async[0], 5 * 60 * 1000, LogWriterSupport.getLogWriter());
     if (async[0].getException() != null) {
       Assert.fail("UnExpected Exception Occured : ", async[0].getException());
     }
@@ -517,7 +520,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
 
       public boolean done() {
         int sz = pool.getConnectedServerCount();
-        getLogWriter().info(
+        LogWriterSupport.getLogWriter().info(
             "Checking for the Live Servers : Expected  : "
                 + expectedLiveServers + " Available :" + sz);
         if (sz == expectedLiveServers.intValue()) {
@@ -532,7 +535,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
         return excuse;
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 3 * 60 * 1000, 1000, true);
+    Wait.waitForCriterion(wc, 3 * 60 * 1000, 1000, true);
   }
 
   public static void executeFunction() throws ServerException,
@@ -571,7 +574,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
       }
     }
     catch (Exception e) {
-      getLogWriter().info("Got an exception : " + e.getMessage());
+      LogWriterSupport.getLogWriter().info("Got an exception : " + e.getMessage());
       assertTrue(e instanceof EOFException || e instanceof SocketException
           || e instanceof SocketTimeoutException
           || e instanceof ServerException || e instanceof IOException
@@ -592,7 +595,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
     ResultCollector rc1 = dataSet.withFilter(testKeysSet)
         .withArgs(Boolean.TRUE).execute(function.getId());
     List l = ((List)rc1.getResult());
-    getLogWriter().info("Result size : " + l.size());
+    LogWriterSupport.getLogWriter().info("Result size : " + l.size());
     return l;
   }
 
@@ -629,7 +632,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
         .getRegion(PartitionedRegionName);
     HashMap localBucket2RegionMap = (HashMap)region.getDataStore()
         .getSizeLocally();
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Size of the " + PartitionedRegionName + " in this VM :- "
             + localBucket2RegionMap.size());
     Set entrySet = localBucket2RegionMap.entrySet();
@@ -658,8 +661,8 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
       ResultCollector rc1 = executeOnAll(dataSet, Boolean.TRUE, function,
           isByName);
       List resultList = (List)((List)rc1.getResult());
-      getLogWriter().info("Result size : " + resultList.size());
-      getLogWriter().info("Result are SSSS : " + resultList);
+      LogWriterSupport.getLogWriter().info("Result size : " + resultList.size());
+      LogWriterSupport.getLogWriter().info("Result are SSSS : " + resultList);
       assertEquals(3, resultList.size());
 
       Iterator resultIterator = resultList.iterator();
@@ -718,7 +721,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
       }
       Map resultMap = region.getAll(testKeysList);
       assertTrue(resultMap.equals(origVals));
-      pause(2000);
+      Wait.pause(2000);
       Map secondResultMap = region.getAll(testKeysList);
       assertTrue(secondResultMap.equals(origVals));
 
@@ -748,7 +751,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
       }
       Map resultMap = region.getAll(testKeysList);
       assertTrue(resultMap.equals(origVals));
-      pause(2000);
+      Wait.pause(2000);
       Map secondResultMap = region.getAll(testKeysList);
       assertTrue(secondResultMap.equals(origVals));
 
@@ -796,7 +799,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
             .iterator().next());
       }
       catch (Exception expected) {
-        getLogWriter().info("Exception : " + expected.getMessage());
+        LogWriterSupport.getLogWriter().info("Exception : " + expected.getMessage());
         expected.printStackTrace();
         fail("Test failed after the put operation");
       }
@@ -826,7 +829,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
       ResultCollector rc1 = execute(dataSet, testKeysSet, Boolean.TRUE,
           function, isByName);
       l = ((List)rc1.getResult());
-      getLogWriter().info("Result size : " + l.size());
+      LogWriterSupport.getLogWriter().info("Result size : " + l.size());
       assertEquals(3, l.size());
       for (Iterator i = l.iterator(); i.hasNext();) {
         assertEquals(Boolean.TRUE, i.next());
@@ -879,7 +882,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
       ResultCollector rc1 = execute(dataSet, testKeysSet, Boolean.TRUE,
           function, isByName);
       l = ((List)rc1.getResult());
-      getLogWriter().info("Result size : " + l.size());
+      LogWriterSupport.getLogWriter().info("Result size : " + l.size());
       assertEquals(3, l.size());
       for (Iterator i = l.iterator(); i.hasNext();) {
         assertEquals(Boolean.TRUE, i.next());
@@ -918,7 +921,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
     }
     catch (Exception ex) {
       ex.printStackTrace();
-      getLogWriter().info("Exception : ", ex);
+      LogWriterSupport.getLogWriter().info("Exception : ", ex);
       Assert.fail("Test failed after the put operation", ex);
     }
   }
@@ -961,14 +964,14 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
             }
           });
       l = ((List)rc1.getResult());
-      getLogWriter().info("Result size : " + l.size());
+      LogWriterSupport.getLogWriter().info("Result size : " + l.size());
       assertEquals(3, l.size());
       for (Iterator i = l.iterator(); i.hasNext();) {
         assertEquals(Boolean.TRUE, i.next());
       }
     }
     catch (Exception e) {
-      getLogWriter().info("Exception : " + e.getMessage());
+      LogWriterSupport.getLogWriter().info("Exception : " + e.getMessage());
       e.printStackTrace();
       fail("Test failed after the put operation");
 
@@ -1055,7 +1058,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
     }
     catch (FunctionException expected) {
       expected.printStackTrace();
-      getLogWriter().info("Exception : " + expected.getMessage());
+      LogWriterSupport.getLogWriter().info("Exception : " + expected.getMessage());
       assertTrue(expected.getMessage().startsWith(
           (LocalizedStrings.ExecuteFunction_CANNOT_0_RESULTS_HASRESULT_FALSE
               .toLocalizedString("return any"))));
@@ -1116,7 +1119,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
     }
     catch (Exception ex) {
       ex.printStackTrace();
-      getLogWriter().info("Exception : ", ex);
+      LogWriterSupport.getLogWriter().info("Exception : ", ex);
       Assert.fail("Test failed after the put operation", ex);
     }
   }
@@ -1180,7 +1183,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
           });
     }
     catch (Exception expected) {
-      getLogWriter().fine("Exception occured : " + expected.getMessage());
+      LogWriterSupport.getLogWriter().fine("Exception occured : " + expected.getMessage());
       assertTrue(expected.getMessage().contains(
           "No target node found for KEY = " + testKey)
           || expected.getMessage()
@@ -1242,7 +1245,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
     }
     catch (Exception ex) {
       ex.printStackTrace();
-      getLogWriter().info("Exception : ", ex);
+      LogWriterSupport.getLogWriter().info("Exception : ", ex);
       Assert.fail("Test failed after the put operation", ex);
     }
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.java
index 0765533..1e782f4 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.java
@@ -49,8 +49,11 @@ import com.gemstone.gemfire.internal.cache.functions.TestFunction;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
+import com.gemstone.gemfire.test.dunit.LogWriterSupport;
+import com.gemstone.gemfire.test.dunit.Threads;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest extends
     PRClientServerTestBase {
@@ -288,11 +291,11 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
    */
   public void testServerFailoverWithTwoServerAliveHA()
       throws InterruptedException {
-    IgnoredException.addExpectedException("FunctionInvocationTargetException");
-    IgnoredException.addExpectedException("Connection reset");
-    IgnoredException.addExpectedException("SocketTimeoutException");
-    IgnoredException.addExpectedException("ServerConnectivityException");
-    IgnoredException.addExpectedException("Socket Closed");
+    IgnoredException.addIgnoredException("FunctionInvocationTargetException");
+    IgnoredException.addIgnoredException("Connection reset");
+    IgnoredException.addIgnoredException("SocketTimeoutException");
+    IgnoredException.addIgnoredException("ServerConnectivityException");
+    IgnoredException.addIgnoredException("Socket Closed");
     ArrayList commonAttributes = createCommonServerAttributes(
         "TestPartitionedRegion", null, 1, 13, null);
     createClientServerScenarion(commonAttributes, 20, 20, 20);
@@ -325,7 +328,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
     client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
         "verifyDeadAndLiveServers", new Object[] { new Integer(1),
             new Integer(2) });
-    DistributedTestCase.join(async[0], 6 * 60 * 1000, getLogWriter());
+    Threads.join(async[0], 6 * 60 * 1000, LogWriterSupport.getLogWriter());
     if (async[0].getException() != null) {
       Assert.fail("UnExpected Exception Occured : ", async[0].getException());
     }
@@ -340,11 +343,11 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
    */
   public void testServerCacheClosedFailoverWithTwoServerAliveHA()
       throws InterruptedException {
-    IgnoredException.addExpectedException("FunctionInvocationTargetException");
-    IgnoredException.addExpectedException("Connection reset");
-    IgnoredException.addExpectedException("SocketTimeoutException");
-    IgnoredException.addExpectedException("ServerConnectivityException");
-    IgnoredException.addExpectedException("Socket Closed");
+    IgnoredException.addIgnoredException("FunctionInvocationTargetException");
+    IgnoredException.addIgnoredException("Connection reset");
+    IgnoredException.addIgnoredException("SocketTimeoutException");
+    IgnoredException.addIgnoredException("ServerConnectivityException");
+    IgnoredException.addIgnoredException("Socket Closed");
     ArrayList commonAttributes = createCommonServerAttributes(
         "TestPartitionedRegion", null, 1, 13, null);
     createClientServerScenarion(commonAttributes, 20, 20, 20);
@@ -377,7 +380,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
         PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.class,
         "verifyDeadAndLiveServers", new Object[] { new Integer(1),
             new Integer(2) });
-    DistributedTestCase.join(async[0], 5 * 60 * 1000, getLogWriter());
+    Threads.join(async[0], 5 * 60 * 1000, LogWriterSupport.getLogWriter());
     if (async[0].getException() != null) {
       Assert.fail("UnExpected Exception Occured : ", async[0].getException());
     }
@@ -482,7 +485,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
 
       public boolean done() {
         int sz = pool.getConnectedServerCount();
-        getLogWriter().info(
+        LogWriterSupport.getLogWriter().info(
             "Checking for the Live Servers : Expected  : "
                 + expectedLiveServers + " Available :" + sz);
         if (sz == expectedLiveServers.intValue()) {
@@ -497,7 +500,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
         return excuse;
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 3 * 60 * 1000, 1000, true);
+    Wait.waitForCriterion(wc, 3 * 60 * 1000, 1000, true);
   }
 
   public static void executeFunction() throws ServerException,
@@ -536,7 +539,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
       }
     }
     catch (Exception e) {
-      getLogWriter().info("Got an exception : " + e.getMessage());
+      LogWriterSupport.getLogWriter().info("Got an exception : " + e.getMessage());
       assertTrue(e instanceof EOFException || e instanceof SocketException
           || e instanceof SocketTimeoutException
           || e instanceof ServerException || e instanceof IOException
@@ -557,7 +560,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
     ResultCollector rc1 = dataSet.withFilter(testKeysSet)
         .withArgs(Boolean.TRUE).execute(function.getId());
     List l = ((List)rc1.getResult());
-    getLogWriter().info("Result size : " + l.size());
+    LogWriterSupport.getLogWriter().info("Result size : " + l.size());
     return l;
   }
 
@@ -588,7 +591,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
         .getRegion(PartitionedRegionName);
     HashMap localBucket2RegionMap = (HashMap)region.getDataStore()
         .getSizeLocally();
-    getLogWriter().info(
+    LogWriterSupport.getLogWriter().info(
         "Size of the " + PartitionedRegionName + " in this VM :- "
             + localBucket2RegionMap.size());
     Set entrySet = localBucket2RegionMap.entrySet();
@@ -617,8 +620,8 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
       ResultCollector rc1 = executeOnAll(dataSet, Boolean.TRUE, function,
           isByName);
       List resultList = (List)((List)rc1.getResult());
-      getLogWriter().info("Result size : " + resultList.size());
-      getLogWriter().info("Result are SSSS : " + resultList);
+      LogWriterSupport.getLogWriter().info("Result size : " + resultList.size());
+      LogWriterSupport.getLogWriter().info("Result are SSSS : " + resultList);
       assertEquals(3, resultList.size());
 
       Iterator resultIterator = resultList.iterator();
@@ -677,7 +680,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
       }
       Map resultMap = region.getAll(testKeysList);
       assertTrue(resultMap.equals(origVals));
-      pause(2000);
+      Wait.pause(2000);
       Map secondResultMap = region.getAll(testKeysList);
       assertTrue(secondResultMap.equals(origVals));
 
@@ -707,7 +710,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
       }
       Map resultMap = region.getAll(testKeysList);
       assertTrue(resultMap.equals(origVals));
-      pause(2000);
+      Wait.pause(2000);
       Map secondResultMap = region.getAll(testKeysList);
       assertTrue(secondResultMap.equals(origVals));
 
@@ -755,7 +758,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
             .iterator().next());
       }
       catch (Exception expected) {
-        getLogWriter().info("Exception : " + expected.getMessage());
+        LogWriterSupport.getLogWriter().info("Exception : " + expected.getMessage());
         expected.printStackTrace();
         fail("Test failed after the put operation");
       }
@@ -785,7 +788,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
       ResultCollector rc1 = execute(dataSet, testKeysSet, Boolean.TRUE,
           function, isByName);
       l = ((List)rc1.getResult());
-      getLogWriter().info("Result size : " + l.size());
+      LogWriterSupport.getLogWriter().info("Result size : " + l.size());
       assertEquals(3, l.size());
       for (Iterator i = l.iterator(); i.hasNext();) {
         assertEquals(Boolean.TRUE, i.next());
@@ -837,7 +840,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
       ResultCollector rc1 = execute(dataSet, testKeysSet, Boolean.TRUE,
           function, isByName);
       l = ((List)rc1.getResult());
-      getLogWriter().info("Result size : " + l.size());
+      LogWriterSupport.getLogWriter().info("Result size : " + l.size());
       assertEquals(3, l.size());
       for (Iterator i = l.iterator(); i.hasNext();) {
         assertEquals(Boolean.TRUE, i.next());
@@ -876,7 +879,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
     }
     catch (Exception ex) {
       ex.printStackTrace();
-      getLogWriter().info("Exception : ", ex);
+      LogWriterSupport.getLogWriter().info("Exception : ", ex);
       Assert.fail("Test failed after the put operation", ex);
     }
   }
@@ -919,14 +922,14 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
             }
           });
       l = ((List)rc1.getResult());
-      getLogWriter().info("Result size : " + l.size());
+      LogWriterSupport.getLogWriter().info("Result size : " + l.size());
       assertEquals(3, l.size());
       for (Iterator i = l.iterator(); i.hasNext();) {
         assertEquals(Boolean.TRUE, i.next());
       }
     }
     catch (Exception e) {
-      getLogWriter().info("Exception : " + e.getMessage());
+      LogWriterSupport.getLogWriter().info("Exception : " + e.getMessage());
       e.printStackTrace();
       fail("Test failed after the put operation");
 
@@ -1013,7 +1016,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
     }
     catch (FunctionException expected) {
       expected.printStackTrace();
-      getLogWriter().info("Exception : " + expected.getMessage());
+      LogWriterSupport.getLogWriter().info("Exception : " + expected.getMessage());
       assertTrue(expected.getMessage().startsWith(
           (LocalizedStrings.ExecuteFunction_CANNOT_0_RESULTS_HASRESULT_FALSE
               .toLocalizedString("return any"))));
@@ -1074,7 +1077,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
     }
     catch (Exception ex) {
       ex.printStackTrace();
-      getLogWriter().info("Exception : ", ex);
+      LogWriterSupport.getLogWriter().info("Exception : ", ex);
       Assert.fail("Test failed after the put operation", ex);
     }
   }
@@ -1138,7 +1141,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
           });
     }
     catch (Exception expected) {
-      getLogWriter().fine("Exception occured : " + expected.getMessage());
+      LogWriterSupport.getLogWriter().fine("Exception occured : " + expected.getMessage());
       assertTrue(expected.getMessage().contains(
           "No target node found for KEY = " + testKey)
           || expected.getMessage()
@@ -1200,7 +1203,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
     }
     catch (Exception ex) {
       ex.printStackTrace();
-      getLogWriter().info("Exception : ", ex);
+      LogWriterSupport.getLogWriter().info("Exception : ", ex);
       Assert.fail("Test failed after the put operation", ex);
     }
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/76e324b5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSingleHopDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSingleHopDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSingleHopDUnitTest.java
index bb0b184..2851040 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSingleHopDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSingleHopDUnitTest.java
@@ -49,8 +49,11 @@ import com.gemstone.gemfire.internal.cache.functions.TestFunction;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
+import com.gemstone.gemfire.test.dunit.LogWriterSupport;
+import com.gemstone.gemfire.test.dunit.Threads;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
   public class PRClientServerRegionFunctionExecutionSingleHopDUnitTest extends PRClientServerTestBase {
     private static final String TEST_FUNCTION7 = TestFunction.TEST_FUNCTION7;
 
@@ -66,8 +69,8 @@ import com.gemstone.gemfire.test.dunit.IgnoredException;
     @Override
     public void setUp() throws Exception {
       //Workaround for bug #52004
-      IgnoredException.addExpectedException("InternalFunctionInvocationTargetException");
-      IgnoredException.addExpectedException("Connection refused");
+      IgnoredException.addIgnoredException("InternalFunctionInvocationTargetException");
+      IgnoredException.addIgnoredException("Connection refused");
       super.setUp();
     }
 
@@ -134,7 +137,7 @@ import com.gemstone.gemfire.test.dunit.IgnoredException;
       registerFunctionAtServer(function);
       isByName = Boolean.TRUE;
       // add expected exception for server going down after wait
-      final IgnoredException expectedEx = IgnoredException.addExpectedException(
+      final IgnoredException expectedEx = IgnoredException.addIgnoredException(
           DistributedSystemDisconnectedException.class.getName(), server1);
       try {
         client.invoke(
@@ -254,8 +257,8 @@ import com.gemstone.gemfire.test.dunit.IgnoredException;
      * After 5th attempt function will send Boolean as last result.
      */
     public void testserverMultiKeyExecution_FunctionInvocationTargetException() {
-      IgnoredException.addExpectedException("FunctionException: IOException while sending");
-      IgnoredException.addExpectedException("java.net.SocketException: Software caused connection abort");
+      IgnoredException.addIgnoredException("FunctionException: IOException while sending");
+      IgnoredException.addIgnoredException("java.net.SocketException: Software caused connection abort");
       createScenario();
       client.invoke(PRClientServerRegionFunctionExecutionSingleHopDUnitTest.class,
           "serverMultiKeyExecution_FunctionInvocationTargetException");
@@ -266,7 +269,7 @@ import com.gemstone.gemfire.test.dunit.IgnoredException;
      * object and using the name of the function
      */
     public void testserverMultiKeyExecutionNoResult_byName(){
-      IgnoredException.addExpectedException("Cannot send result");
+      IgnoredException.addIgnoredException("Cannot send result");
       createScenario();
       Function function = new TestFunction(false,TEST_FUNCTION7);
       registerFunctionAtServer(function);
@@ -350,7 +353,7 @@ import com.gemstone.gemfire.test.dunit.IgnoredException;
       client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
           "verifyDeadAndLiveServers", new Object[] { new Integer(1),
               new Integer(2) });
-      DistributedTestCase.join(async[0], 6 * 60 * 1000, getLogWriter());
+      Threads.join(async[0], 6 * 60 * 1000, LogWriterSupport.getLogWriter());
       if (async[0].getException() != null) {
         Assert.fail("UnExpected Exception Occured : ", async[0].getException());
       }
@@ -379,7 +382,7 @@ import com.gemstone.gemfire.test.dunit.IgnoredException;
       server3.invoke(PRClientServerRegionFunctionExecutionSingleHopDUnitTest.class, "startServerHA");
       server1.invoke(PRClientServerRegionFunctionExecutionSingleHopDUnitTest.class, "closeCacheHA");
       client.invoke(PRClientServerRegionFunctionExecutionSingleHopDUnitTest.class, "verifyDeadAndLiveServers",new Object[]{new Integer(1),new Integer(2)});
-      DistributedTestCase.join(async[0],  5 * 60 * 1000, getLogWriter());
+      Threads.join(async[0],  5 * 60 * 1000, LogWriterSupport.getLogWriter());
       if(async[0].getException() != null){
         Assert.fail("UnExpected Exception Occured : ", async[0].getException());
       }
@@ -483,7 +486,7 @@ import com.gemstone.gemfire.test.dunit.IgnoredException;
         String excuse;
         public boolean done() {
           int sz = pool.getConnectedServerCount();
-          getLogWriter().info(
+          LogWriterSupport.getLogWriter().info(
               "Checking for the Live Servers : Expected  : " + expectedLiveServers
                   + " Available :" + sz);
           if (sz == expectedLiveServers.intValue()) {
@@ -496,7 +499,7 @@ import com.gemstone.gemfire.test.dunit.IgnoredException;
           return excuse;
         }
       };
-      DistributedTestCase.waitForCriterion(wc, 3 * 60 * 1000, 1000, true);
+      Wait.waitForCriterion(wc, 3 * 60 * 1000, 1000, true);
     }
     
     public static void executeFunction() throws ServerException,
@@ -533,7 +536,7 @@ import com.gemstone.gemfire.test.dunit.IgnoredException;
         }
       }
       catch (Exception e) {
-        getLogWriter().info("Got an exception : " + e.getMessage());
+        LogWriterSupport.getLogWriter().info("Got an exception : " + e.getMessage());
         assertTrue(e instanceof EOFException || e instanceof SocketException
             || e instanceof SocketTimeoutException
             || e instanceof ServerException || e instanceof IOException
@@ -554,7 +557,7 @@ import com.gemstone.gemfire.test.dunit.IgnoredException;
       ResultCollector rc1 = dataSet.withFilter(testKeysSet).withArgs(Boolean.TRUE).execute(
           function.getId());
       List l = ((List)rc1.getResult());
-      getLogWriter().info("Result size : " + l.size());
+      LogWriterSupport.getLogWriter().info("Result size : " + l.size());
       return l;
     }
     
@@ -589,7 +592,7 @@ import com.gemstone.gemfire.test.dunit.IgnoredException;
       PartitionedRegion region = (PartitionedRegion)cache.getRegion(PartitionedRegionName);
       HashMap localBucket2RegionMap = (HashMap)region
       .getDataStore().getSizeLocally();
-      getLogWriter().info(
+      LogWriterSupport.getLogWriter().info(
       "Size of the " + PartitionedRegionName + " in this VM :- "
           + localBucket2RegionMap.size());
       Set entrySet = localBucket2RegionMap.entrySet();
@@ -617,8 +620,8 @@ import com.gemstone.gemfire.test.dunit.IgnoredException;
         }
         ResultCollector rc1 = executeOnAll(dataSet, Boolean.TRUE,  function, isByName);
         List resultList = ((List)rc1.getResult());
-        getLogWriter().info("Result size : " + resultList.size());
-        getLogWriter().info("Result are SSSS : " + resultList);
+        LogWriterSupport.getLogWriter().info("Result size : " + resultList.size());
+        LogWriterSupport.getLogWriter().info("Result are SSSS : " + resultList);
         assertEquals(3, resultList.size());
 
 //        while (resultIterator.hasNext()) {
@@ -671,7 +674,7 @@ import com.gemstone.gemfire.test.dunit.IgnoredException;
         }
         Map resultMap = region.getAll(testKeysList);
         assertTrue(resultMap.equals(origVals));
-        pause(2000);
+        Wait.pause(2000);
         Map secondResultMap = region.getAll(testKeysList);
         assertTrue(secondResultMap.equals(origVals));
         
@@ -700,7 +703,7 @@ import com.gemstone.gemfire.test.dunit.IgnoredException;
         }
         Map resultMap = region.getAll(testKeysList);
         assertTrue(resultMap.equals(origVals));
-        pause(2000);
+        Wait.pause(2000);
         Map secondResultMap = region.getAll(testKeysList);
         assertTrue(secondResultMap.equals(origVals));
         
@@ -748,7 +751,7 @@ import com.gemstone.gemfire.test.dunit.IgnoredException;
               .iterator().next());
         }
         catch (Exception expected) {
-          getLogWriter().info("Exception : " + expected.getMessage());
+          LogWriterSupport.getLogWriter().info("Exception : " + expected.getMessage());
           expected.printStackTrace();
           fail("Test failed after the put operation");
         }
@@ -777,7 +780,7 @@ import com.gemstone.gemfire.test.dunit.IgnoredException;
         List l = null;
         ResultCollector rc1 = execute(dataSet, testKeysSet, Boolean.TRUE,  function, isByName);
         l = ((List)rc1.getResult());
-        getLogWriter().info("Result size : " + l.size());
+        LogWriterSupport.getLogWriter().info("Result size : " + l.size());
         assertEquals(3, l.size());
         for (Iterator i = l.iterator(); i.hasNext();) {
           assertEquals(Boolean.TRUE, i.next());
@@ -827,7 +830,7 @@ import com.gemstone.gemfire.test.dunit.IgnoredException;
         ResultCollector rc1 = execute(dataSet, testKeysSet, Boolean.TRUE,
             function, isByName);
         l = ((List)rc1.getResult());
-        getLogWriter().info("Result size : " + l.size());
+        LogWriterSupport.getLogWriter().info("Result size : " + l.size());
         assertEquals(3, l.size());
         for (Iterator i = l.iterator(); i.hasNext();) {
           assertEquals(Boolean.TRUE, i.next());
@@ -863,7 +866,7 @@ import com.gemstone.gemfire.test.dunit.IgnoredException;
 
       }catch (Exception ex) {
         ex.printStackTrace();
-        getLogWriter().info("Exception : " , ex);
+        LogWriterSupport.getLogWriter().info("Exception : " , ex);
         Assert.fail("Test failed after the put operation",ex);
       }
     }
@@ -907,13 +910,13 @@ import com.gemstone.gemfire.test.dunit.IgnoredException;
           }
         });
         l = ((List)rc1.getResult());
-        getLogWriter().info("Result size : " + l.size());
+        LogWriterSupport.getLogWriter().info("Result size : " + l.size());
         assertEquals(3, l.size());
         for (Iterator i = l.iterator(); i.hasNext();) {
           assertEquals(Boolean.TRUE, i.next());
         }
       }catch(Exception e){
-        getLogWriter().info("Exception : " + e.getMessage());
+        LogWriterSupport.getLogWriter().info("Exception : " + e.getMessage());
         e.printStackTrace();
         fail("Test failed after the put operation");
         
@@ -1000,7 +1003,7 @@ import com.gemstone.gemfire.test.dunit.IgnoredException;
         fail("Test failed after the put operation");
       } catch(FunctionException expected) {
         expected.printStackTrace();
-        getLogWriter().info("Exception : " + expected.getMessage());
+        LogWriterSupport.getLogWriter().info("Exception : " + expected.getMessage());
         assertTrue(expected.getMessage().startsWith((LocalizedStrings.ExecuteFunction_CANNOT_0_RESULTS_HASRESULT_FALSE
             .toLocalizedString("return any"))));
       }
@@ -1058,7 +1061,7 @@ import com.gemstone.gemfire.test.dunit.IgnoredException;
 
       }catch (Exception ex) {
         ex.printStackTrace();
-        getLogWriter().info("Exception : " , ex);
+        LogWriterSupport.getLogWriter().info("Exception : " , ex);
         Assert.fail("Test failed after the put operation",ex);
       }
     }
@@ -1125,7 +1128,7 @@ import com.gemstone.gemfire.test.dunit.IgnoredException;
         });
       }
       catch (Exception expected) {
-        getLogWriter().fine("Exception occured : " + expected.getMessage());
+        LogWriterSupport.getLogWriter().fine("Exception occured : " + expected.getMessage());
         assertTrue(expected.getMessage().contains(
             "No target node found for KEY = " + testKey)
             || expected.getMessage()
@@ -1187,7 +1190,7 @@ import com.gemstone.gemfire.test.dunit.IgnoredException;
 
       }catch (Exception ex) {
         ex.printStackTrace();
-        getLogWriter().info("Exception : " , ex);
+        LogWriterSupport.getLogWriter().info("Exception : " , ex);
         Assert.fail("Test failed after the put operation",ex);
       }
     }


Mime
View raw message