geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [42/51] [partial] incubator-geode git commit: GEODE-773: Extract static methods from DistributedTestCase
Date Tue, 09 Feb 2016 18:44:52 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml90DUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml90DUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml90DUnitTest.java
index a3df9e9..21e6c61 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml90DUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml90DUnitTest.java
@@ -29,6 +29,7 @@ import com.gemstone.gemfire.internal.cache.xmlcache.CacheXml;
 import com.gemstone.gemfire.internal.cache.xmlcache.RegionAttributesCreation;
 import com.gemstone.gemfire.internal.cache.xmlcache.ResourceManagerCreation;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+import com.gemstone.gemfire.test.dunit.IgnoredException;
 
 
 public class CacheXml90DUnitTest extends CacheXml81DUnitTest {
@@ -90,7 +91,7 @@ public class CacheXml90DUnitTest extends CacheXml81DUnitTest {
     assertNotNull(regionBefore);
     assertEquals(true, regionBefore.getAttributes().getOffHeap());
 
-    ExpectedException expectedException = CacheTestCase.addExpectedException(LocalizedStrings.
+    IgnoredException expectedException = IgnoredException.addIgnoredException(LocalizedStrings.
         LocalRegion_THE_REGION_0_WAS_CONFIGURED_TO_USE_OFF_HEAP_MEMORY_BUT_OFF_HEAP_NOT_CONFIGURED.toLocalizedString("/"+regionName));
     try {
       testXml(cache);
@@ -124,7 +125,7 @@ public class CacheXml90DUnitTest extends CacheXml81DUnitTest {
     assertNotNull(subRegionBefore);
     assertEquals(true, subRegionBefore.getAttributes().getOffHeap());
 
-    ExpectedException expectedException = CacheTestCase.addExpectedException(LocalizedStrings.
+    IgnoredException expectedException = IgnoredException.addIgnoredException(LocalizedStrings.
         LocalRegion_THE_REGION_0_WAS_CONFIGURED_TO_USE_OFF_HEAP_MEMORY_BUT_OFF_HEAP_NOT_CONFIGURED.toLocalizedString("/"+rootRegionName+"/"+subRegionName));
     try {
       testXml(cache);
@@ -181,7 +182,7 @@ public class CacheXml90DUnitTest extends CacheXml81DUnitTest {
       rmc.setEvictionOffHeapPercentage(high);
       rmc.setCriticalOffHeapPercentage(low);
       cache.setResourceManagerCreation(rmc);
-      ExpectedException expectedException = CacheTestCase.addExpectedException(LocalizedStrings.MemoryMonitor_EVICTION_PERCENTAGE_LTE_CRITICAL_PERCENTAGE.toLocalizedString());
+      IgnoredException expectedException = IgnoredException.addIgnoredException(LocalizedStrings.MemoryMonitor_EVICTION_PERCENTAGE_LTE_CRITICAL_PERCENTAGE.toLocalizedString());
       try {
         testXml(cache);
         assertTrue(false);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheXmlTestCase.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheXmlTestCase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheXmlTestCase.java
index 555f75a..dd127cb 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheXmlTestCase.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheXmlTestCase.java
@@ -29,6 +29,7 @@ import com.gemstone.gemfire.internal.cache.xmlcache.CacheCreation;
 import com.gemstone.gemfire.internal.cache.xmlcache.CacheXml;
 import com.gemstone.gemfire.internal.cache.xmlcache.CacheXmlGenerator;
 import com.gemstone.gemfire.internal.cache.xmlcache.ClientCacheCreation;
+import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.util.test.TestUtil;
 
 public class CacheXmlTestCase extends CacheTestCase {
@@ -48,9 +49,13 @@ public class CacheXmlTestCase extends CacheTestCase {
     disconnectAllFromDS();
   }
 
-  public void tearDown2() throws Exception {
+  @Override
+  protected final void preTearDownCacheTestCase() throws Exception {
     this.xmlFile = null;    
-    super.tearDown2();
+  }
+  
+  @Override
+  protected final void postTearDownCacheTestCase() throws Exception {
     disconnectAllFromDS();
   }
 
@@ -123,7 +128,7 @@ public class CacheXmlTestCase extends CacheTestCase {
 
     } catch (IOException ex) {
       String s = "While generating XML";
-      fail(s, ex);
+      Assert.fail(s, ex);
     }
 
     setXmlFile(file);
@@ -146,7 +151,7 @@ public class CacheXmlTestCase extends CacheTestCase {
           useSchema, version);
       CacheXmlGenerator.generate(cache, new PrintWriter(sw, true),
           useSchema, version);
-      fail(sw.toString(), re);
+      Assert.fail(sw.toString(), re);
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CertifiableTestCacheListener.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CertifiableTestCacheListener.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CertifiableTestCacheListener.java
index c1f53c7..65dd6a2 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CertifiableTestCacheListener.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CertifiableTestCacheListener.java
@@ -26,8 +26,8 @@ import java.util.*;
 import com.gemstone.gemfire.LogWriter;
 import com.gemstone.gemfire.cache.EntryEvent;
 import com.gemstone.gemfire.internal.cache.xmlcache.Declarable2;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 public class CertifiableTestCacheListener extends TestCacheListener implements Declarable2 {
   final public Set destroys = Collections.synchronizedSet(new HashSet());
@@ -100,7 +100,7 @@ public class CertifiableTestCacheListener extends TestCacheListener implements D
         return "Waiting for key creation: " + key;
       }
     };
-    DistributedTestCase.waitForCriterion(ev, MAX_TIME, 200, true);
+    Wait.waitForCriterion(ev, MAX_TIME, 200, true);
     return true;
   }
   
@@ -113,7 +113,7 @@ public class CertifiableTestCacheListener extends TestCacheListener implements D
         return "Waiting for key destroy: " + key;
       }
     };
-    DistributedTestCase.waitForCriterion(ev, MAX_TIME, 200, true);
+    Wait.waitForCriterion(ev, MAX_TIME, 200, true);
     return true;
   }
   
@@ -126,7 +126,7 @@ public class CertifiableTestCacheListener extends TestCacheListener implements D
         return "Waiting for key invalidate: " + key;
       }
     };
-    DistributedTestCase.waitForCriterion(ev, MAX_TIME, 200, true);
+    Wait.waitForCriterion(ev, MAX_TIME, 200, true);
     return true;
   }
   
@@ -139,7 +139,7 @@ public class CertifiableTestCacheListener extends TestCacheListener implements D
         return "Waiting for key update: " + key;
       }
     };
-    DistributedTestCase.waitForCriterion(ev, MAX_TIME, 200, true);
+    Wait.waitForCriterion(ev, MAX_TIME, 200, true);
     return true;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClearMultiVmCallBkDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClearMultiVmCallBkDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClearMultiVmCallBkDUnitTest.java
index 849768a..1d5b621 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClearMultiVmCallBkDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClearMultiVmCallBkDUnitTest.java
@@ -37,6 +37,7 @@ import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
 import com.gemstone.gemfire.distributed.DistributedSystem;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.VM;
 
 /**
@@ -68,16 +69,16 @@ public class ClearMultiVmCallBkDUnitTest extends DistributedTestCase{
       VM vm1 = host.getVM(1);
       vm0.invoke(ClearMultiVmCallBkDUnitTest.class, "createCache");
       vm1.invoke(ClearMultiVmCallBkDUnitTest.class, "createCache");
-      getLogWriter().fine("Cache created in successfully");
+      LogWriterUtils.getLogWriter().fine("Cache created in successfully");
     }
     
-    public void tearDown2(){
-        Host host = Host.getHost(0);
-        VM vm0 = host.getVM(0);
-        VM vm1 = host.getVM(1);
-        vm0.invoke(ClearMultiVmCallBkDUnitTest.class, "closeCache");
-        vm1.invoke(ClearMultiVmCallBkDUnitTest.class, "closeCache");
-        
+    @Override
+    protected final void preTearDown() throws Exception {
+      Host host = Host.getHost(0);
+      VM vm0 = host.getVM(0);
+      VM vm1 = host.getVM(1);
+      vm0.invoke(ClearMultiVmCallBkDUnitTest.class, "closeCache");
+      vm1.invoke(ClearMultiVmCallBkDUnitTest.class, "closeCache");
     }
     
     public static void createCache(){
@@ -131,10 +132,10 @@ public class ClearMultiVmCallBkDUnitTest extends DistributedTestCase{
             vm0.invoke(ClearMultiVmCallBkDUnitTest.class, "putMethod", objArr);
             
         }
-        getLogWriter().fine("Did all puts successfully");
+        LogWriterUtils.getLogWriter().fine("Did all puts successfully");
         
         vm0.invoke(ClearMultiVmCallBkDUnitTest.class,"clearMethod");
-        getLogWriter().fine("Did clear successfully");
+        LogWriterUtils.getLogWriter().fine("Did clear successfully");
         
         while(afterClear){
         }       
@@ -157,10 +158,10 @@ public class ClearMultiVmCallBkDUnitTest extends DistributedTestCase{
             vm0.invoke(ClearMultiVmCallBkDUnitTest.class, "putMethod", objArr);
             vm1.invoke(ClearMultiVmCallBkDUnitTest.class, "getMethod", objArr);
         }
-        getLogWriter().fine("Did all puts successfully");
+        LogWriterUtils.getLogWriter().fine("Did all puts successfully");
         //vm0.invoke(ClearMultiVmCallBkDUnitTest.class,"putMethod");
         vm1.invoke(ClearMultiVmCallBkDUnitTest.class,"clearMethod");
-        getLogWriter().fine("Did clear successfully");
+        LogWriterUtils.getLogWriter().fine("Did clear successfully");
         
         while(afterClear){
         }       
@@ -230,7 +231,7 @@ public class ClearMultiVmCallBkDUnitTest extends DistributedTestCase{
     static class ListenerCallBk extends CacheListenerAdapter {
   
         public void afterRegionClear(RegionEvent event){
-            getLogWriter().fine("In afterClear:: CacheListener Callback");
+            LogWriterUtils.getLogWriter().fine("In afterClear:: CacheListener Callback");
             try {
                 int i = 7;
                 region.put(""+i, "inAfterClear");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClearMultiVmDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClearMultiVmDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClearMultiVmDUnitTest.java
index 5a87127..8553fe6 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClearMultiVmDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClearMultiVmDUnitTest.java
@@ -36,10 +36,13 @@ import com.gemstone.gemfire.cache.RegionDestroyedException;
 import com.gemstone.gemfire.cache.Scope;
 import com.gemstone.gemfire.cache.UnsupportedOperationInTransactionException;
 import com.gemstone.gemfire.distributed.DistributedSystem;
+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.Host;
+import com.gemstone.gemfire.test.dunit.Invoke;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.ThreadUtils;
 import com.gemstone.gemfire.test.dunit.VM;
 
 /**
@@ -72,15 +75,15 @@ public class ClearMultiVmDUnitTest extends DistributedTestCase{
       vm1.invoke(ClearMultiVmDUnitTest.class, "createCache");
     }
     
-    public void tearDown2(){
-        Host host = Host.getHost(0);
-        VM vm0 = host.getVM(0);
-        VM vm1 = host.getVM(1);
-        vm0.invoke(ClearMultiVmDUnitTest.class, "closeCache");
-        vm1.invoke(ClearMultiVmDUnitTest.class, "closeCache");
-        cache = null;
-        invokeInEveryVM(new SerializableRunnable() { public void run() { cache = null; } });
-        
+    @Override
+    protected final void preTearDown() throws Exception {
+      Host host = Host.getHost(0);
+      VM vm0 = host.getVM(0);
+      VM vm1 = host.getVM(1);
+      vm0.invoke(ClearMultiVmDUnitTest.class, "closeCache");
+      vm1.invoke(ClearMultiVmDUnitTest.class, "closeCache");
+      cache = null;
+      Invoke.invokeInEveryVM(new SerializableRunnable() { public void run() { cache = null; } });
     }
     
     public static void createCache(){
@@ -211,15 +214,15 @@ public class ClearMultiVmDUnitTest extends DistributedTestCase{
         
         AsyncInvocation as1 = vm0.invokeAsync(ClearMultiVmDUnitTest.class, "firstVM");
         AsyncInvocation as2 = vm1.invokeAsync(ClearMultiVmDUnitTest.class, "secondVM");
-        DistributedTestCase.join(as1, 30 * 1000, getLogWriter());
-        DistributedTestCase.join(as2, 30 * 1000, getLogWriter());
+        ThreadUtils.join(as1, 30 * 1000);
+        ThreadUtils.join(as2, 30 * 1000);
         
         if(as1.exceptionOccurred()){
-          fail("as1 failed", as1.getException());
+          Assert.fail("as1 failed", as1.getException());
         }
         
         if(as2.exceptionOccurred()){
-          fail("as2 failed", as2.getException());
+          Assert.fail("as2 failed", as2.getException());
         }
         
         int j = vm0.invokeInt(ClearMultiVmDUnitTest.class, "sizeMethod");
@@ -327,9 +330,9 @@ public class ClearMultiVmDUnitTest extends DistributedTestCase{
             }
         });
         
-        DistributedTestCase.join(async1, 30 * 1000, getLogWriter());
+        ThreadUtils.join(async1, 30 * 1000);
         if(async1.exceptionOccurred()){
-          fail("async1 failed", async1.getException());
+          Assert.fail("async1 failed", async1.getException());
         }
         
         SerializableRunnable validate = new

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
index 9251a56..dbbaaa8 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
@@ -54,11 +54,14 @@ import com.gemstone.gemfire.internal.logging.InternalLogWriter;
 import com.gemstone.gemfire.management.membership.ClientMembership;
 import com.gemstone.gemfire.management.membership.ClientMembershipEvent;
 import com.gemstone.gemfire.management.membership.ClientMembershipListener;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.IgnoredException;
+import com.gemstone.gemfire.test.dunit.NetworkUtils;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 /**
  * Tests the ClientMembership API including ClientMembershipListener.
@@ -83,8 +86,8 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     super.setUp();
   }
   
-  public void tearDown2() throws Exception {
-    super.tearDown2();
+  @Override
+  protected final void postTearDownCacheTestCase() throws Exception {
     InternalClientMembership.unregisterAllListeners();
   }
 
@@ -104,7 +107,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
         return excuse;
       }
     };
-    DistributedTestCase.waitForCriterion(ev, 60 * 1000, 200, true);
+    Wait.waitForCriterion(ev, 60 * 1000, 200, true);
   }
   
   protected int getAcceptsInProgress() {
@@ -119,9 +122,9 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
       never arrives. 
    */
   public void testConnectionTimeout() throws Exception {
-    addExpectedException("failed accepting client connection");
+    IgnoredException.addIgnoredException("failed accepting client connection");
     final Host host = Host.getHost(0);
-    final String hostName = getServerHostName(host);
+    final String hostName = NetworkUtils.getServerHostName(host);
     final VM vm0 = host.getVM(0);
     System.setProperty(AcceptorImpl.ACCEPT_TIMEOUT_PROPERTY_NAME, "1000");
     try {
@@ -132,7 +135,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
       SerializableRunnable createMeanSocket = new CacheSerializableRunnable("Connect to server with socket") {
         public void run2() throws CacheException {
           getCache(); // create a cache so we have stats
-          getLogWriter().info("connecting to cache server with socket");
+          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("connecting to cache server with socket");
           try {
             InetAddress addr = InetAddress.getByName(hostName);
             meanSocket = new Socket(addr, port);
@@ -144,7 +147,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
       };
       SerializableRunnable closeMeanSocket = new CacheSerializableRunnable("close mean socket") {
         public void run2() throws CacheException {
-          getLogWriter().info("closing mean socket");
+          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("closing mean socket");
           try {
             meanSocket.close();
           }
@@ -155,28 +158,28 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
 
       assertEquals(0, getAcceptsInProgress());
       
-      getLogWriter().info("creating mean socket");
+      com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("creating mean socket");
       vm0.invoke(createMeanSocket);
       try {
-        getLogWriter().info("waiting to see it connect on server");
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("waiting to see it connect on server");
         waitForAcceptsInProgressToBe(1);
       } finally {
-        getLogWriter().info("closing mean socket");
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("closing mean socket");
         vm0.invoke(closeMeanSocket);
       }
-      getLogWriter().info("waiting to see accept to go away on server");
+      com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("waiting to see accept to go away on server");
       waitForAcceptsInProgressToBe(0);
 
       // now try it without a close. Server should timeout the mean connect
-      getLogWriter().info("creating mean socket 2");
+      com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("creating mean socket 2");
       vm0.invoke(createMeanSocket);
       try {
-        getLogWriter().info("waiting to see it connect on server 2");
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("waiting to see it connect on server 2");
         waitForAcceptsInProgressToBe(1);
-        getLogWriter().info("waiting to see accept to go away on server without us closing");
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("waiting to see accept to go away on server without us closing");
         waitForAcceptsInProgressToBe(0);
       } finally {
-        getLogWriter().info("closing mean socket 2");
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("closing mean socket 2");
         vm0.invoke(closeMeanSocket);
       }
 
@@ -734,7 +737,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
    */
   public void testClientMembershipEventsInClient() throws Exception {
     getSystem();
-    addExpectedException("IOException");
+    IgnoredException.addIgnoredException("IOException");
     final boolean[] fired = new boolean[3];
     final DistributedMember[] member = new DistributedMember[3];
     final String[] memberId = new String[3];
@@ -743,7 +746,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     // create and register ClientMembershipListener in controller vm...
     ClientMembershipListener listener = new ClientMembershipListener() {
       public synchronized void memberJoined(ClientMembershipEvent event) {
-        getLogWriter().info("[testClientMembershipEventsInClient] memberJoined: " + event);
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient] memberJoined: " + event);
         fired[JOINED] = true;
         member[JOINED] = event.getMember();
         memberId[JOINED] = event.getMemberId();
@@ -751,11 +754,11 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
         notifyAll();
       }
       public synchronized void memberLeft(ClientMembershipEvent event) {
-        getLogWriter().info("[testClientMembershipEventsInClient] memberLeft: " + event);
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient] memberLeft: " + event);
 //        fail("Please update testClientMembershipEventsInClient to handle memberLeft for BridgeServer.");
       }
       public synchronized void memberCrashed(ClientMembershipEvent event) {
-        getLogWriter().info("[testClientMembershipEventsInClient] memberCrashed: " + event);
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient] memberCrashed: " + event);
         fired[CRASHED] = true;
         member[CRASHED] = event.getMember();
         memberId[CRASHED] = event.getMemberId();
@@ -773,7 +776,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     vm0.invoke(new CacheSerializableRunnable("Create BridgeServer") {
       public void run2() throws CacheException {
         try {
-          getLogWriter().info("[testClientMembershipEventsInClient] Create BridgeServer");
+          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient] Create BridgeServer");
           getSystem();
           AttributesFactory factory = new AttributesFactory();
           factory.setScope(Scope.LOCAL);
@@ -800,9 +803,9 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     String serverMemberId = (String) vm0.invoke(ClientMembershipDUnitTest.class,
                                                 "getMemberId");
 
-    getLogWriter().info("[testClientMembershipEventsInClient] ports[0]=" + ports[0]);
-    getLogWriter().info("[testClientMembershipEventsInClient] serverMember=" + serverMember);
-    getLogWriter().info("[testClientMembershipEventsInClient] serverMemberId=" + serverMemberId);
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient] ports[0]=" + ports[0]);
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient] serverMember=" + serverMember);
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient] serverMemberId=" + serverMemberId);
 
     assertFalse(fired[JOINED]);
     assertNull(member[JOINED]);
@@ -818,7 +821,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     assertFalse(isClient[CRASHED]);
     
     // sanity check...
-    getLogWriter().info("[testClientMembershipEventsInClient] sanity check");
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient] sanity check");
     DistributedMember test = new TestDistributedMember("test");
     InternalClientMembership.notifyJoined(test, SERVER);
     synchronized(listener) {
@@ -842,7 +845,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     resetArraysForTesting(fired, member, memberId, isClient);
     
     // create bridge client in controller vm...
-    getLogWriter().info("[testClientMembershipEventsInClient] create bridge client");
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient] create bridge client");
     Properties config = new Properties();
     config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
     config.setProperty(DistributionConfig.LOCATORS_NAME, "");
@@ -852,12 +855,12 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
       getCache();
       AttributesFactory factory = new AttributesFactory();
       factory.setScope(Scope.LOCAL);
-      ClientServerTestCase.configureConnectionPool(factory, getServerHostName(Host.getHost(0)), ports, true, -1, -1, null);
+      ClientServerTestCase.configureConnectionPool(factory, NetworkUtils.getServerHostName(Host.getHost(0)), ports, true, -1, -1, null);
       createRegion(name, factory.create());
       assertNotNull(getRootRegion().getSubregion(name));
     }
     catch (CacheException ex) {
-      fail("While creating Region on Edge", ex);
+      Assert.fail("While creating Region on Edge", ex);
     }
     synchronized(listener) {
       if (!fired[JOINED] && !fired[CRASHED]) {
@@ -865,7 +868,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
       }
     }
     
-    getLogWriter().info("[testClientMembershipEventsInClient] assert client detected server join");
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient] assert client detected server join");
     
     // first check the getCurrentServers() result
     ClientCache clientCache = (ClientCache)getCache();
@@ -894,7 +897,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
 
     vm0.invoke(new SerializableRunnable("Stop BridgeServer") {
       public void run() {
-        getLogWriter().info("[testClientMembershipEventsInClient] Stop BridgeServer");
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient] Stop BridgeServer");
         stopBridgeServers(getCache());
       }
     });
@@ -904,7 +907,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
       }
     }
     
-    getLogWriter().info("[testClientMembershipEventsInClient] assert client detected server departure");
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient] assert client detected server departure");
     assertFalse(fired[JOINED]);
     assertNull(member[JOINED]);
     assertNull(memberId[JOINED]);
@@ -925,7 +928,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     vm0.invoke(new CacheSerializableRunnable("Recreate BridgeServer") {
       public void run2() throws CacheException {
         try {
-          getLogWriter().info("[testClientMembershipEventsInClient] restarting BridgeServer");
+          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient] restarting BridgeServer");
           startBridgeServer(ports[0]);
         }
         catch(IOException e) {
@@ -940,7 +943,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
       }
     }
     
-    getLogWriter().info("[testClientMembershipEventsInClient] assert client detected server recovery");
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient] assert client detected server recovery");
     assertTrue(fired[JOINED]);
     assertNotNull(member[JOINED]);
     assertNotNull(memberId[JOINED]);
@@ -969,7 +972,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     // create and register ClientMembershipListener in controller vm...
     ClientMembershipListener listener = new ClientMembershipListener() {
       public synchronized void memberJoined(ClientMembershipEvent event) {
-        getLogWriter().info("[testClientMembershipEventsInServer] memberJoined: " + event);
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer] memberJoined: " + event);
         fired[JOINED] = true;
         member[JOINED] = event.getMember();
         memberId[JOINED] = event.getMemberId();
@@ -978,7 +981,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
         assertFalse(fired[LEFT] || fired[CRASHED]);
       }
       public synchronized void memberLeft(ClientMembershipEvent event) {
-        getLogWriter().info("[testClientMembershipEventsInServer] memberLeft: " + event);
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer] memberLeft: " + event);
         fired[LEFT] = true;
         member[LEFT] = event.getMember();
         memberId[LEFT] = event.getMemberId();
@@ -987,7 +990,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
         assertFalse(fired[JOINED] || fired[CRASHED]);
       }
       public synchronized void memberCrashed(ClientMembershipEvent event) {
-        getLogWriter().info("[testClientMembershipEventsInServer] memberCrashed: " + event);
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer] memberCrashed: " + event);
         fired[CRASHED] = true;
         member[CRASHED] = event.getMember();
         memberId[CRASHED] = event.getMemberId();
@@ -1003,7 +1006,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     final int[] ports = new int[1];
 
     // create BridgeServer in controller vm...
-    getLogWriter().info("[testClientMembershipEventsInServer] Create BridgeServer");
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer] Create BridgeServer");
     getSystem();
     AttributesFactory factory = new AttributesFactory();
     factory.setScope(Scope.LOCAL);
@@ -1016,9 +1019,9 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     String serverMemberId = getMemberId();
     DistributedMember serverMember = getDistributedMember();
 
-    getLogWriter().info("[testClientMembershipEventsInServer] ports[0]=" + ports[0]);
-    getLogWriter().info("[testClientMembershipEventsInServer] serverMemberId=" + serverMemberId);
-    getLogWriter().info("[testClientMembershipEventsInServer] serverMember=" + serverMember);
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer] ports[0]=" + ports[0]);
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer] serverMemberId=" + serverMemberId);
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer] serverMember=" + serverMember);
 
     assertFalse(fired[JOINED]);
     assertNull(member[JOINED]);
@@ -1034,7 +1037,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     assertFalse(isClient[CRASHED]);
     
     // sanity check...
-    getLogWriter().info("[testClientMembershipEventsInServer] sanity check");
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer] sanity check");
     DistributedMember test = new TestDistributedMember("test");
     InternalClientMembership.notifyJoined(test, CLIENT);
     synchronized(listener) {
@@ -1060,14 +1063,14 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     SerializableRunnable createConnectionPool =
     new CacheSerializableRunnable("Create connectionPool") {
       public void run2() throws CacheException {
-        getLogWriter().info("[testClientMembershipEventsInServer] create bridge client");
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer] create bridge client");
         Properties config = new Properties();
         config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
         config.setProperty(DistributionConfig.LOCATORS_NAME, "");
         getSystem(config);
         AttributesFactory factory = new AttributesFactory();
         factory.setScope(Scope.LOCAL);
-        ClientServerTestCase.configureConnectionPool(factory, getServerHostName(host), ports, true, -1, 2, null);
+        ClientServerTestCase.configureConnectionPool(factory, NetworkUtils.getServerHostName(host), ports, true, -1, 2, null);
         createRegion(name, factory.create());
         assertNotNull(getRootRegion().getSubregion(name));
       }
@@ -1086,7 +1089,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
       }
     }
     
-    getLogWriter().info("[testClientMembershipEventsInServer] assert server detected client join");
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer] assert server detected client join");
     assertTrue(fired[JOINED]);
     assertEquals(member[JOINED] + " should equal " + clientMember,
       clientMember, member[JOINED]);
@@ -1107,7 +1110,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     
     vm0.invoke(new SerializableRunnable("Stop bridge client") {
       public void run() {
-        getLogWriter().info("[testClientMembershipEventsInServer] Stop bridge client");
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer] Stop bridge client");
         getRootRegion().getSubregion(name).close();
         Map m = PoolManager.getAll();
         Iterator mit = m.values().iterator();
@@ -1124,7 +1127,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
       }
     }
     
-    getLogWriter().info("[testClientMembershipEventsInServer] assert server detected client left");
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer] assert server detected client left");
     assertFalse(fired[JOINED]);
     assertNull(member[JOINED]);
     assertNull(memberId[JOINED]);
@@ -1150,7 +1153,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
       }
     }
     
-    getLogWriter().info("[testClientMembershipEventsInServer] assert server detected client re-join");
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer] assert server detected client re-join");
     assertTrue(fired[JOINED]);
     assertEquals(clientMember, member[JOINED]);
     assertEquals(clientMemberId, memberId[JOINED]);
@@ -1171,7 +1174,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     try {
       vm0.invoke(new SerializableRunnable("Stop bridge client") {
         public void run() {
-          getLogWriter().info("[testClientMembershipEventsInServer] Stop bridge client");
+          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer] Stop bridge client");
           getRootRegion().getSubregion(name).close();
           Map m = PoolManager.getAll();
           Iterator mit = m.values().iterator();
@@ -1188,7 +1191,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
         }
       }
       
-      getLogWriter().info("[testClientMembershipEventsInServer] assert server detected client crashed");
+      com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer] assert server detected client crashed");
       assertFalse(fired[JOINED]);
       assertNull(member[JOINED]);
       assertNull(memberId[JOINED]);
@@ -1217,7 +1220,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
    * timeout.
    */
   private void pauseForClientToJoin() {
-    pause(2000);
+    Wait.pause(2000);
   }
   
   /** 
@@ -1308,10 +1311,10 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     final String name = this.getUniqueName();
     final int[] ports = new int[1];
     
-    addExpectedException("ConnectException");
+    IgnoredException.addIgnoredException("ConnectException");
 
     // create BridgeServer in controller vm...
-    getLogWriter().info("[testGetConnectedClients] Create BridgeServer");
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetConnectedClients] Create BridgeServer");
     getSystem();
     AttributesFactory factory = new AttributesFactory();
     factory.setScope(Scope.LOCAL);
@@ -1323,14 +1326,14 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     assertTrue(ports[0] != 0);
     String serverMemberId = getMemberId();
 
-    getLogWriter().info("[testGetConnectedClients] ports[0]=" + ports[0]);
-    getLogWriter().info("[testGetConnectedClients] serverMemberId=" + serverMemberId);
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetConnectedClients] ports[0]=" + ports[0]);
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetConnectedClients] serverMemberId=" + serverMemberId);
 
     final Host host = Host.getHost(0);
     SerializableRunnable createPool =
     new CacheSerializableRunnable("Create connection pool") {
       public void run2() throws CacheException {
-        getLogWriter().info("[testGetConnectedClients] create bridge client");
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetConnectedClients] create bridge client");
         Properties config = new Properties();
         config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
         config.setProperty(DistributionConfig.LOCATORS_NAME, "");
@@ -1340,7 +1343,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
         getSystem(config);
         AttributesFactory factory = new AttributesFactory();
         factory.setScope(Scope.LOCAL);
-        Pool p = ClientServerTestCase.configureConnectionPool(factory, getServerHostName(host), ports, true, -1, -1, null);
+        Pool p = ClientServerTestCase.configureConnectionPool(factory, NetworkUtils.getServerHostName(host), ports, true, -1, -1, null);
         createRegion(name, factory.create());
         assertNotNull(getRootRegion().getSubregion(name));
         assertTrue(p.getServers().size() > 0);
@@ -1376,7 +1379,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
           return true;
         }
       };
-      waitForCriterion(wc, 30000, 100, false);
+      Wait.waitForCriterion(wc, 30000, 100, false);
     }
     
     Map connectedClients = InternalClientMembership.getConnectedClients(false);
@@ -1384,10 +1387,10 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     assertEquals(clientMemberIds.size(), connectedClients.size());
     for (Iterator iter = connectedClients.keySet().iterator(); iter.hasNext();) {
       String connectedClient = (String)iter.next();
-      getLogWriter().info("[testGetConnectedClients] checking for client " + connectedClient);
+      com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetConnectedClients] checking for client " + connectedClient);
       assertTrue(clientMemberIds.contains(connectedClient));
       Object[] result = (Object[])connectedClients.get(connectedClient);
-      getLogWriter().info("[testGetConnectedClients] result: " + 
+      com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetConnectedClients] result: " + 
                           (result==null? "none"
                               : String.valueOf(result[0])+"; connections="+result[1]));
     }
@@ -1408,7 +1411,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
       vm.invoke(new CacheSerializableRunnable("Create bridge server") {
         public void run2() throws CacheException {
           // create BridgeServer in controller vm...
-          getLogWriter().info("[testGetConnectedServers] Create BridgeServer");
+          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetConnectedServers] Create BridgeServer");
           getSystem();
           AttributesFactory factory = new AttributesFactory();
           factory.setScope(Scope.LOCAL);
@@ -1421,15 +1424,15 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
             testGetConnectedServers_port = startBridgeServer(0);
           }
           catch (IOException e) {
-            getLogWriter().error("startBridgeServer threw IOException", e);
+            com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().error("startBridgeServer threw IOException", e);
             fail("startBridgeServer threw IOException " + e.getMessage());
           }
           
           assertTrue(testGetConnectedServers_port != 0);
       
-          getLogWriter().info("[testGetConnectedServers] port=" + 
+          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetConnectedServers] port=" + 
             ports[whichVM]);
-          getLogWriter().info("[testGetConnectedServers] serverMemberId=" + 
+          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetConnectedServers] serverMemberId=" + 
             getDistributedMember());
         }
       });
@@ -1438,7 +1441,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
       assertTrue(ports[whichVM] != 0);
     }
     
-    getLogWriter().info("[testGetConnectedServers] create bridge client");
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetConnectedServers] create bridge client");
     Properties config = new Properties();
     config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
     config.setProperty(DistributionConfig.LOCATORS_NAME, "");
@@ -1449,10 +1452,10 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     factory.setScope(Scope.LOCAL);
 
     for (int i = 0; i < ports.length; i++) {
-      getLogWriter().info("[testGetConnectedServers] creating connectionpool for " + 
-        getServerHostName(host) + " " + ports[i]);
+      com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetConnectedServers] creating connectionpool for " + 
+        NetworkUtils.getServerHostName(host) + " " + ports[i]);
       int[] thisServerPorts = new int[] { ports[i] };
-      ClientServerTestCase.configureConnectionPoolWithName(factory, getServerHostName(host), thisServerPorts, false, -1, -1, null,"pooly"+i);
+      ClientServerTestCase.configureConnectionPoolWithName(factory, NetworkUtils.getServerHostName(host), thisServerPorts, false, -1, -1, null,"pooly"+i);
       Region region = createRegion(name+"_"+i, factory.create());
       assertNotNull(getRootRegion().getSubregion(name+"_"+i));
       region.get("KEY-1");
@@ -1478,7 +1481,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
           return true;
         }
       };
-      waitForCriterion(wc, 60000, 100, false);
+      Wait.waitForCriterion(wc, 60000, 100, false);
     }
 
     {
@@ -1491,7 +1494,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     assertEquals(host.getVMCount(), connectedServers.size());
     for (Iterator iter = connectedServers.keySet().iterator(); iter.hasNext();) {
       String connectedServer = (String) iter.next();
-      getLogWriter().info("[testGetConnectedServers]  value for connectedServer: " + 
+      com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetConnectedServers]  value for connectedServer: " + 
                           connectedServers.get(connectedServer));
     }
   }
@@ -1516,7 +1519,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
       vm.invoke(new CacheSerializableRunnable("Create bridge server") {
         public void run2() throws CacheException {
           // create BridgeServer in controller vm...
-          getLogWriter().info("[testGetNotifiedClients] Create BridgeServer");
+          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetNotifiedClients] Create BridgeServer");
           getSystem();
           AttributesFactory factory = new AttributesFactory();
           Region region = createRegion(name, factory.create());
@@ -1528,15 +1531,15 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
             testGetNotifiedClients_port = startBridgeServer(0);
           }
           catch (IOException e) {
-            getLogWriter().error("startBridgeServer threw IOException", e);
+            com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().error("startBridgeServer threw IOException", e);
             fail("startBridgeServer threw IOException " + e.getMessage());
           }
           
           assertTrue(testGetNotifiedClients_port != 0);
       
-          getLogWriter().info("[testGetNotifiedClients] port=" + 
+          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetNotifiedClients] port=" + 
             ports[whichVM]);
-          getLogWriter().info("[testGetNotifiedClients] serverMemberId=" + 
+          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetNotifiedClients] serverMemberId=" + 
             getMemberId());
         }
       });
@@ -1545,7 +1548,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
       assertTrue(ports[whichVM] != 0);
     }
     
-    getLogWriter().info("[testGetNotifiedClients] create bridge client");
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetNotifiedClients] create bridge client");
     Properties config = new Properties();
     config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
     config.setProperty(DistributionConfig.LOCATORS_NAME, "");
@@ -1555,8 +1558,8 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     AttributesFactory factory = new AttributesFactory();
     factory.setScope(Scope.LOCAL);
 
-    getLogWriter().info("[testGetNotifiedClients] creating connection pool");
-    ClientServerTestCase.configureConnectionPool(factory, getServerHostName(host), ports, true, -1, -1, null);
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetNotifiedClients] creating connection pool");
+    ClientServerTestCase.configureConnectionPool(factory, NetworkUtils.getServerHostName(host), ports, true, -1, -1, null);
     Region region = createRegion(name, factory.create());
     assertNotNull(getRootRegion().getSubregion(name));
     region.registerInterest("KEY-1");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientRegisterInterestDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientRegisterInterestDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientRegisterInterestDUnitTest.java
index 958b863..a734a10 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientRegisterInterestDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientRegisterInterestDUnitTest.java
@@ -25,9 +25,12 @@ import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.Scope;
 import com.gemstone.gemfire.cache.client.internal.PoolImpl;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
+import com.gemstone.gemfire.test.dunit.NetworkUtils;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 import com.gemstone.gemfire.cache.client.SubscriptionNotEnabledException;
 
 /**
@@ -42,8 +45,8 @@ public class ClientRegisterInterestDUnitTest extends ClientServerTestCase {
     super(name);
   }
   
-  public void tearDown2() throws Exception {
-    super.tearDown2();
+  @Override
+  protected final void postTearDownCacheTestCase() throws Exception {
     disconnectAllFromDS(); // cleans up bridge server and client and lonerDS
   }
   
@@ -60,7 +63,7 @@ public class ClientRegisterInterestDUnitTest extends ClientServerTestCase {
     final VM vm = Host.getHost(0).getVM(whichVM);
     vm.invoke(new CacheSerializableRunnable("Create bridge server") {
       public void run2() throws CacheException {
-        getLogWriter().info("[testBug35381] Create BridgeServer");
+        LogWriterUtils.getLogWriter().info("[testBug35381] Create BridgeServer");
         getSystem();
         AttributesFactory factory = new AttributesFactory();
         factory.setScope(Scope.LOCAL);
@@ -73,21 +76,21 @@ public class ClientRegisterInterestDUnitTest extends ClientServerTestCase {
           bridgeServerPort = startBridgeServer(0);
         }
         catch (IOException e) {
-          getLogWriter().error("startBridgeServer threw IOException", e);
+          LogWriterUtils.getLogWriter().error("startBridgeServer threw IOException", e);
           fail("startBridgeServer threw IOException " + e.getMessage());
         }
         
         assertTrue(bridgeServerPort != 0);
     
-        getLogWriter().info("[testBug35381] port=" + bridgeServerPort);
-        getLogWriter().info("[testBug35381] serverMemberId=" + getMemberId());
+        LogWriterUtils.getLogWriter().info("[testBug35381] port=" + bridgeServerPort);
+        LogWriterUtils.getLogWriter().info("[testBug35381] serverMemberId=" + getMemberId());
       }
     });
     ports[whichVM] = vm.invokeInt(ClientRegisterInterestDUnitTest.class, 
                                   "getBridgeServerPort");
     assertTrue(ports[whichVM] != 0);
     
-    getLogWriter().info("[testBug35381] create bridge client");
+    LogWriterUtils.getLogWriter().info("[testBug35381] create bridge client");
     Properties config = new Properties();
     config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
     config.setProperty(DistributionConfig.LOCATORS_NAME, "");
@@ -97,9 +100,9 @@ public class ClientRegisterInterestDUnitTest extends ClientServerTestCase {
     AttributesFactory factory = new AttributesFactory();
     factory.setScope(Scope.LOCAL);
 
-    getLogWriter().info("[testBug35381] creating connection pool");
+    LogWriterUtils.getLogWriter().info("[testBug35381] creating connection pool");
     boolean establishCallbackConnection = false; // SOURCE OF BUG 35381
-    ClientServerTestCase.configureConnectionPool(factory, getServerHostName(host), ports, establishCallbackConnection, -1, -1, null);
+    ClientServerTestCase.configureConnectionPool(factory, NetworkUtils.getServerHostName(host), ports, establishCallbackConnection, -1, -1, null);
     Region region = createRegion(name, factory.create());
     assertNotNull(getRootRegion().getSubregion(name));
     try {
@@ -145,7 +148,7 @@ public class ClientRegisterInterestDUnitTest extends ClientServerTestCase {
     final VM firstServerVM = Host.getHost(0).getVM(firstServerIdx);
     firstServerVM.invoke(new CacheSerializableRunnable("Create first bridge server") {
       public void run2() throws CacheException {
-        getLogWriter().info("[testRegisterInterestFailover] Create first bridge server");
+        LogWriterUtils.getLogWriter().info("[testRegisterInterestFailover] Create first bridge server");
         getSystem();
         AttributesFactory factory = new AttributesFactory();
         factory.setScope(Scope.LOCAL);
@@ -160,15 +163,15 @@ public class ClientRegisterInterestDUnitTest extends ClientServerTestCase {
           bridgeServerPort = startBridgeServer(0);
         }
         catch (IOException e) {
-          getLogWriter().error("startBridgeServer threw IOException", e);
+          LogWriterUtils.getLogWriter().error("startBridgeServer threw IOException", e);
           fail("startBridgeServer threw IOException " + e.getMessage());
         }
         
         assertTrue(bridgeServerPort != 0);
     
-        getLogWriter().info("[testRegisterInterestFailover] " +
+        LogWriterUtils.getLogWriter().info("[testRegisterInterestFailover] " +
           "firstServer port=" + bridgeServerPort);
-        getLogWriter().info("[testRegisterInterestFailover] " +
+        LogWriterUtils.getLogWriter().info("[testRegisterInterestFailover] " +
           "firstServer memberId=" + getMemberId());
       }
     });
@@ -178,7 +181,7 @@ public class ClientRegisterInterestDUnitTest extends ClientServerTestCase {
     final VM secondServerVM = Host.getHost(0).getVM(secondServerIdx);
     secondServerVM.invoke(new CacheSerializableRunnable("Create second bridge server") {
       public void run2() throws CacheException {
-        getLogWriter().info("[testRegisterInterestFailover] Create second bridge server");
+        LogWriterUtils.getLogWriter().info("[testRegisterInterestFailover] Create second bridge server");
         getSystem();
         AttributesFactory factory = new AttributesFactory();
         factory.setScope(Scope.LOCAL);
@@ -191,15 +194,15 @@ public class ClientRegisterInterestDUnitTest extends ClientServerTestCase {
           bridgeServerPort = startBridgeServer(0);
         }
         catch (IOException e) {
-          getLogWriter().error("startBridgeServer threw IOException", e);
+          LogWriterUtils.getLogWriter().error("startBridgeServer threw IOException", e);
           fail("startBridgeServer threw IOException " + e.getMessage());
         }
         
         assertTrue(bridgeServerPort != 0);
     
-        getLogWriter().info("[testRegisterInterestFailover] " +
+        LogWriterUtils.getLogWriter().info("[testRegisterInterestFailover] " +
           "secondServer port=" + bridgeServerPort);
-        getLogWriter().info("[testRegisterInterestFailover] " +
+        LogWriterUtils.getLogWriter().info("[testRegisterInterestFailover] " +
           "secondServer memberId=" + getMemberId());
       }
     });
@@ -221,7 +224,7 @@ public class ClientRegisterInterestDUnitTest extends ClientServerTestCase {
     });
     
     // create the bridge client
-    getLogWriter().info("[testBug35654] create bridge client");
+    LogWriterUtils.getLogWriter().info("[testBug35654] create bridge client");
     Properties config = new Properties();
     config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
     config.setProperty(DistributionConfig.LOCATORS_NAME, "");
@@ -231,9 +234,9 @@ public class ClientRegisterInterestDUnitTest extends ClientServerTestCase {
     AttributesFactory factory = new AttributesFactory();
     factory.setScope(Scope.LOCAL);
 
-    getLogWriter().info("[testRegisterInterestFailover] creating connection pool");
+    LogWriterUtils.getLogWriter().info("[testRegisterInterestFailover] creating connection pool");
     boolean establishCallbackConnection = true;
-    final PoolImpl p = (PoolImpl)ClientServerTestCase.configureConnectionPool(factory, getServerHostName(host), ports, establishCallbackConnection, -1, -1, null);
+    final PoolImpl p = (PoolImpl)ClientServerTestCase.configureConnectionPool(factory, NetworkUtils.getServerHostName(host), ports, establishCallbackConnection, -1, -1, null);
 
     final Region region1 = createRootRegion(regionName1, factory.create());
     final Region region2 = createRootRegion(regionName2, factory.create());
@@ -264,7 +267,7 @@ public class ClientRegisterInterestDUnitTest extends ClientServerTestCase {
         return "primary port remained invalid";
       }
     };
-    DistributedTestCase.waitForCriterion(ev, 10 * 1000, 200, true);
+    Wait.waitForCriterion(ev, 10 * 1000, 200, true);
     assertEquals(ports[firstServerIdx], p.getPrimaryPort()); 
     
     // assert intial values
@@ -296,7 +299,7 @@ public class ClientRegisterInterestDUnitTest extends ClientServerTestCase {
         return null;
       }
     };
-    DistributedTestCase.waitForCriterion(ev, 10 * 1000, 200, true);
+    Wait.waitForCriterion(ev, 10 * 1000, 200, true);
     assertEquals("VAL-1-1", region1.get(key1));
     assertEquals("VAL-1-1", region2.get(key2));
     assertEquals("VAL-1-1", region3.get(key3));
@@ -308,7 +311,7 @@ public class ClientRegisterInterestDUnitTest extends ClientServerTestCase {
           startBridgeServer(ports[secondServerIdx]);
         }
         catch (IOException e) {
-          getLogWriter().error("startBridgeServer threw IOException", e);
+          LogWriterUtils.getLogWriter().error("startBridgeServer threw IOException", e);
           fail("startBridgeServer threw IOException " + e.getMessage());
         }
       }
@@ -329,7 +332,7 @@ public class ClientRegisterInterestDUnitTest extends ClientServerTestCase {
         return "primary port never became " + ports[secondServerIdx];
       }
     };
-    DistributedTestCase.waitForCriterion(ev, 100 * 1000, 200, true);
+    Wait.waitForCriterion(ev, 100 * 1000, 200, true);
     
     try {
       assertEquals(null, region2.get(key2));
@@ -377,7 +380,7 @@ public class ClientRegisterInterestDUnitTest extends ClientServerTestCase {
         return null;
       }
     };
-    DistributedTestCase.waitForCriterion(ev, 100 * 1000, 200, true);
+    Wait.waitForCriterion(ev, 100 * 1000, 200, true);
     assertEquals("VAL-2-2", region1.get(key1));
     assertEquals("VAL-0",   region2.get(key2));
     assertEquals("VAL-2-2", region3.get(key3));
@@ -413,7 +416,7 @@ public class ClientRegisterInterestDUnitTest extends ClientServerTestCase {
         return null;
       }
     };
-    DistributedTestCase.waitForCriterion(ev, 100 * 1000, 200, true);
+    Wait.waitForCriterion(ev, 100 * 1000, 200, true);
     assertEquals("VAL-2-3", region1.get(key1));
     assertEquals("VAL-2-2", region2.get(key2));
     assertEquals("VAL-2-3", region3.get(key3));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientServerCCEDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientServerCCEDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientServerCCEDUnitTest.java
index 181fea7..fb319b6 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientServerCCEDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientServerCCEDUnitTest.java
@@ -44,10 +44,15 @@ import com.gemstone.gemfire.internal.cache.TombstoneService;
 import com.gemstone.gemfire.internal.cache.ha.HARegionQueue;
 import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientNotifier;
 import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientProxy;
+import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
+import com.gemstone.gemfire.test.dunit.NetworkUtils;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 /**
  * concurrency-control tests for client/server
@@ -63,7 +68,8 @@ public class ClientServerCCEDUnitTest extends CacheTestCase {
     HARegionQueue.setMessageSyncInterval(5);
   }
   
-  public void tearDown2() {
+  @Override
+  protected final void preTearDownCacheTestCase() {
     disconnectAllFromDS();
     HARegionQueue.setMessageSyncInterval(HARegionQueue.DEFAULT_MESSAGE_SYNC_INTERVAL);
   }
@@ -150,19 +156,19 @@ public class ClientServerCCEDUnitTest extends CacheTestCase {
     createEntries(vm0);
     destroyEntries(vm0);
     
-    getLogWriter().info("***************** register interest on all keys");
+    LogWriterUtils.getLogWriter().info("***************** register interest on all keys");
     createClientRegion(vm2, name, port, true);
     registerInterest(vm2);
     ensureAllTombstonesPresent(vm2);
     
-    getLogWriter().info("***************** clear cache and register interest on one key, Object0");
+    LogWriterUtils.getLogWriter().info("***************** clear cache and register interest on one key, Object0");
     clearLocalCache(vm2);
     registerInterestOneKey(vm2, "Object0");
     List<String> keys = new ArrayList(1);
     keys.add("Object0");
     ensureAllTombstonesPresent(vm2, keys);
 
-    getLogWriter().info("***************** clear cache and register interest on four keys");
+    LogWriterUtils.getLogWriter().info("***************** clear cache and register interest on four keys");
     clearLocalCache(vm2);
     keys = new ArrayList(4);
     for (int i=0; i<4; i++) {
@@ -171,12 +177,12 @@ public class ClientServerCCEDUnitTest extends CacheTestCase {
     registerInterest(vm2, keys);
     ensureAllTombstonesPresent(vm2, keys);
 
-    getLogWriter().info("***************** clear cache and register interest with regex on four keys");
+    LogWriterUtils.getLogWriter().info("***************** clear cache and register interest with regex on four keys");
     clearLocalCache(vm2);
     registerInterestRegex(vm2, "Object[0-3]");
     ensureAllTombstonesPresent(vm2, keys);
 
-    getLogWriter().info("***************** fetch entries with getAll()");
+    LogWriterUtils.getLogWriter().info("***************** fetch entries with getAll()");
     clearLocalCache(vm2);
     getAll(vm2);
     ensureAllTombstonesPresent(vm2);
@@ -203,19 +209,19 @@ public class ClientServerCCEDUnitTest extends CacheTestCase {
     createEntries(vm0);
     invalidateEntries(vm0);
     
-    getLogWriter().info("***************** register interest on all keys");
+    LogWriterUtils.getLogWriter().info("***************** register interest on all keys");
     createClientRegion(vm2, name, port, true);
     registerInterest(vm2);
     ensureAllInvalidsPresent(vm2);
     
-    getLogWriter().info("***************** clear cache and register interest on one key, Object0");
+    LogWriterUtils.getLogWriter().info("***************** clear cache and register interest on one key, Object0");
     clearLocalCache(vm2);
     registerInterestOneKey(vm2, "Object0");
     List<String> keys = new ArrayList(1);
     keys.add("Object0");
     ensureAllInvalidsPresent(vm2, keys);
 
-    getLogWriter().info("***************** clear cache and register interest on four keys");
+    LogWriterUtils.getLogWriter().info("***************** clear cache and register interest on four keys");
     clearLocalCache(vm2);
     keys = new ArrayList(4);
     for (int i=0; i<4; i++) {
@@ -224,12 +230,12 @@ public class ClientServerCCEDUnitTest extends CacheTestCase {
     registerInterest(vm2, keys);
     ensureAllInvalidsPresent(vm2, keys);
 
-    getLogWriter().info("***************** clear cache and register interest with regex on four keys");
+    LogWriterUtils.getLogWriter().info("***************** clear cache and register interest with regex on four keys");
     clearLocalCache(vm2);
     registerInterestRegex(vm2, "Object[0-3]");
     ensureAllInvalidsPresent(vm2, keys);
 
-    getLogWriter().info("***************** fetch entries with getAll()");
+    LogWriterUtils.getLogWriter().info("***************** fetch entries with getAll()");
     clearLocalCache(vm2);
     getAll(vm2);
     ensureAllInvalidsPresent(vm2);
@@ -383,7 +389,7 @@ public class ClientServerCCEDUnitTest extends CacheTestCase {
       //other bucket might be in vm1
       forceGC(vm1);
     }
-    pause(5000); // better chance that WaitCriteria will succeed 1st time if we pause a bit
+    Wait.pause(5000); // better chance that WaitCriteria will succeed 1st time if we pause a bit
     checkClientReceivedGC(vm2);
     checkClientReceivedGC(vm3);
     checkServerQueuesEmpty(vm0);
@@ -440,7 +446,7 @@ public class ClientServerCCEDUnitTest extends CacheTestCase {
             assertTrue("expected key object_"+i+" to be in the cache but it isn't", TestRegion.containsKey("object_"+i));
           }
         } catch (NullPointerException e) {
-          fail("caught NPE", e);
+          Assert.fail("caught NPE", e);
         }
       }
     });
@@ -476,8 +482,8 @@ public class ClientServerCCEDUnitTest extends CacheTestCase {
           
           @Override
           public boolean done() {
-            getLogWriter().info("tombstone count = " + TestRegion.getTombstoneCount());
-            getLogWriter().info("region size = " + TestRegion.size());
+            LogWriterUtils.getLogWriter().info("tombstone count = " + TestRegion.getTombstoneCount());
+            LogWriterUtils.getLogWriter().info("region size = " + TestRegion.size());
             return TestRegion.getTombstoneCount() == 0 && TestRegion.size() == 0;
           }
           
@@ -486,7 +492,7 @@ public class ClientServerCCEDUnitTest extends CacheTestCase {
             return "waiting for garbage collection to occur";
           }
         };
-        waitForCriterion(wc, 60000, 2000, true);
+        Wait.waitForCriterion(wc, 60000, 2000, true);
         return null;
       }
     });
@@ -512,7 +518,7 @@ public class ClientServerCCEDUnitTest extends CacheTestCase {
 //                  if (first) {
 //                    ((LocalRegion)proxy.getHARegion()).dumpBackingMap();
 //                  }
-                  getLogWriter().info("queue size ("+size+") is still > 0 for " + proxy.getProxyID()); 
+                  LogWriterUtils.getLogWriter().info("queue size ("+size+") is still > 0 for " + proxy.getProxyID()); 
                   return false;
                 }
               }
@@ -520,7 +526,7 @@ public class ClientServerCCEDUnitTest extends CacheTestCase {
             // also ensure that server regions have been cleaned up
             int regionEntryCount = TestRegion.getRegionMap().size();
             if (regionEntryCount > 0) {
-              getLogWriter().info("TestRegion has unexpected entries - all should have been GC'd but we have " + regionEntryCount);
+              LogWriterUtils.getLogWriter().info("TestRegion has unexpected entries - all should have been GC'd but we have " + regionEntryCount);
               TestRegion.dumpBackingMap();
               return false;
             }
@@ -532,7 +538,7 @@ public class ClientServerCCEDUnitTest extends CacheTestCase {
             return "waiting for queue removal messages to clear client queues";
           }
         };
-        waitForCriterion(wc, 60000, 2000, true);
+        Wait.waitForCriterion(wc, 60000, 2000, true);
         return null;
       }
     });
@@ -543,7 +549,7 @@ public class ClientServerCCEDUnitTest extends CacheTestCase {
     vm.invoke(new SerializableCallable("check that GC did not happen") {
       public Object call() throws Exception {
         if (TestRegion.getTombstoneCount() == 0) {
-          getLogWriter().warning("region has no tombstones");
+          LogWriterUtils.getLogWriter().warning("region has no tombstones");
 //          TestRegion.dumpBackingMap();
           throw new AssertionFailedError("expected to find tombstones but region is empty");
         }
@@ -584,9 +590,9 @@ public class ClientServerCCEDUnitTest extends CacheTestCase {
     SerializableCallable createRegion = new SerializableCallable() {
       public Object call() throws Exception {
         ClientCacheFactory cf = new ClientCacheFactory();
-        cf.addPoolServer(getServerHostName(vm.getHost()), port);
+        cf.addPoolServer(NetworkUtils.getServerHostName(vm.getHost()), port);
         cf.setPoolSubscriptionEnabled(true);
-        cf.set("log-level", getDUnitLogLevel());
+        cf.set("log-level", LogWriterUtils.getDUnitLogLevel());
         ClientCache cache = getClientCache(cf);
         ClientRegionFactory crf = cache.createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY);
         crf.setConcurrencyChecksEnabled(ccEnabled);
@@ -605,14 +611,14 @@ public class ClientServerCCEDUnitTest extends CacheTestCase {
     SerializableCallable createRegion = new SerializableCallable() {
       public Object call() throws Exception {
         ClientCacheFactory cf = new ClientCacheFactory();
-        cf.addPoolServer(getServerHostName(vm.getHost()), port1);
-        cf.addPoolServer(getServerHostName(vm.getHost()), port2);
+        cf.addPoolServer(NetworkUtils.getServerHostName(vm.getHost()), port1);
+        cf.addPoolServer(NetworkUtils.getServerHostName(vm.getHost()), port2);
         cf.setPoolSubscriptionEnabled(true);
         cf.setPoolSubscriptionRedundancy(1);
         // bug #50683 - secondary durable queue retains all GC messages
         cf.set("durable-client-id", ""+vm.getPid());
         cf.set("durable-client-timeout", "" + 200);
-        cf.set("log-level", getDUnitLogLevel());
+        cf.set("log-level", LogWriterUtils.getDUnitLogLevel());
         ClientCache cache = getClientCache(cf);
         ClientRegionFactory crf = cache.createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY);
         crf.setConcurrencyChecksEnabled(ccEnabled);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientServerTestCase.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientServerTestCase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientServerTestCase.java
index 6a3c5e0..5c2f8a2 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientServerTestCase.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientServerTestCase.java
@@ -35,7 +35,10 @@ import com.gemstone.gemfire.distributed.DistributedMember;
 import com.gemstone.gemfire.distributed.DistributedSystem;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
+import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 /**
  * Provides helper methods for testing clients and servers. This
@@ -59,10 +62,14 @@ public class ClientServerTestCase extends CacheTestCase {
   }
   
   @Override
-  public void tearDown2() throws Exception {
+  protected final void preTearDownCacheTestCase() throws Exception {
+    preTearDownClientServerTestCase();
     // this makes sure we don't leave anything for the next tests
     disconnectAllFromDS();
   }
+  
+  protected void preTearDownClientServerTestCase() throws Exception {
+  }
 
   public ClientServerTestCase(String name) {
     super(name);
@@ -201,7 +208,7 @@ public class ClientServerTestCase extends CacheTestCase {
       boolean threadLocalCnxs, int lifetimeTimeout, int statisticInterval) {
 
     if(AUTO_LOAD_BALANCE) {
-      pf.addLocator(host,getDUnitLocatorPort());
+      pf.addLocator(host,DistributedTestUtils.getDUnitLocatorPort());
     } else {
       for(int z=0;z<ports.length;z++) {
         pf.addServer(host,ports[z]);
@@ -299,7 +306,7 @@ public class ClientServerTestCase extends CacheTestCase {
     int waitMillis = 10000;
     int interval = 100;
     boolean throwException = true;
-    waitForCriterion(w, waitMillis, interval, throwException);
+    Wait.waitForCriterion(w, waitMillis, interval, throwException);
     return system.getMemberId();
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ConcurrentLeaveDuringGIIDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ConcurrentLeaveDuringGIIDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ConcurrentLeaveDuringGIIDUnitTest.java
index 9ec99a2..c2f06c1 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ConcurrentLeaveDuringGIIDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ConcurrentLeaveDuringGIIDUnitTest.java
@@ -26,9 +26,12 @@ import com.gemstone.gemfire.internal.cache.InitialImageOperation;
 import com.gemstone.gemfire.internal.cache.InitialImageOperation.GIITestHook;
 import com.gemstone.gemfire.internal.cache.InitialImageOperation.GIITestHookType;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 import com.gemstone.gemfire.internal.cache.LocalRegion;
 import com.gemstone.gemfire.internal.cache.RegionMap;
 
@@ -101,7 +104,7 @@ public class ConcurrentLeaveDuringGIIDUnitTest extends CacheTestCase {
             return "waiting for GII test hook to be invoked";
           }
         };
-        waitForCriterion(wc, 20000, 500, true);
+        Wait.waitForCriterion(wc, 20000, 500, true);
         return getCache().getDistributedSystem().getDistributedMember();
       }
     };
@@ -128,7 +131,7 @@ public class ConcurrentLeaveDuringGIIDUnitTest extends CacheTestCase {
             return "waiting for region " + regionName + " to contain keyFromX";
           }
         };
-        waitForCriterion(wc, 20000, 1000, true);
+        Wait.waitForCriterion(wc, 20000, 1000, true);
       }
     });
     
@@ -150,11 +153,11 @@ public class ConcurrentLeaveDuringGIIDUnitTest extends CacheTestCase {
             return "waiting for region " + regionName + " to initialize";
           }
         };
-        waitForCriterion(wc, 20000, 1000, true);
+        Wait.waitForCriterion(wc, 20000, 1000, true);
         // ensure that the RVV has recorded the event
         DistributedRegion r = (DistributedRegion)getCache().getRegion(regionName);
         if (!r.getVersionVector().contains(Xid, 1)) {
-          getLogWriter().info("r's version vector is " + r.getVersionVector().fullToString());
+          LogWriterUtils.getLogWriter().info("r's version vector is " + r.getVersionVector().fullToString());
           ((LocalRegion)r).dumpBackingMap();
         }
         assertTrue(r.containsKey("keyFromX"));
@@ -177,7 +180,7 @@ public class ConcurrentLeaveDuringGIIDUnitTest extends CacheTestCase {
           }
         };
         // if the test fails here then a sync from B to A was not performed
-        waitForCriterion(wc, 20000, 500, true);
+        Wait.waitForCriterion(wc, 20000, 500, true);
         // if the test fails here something is odd because the sync was done
         // but the RVV doesn't know about it
         assertTrue(((LocalRegion)r).getVersionVector().contains(Xid, 1));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DiskRegionDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DiskRegionDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DiskRegionDUnitTest.java
index 6247ee1..817943a 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DiskRegionDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DiskRegionDUnitTest.java
@@ -47,11 +47,13 @@ import com.gemstone.gemfire.internal.cache.DiskRegionStats;
 import com.gemstone.gemfire.internal.cache.LocalRegion;
 import com.gemstone.gemfire.internal.cache.lru.LRUCapacityController;
 import com.gemstone.gemfire.internal.cache.lru.LRUStatistics;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 /**
  * Tests the functionality of cache regions whose contents may be
@@ -141,7 +143,7 @@ public class DiskRegionDUnitTest extends CacheTestCase {
 
     flush(region);
     
-    getLogWriter().info("DEBUG: writes=" + diskStats.getWrites()
+    LogWriterUtils.getLogWriter().info("DEBUG: writes=" + diskStats.getWrites()
         + " reads=" + diskStats.getReads()
         + " evictions=" + lruStats.getEvictions()
         + " total=" + total
@@ -160,7 +162,7 @@ public class DiskRegionDUnitTest extends CacheTestCase {
     assertNotNull(value);
     assertEquals(0, ((int[]) value)[0]);
 
-    getLogWriter().info("DEBUG: writes=" + diskStats.getWrites()
+    LogWriterUtils.getLogWriter().info("DEBUG: writes=" + diskStats.getWrites()
         + " reads=" + diskStats.getReads()
         + " evictions=" + lruStats.getEvictions()
         + " total=" + total
@@ -249,7 +251,7 @@ public class DiskRegionDUnitTest extends CacheTestCase {
               return "waiting for evictions to exceed 6";
             }
           };
-          DistributedTestCase.waitForCriterion(ev, 5 * 1000, 200, true);
+          Wait.waitForCriterion(ev, 5 * 1000, 200, true);
           //DiskRegionStats diskStats = dr.getStats();
           //assertTrue(diskStats.getWrites() > 6);
         }
@@ -372,7 +374,7 @@ public class DiskRegionDUnitTest extends CacheTestCase {
 //          DiskRegion dr = region.getDiskRegion();
           LRUStatistics lruStats = getLRUStats(region);
           for (int i = 0; lruStats.getEvictions() < 10; i++) {
-            getLogWriter().info("Put " + i);
+            LogWriterUtils.getLogWriter().info("Put " + i);
             region.put(new Integer(i), new byte[1]);
           }
 
@@ -433,7 +435,7 @@ public class DiskRegionDUnitTest extends CacheTestCase {
 
     long evictions = lruStats.getEvictions();
 
-    getLogWriter().info("Destroying memory resident entries");
+    LogWriterUtils.getLogWriter().info("Destroying memory resident entries");
     // Destroying each of these guys should have no effect on the disk
     for (int i = total - 1; i >= evictions; i--) {
       region.destroy(new Integer(i));
@@ -444,7 +446,7 @@ public class DiskRegionDUnitTest extends CacheTestCase {
 
 //    long startRemoves = diskStats.getRemoves();
 
-    getLogWriter().info("Destroying disk-resident entries.  evictions=" + evictions);
+    LogWriterUtils.getLogWriter().info("Destroying disk-resident entries.  evictions=" + evictions);
     
     // Destroying each of these guys should cause a removal from disk
     for (int i = ((int) evictions) - 1; i >= 0; i--) {
@@ -456,7 +458,7 @@ public class DiskRegionDUnitTest extends CacheTestCase {
 
     assertEquals(evictions, lruStats.getEvictions());
     
-    getLogWriter().info("keys remaining in region: " + region.keys().size());
+    LogWriterUtils.getLogWriter().info("keys remaining in region: " + region.keys().size());
     assertEquals(0, region.keys().size());
   }
 
@@ -968,7 +970,7 @@ public class DiskRegionDUnitTest extends CacheTestCase {
 //          DiskRegion dr = region.getDiskRegion();
           LRUStatistics lruStats = getLRUStats(region);
           for (int i = 0; lruStats.getEvictions() < 10; i++) {
-            getLogWriter().info("Put " + i);
+            LogWriterUtils.getLogWriter().info("Put " + i);
             region.put(new Integer(i), new byte[1]);
           }
 
@@ -997,7 +999,7 @@ public class DiskRegionDUnitTest extends CacheTestCase {
               return "value for key remains: " + key;
             }
           };
-          DistributedTestCase.waitForCriterion(ev, 500, 200, true);
+          Wait.waitForCriterion(ev, 500, 200, true);
         }
       });
 
@@ -1021,7 +1023,7 @@ public class DiskRegionDUnitTest extends CacheTestCase {
               return "verify update";
             }
           };
-          DistributedTestCase.waitForCriterion(ev, 500, 200, true);
+          Wait.waitForCriterion(ev, 500, 200, true);
         }
       });
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistAckMapMethodsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistAckMapMethodsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistAckMapMethodsDUnitTest.java
index 216cdb8..44f7f06 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistAckMapMethodsDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistAckMapMethodsDUnitTest.java
@@ -43,6 +43,8 @@ import com.gemstone.gemfire.cache.util.CacheWriterAdapter;
 import com.gemstone.gemfire.distributed.DistributedSystem;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.Invoke;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
 
@@ -78,14 +80,15 @@ public class DistAckMapMethodsDUnitTest extends DistributedTestCase{
       vm1.invoke(DistAckMapMethodsDUnitTest.class, "createCache");
     }
     
-    public void tearDown2(){
-        Host host = Host.getHost(0);
-        VM vm0 = host.getVM(0);
-        VM vm1 = host.getVM(1);
-        vm0.invoke(DistAckMapMethodsDUnitTest.class, "closeCache");
-        vm1.invoke(DistAckMapMethodsDUnitTest.class, "closeCache");
-        cache = null;
-        invokeInEveryVM(new SerializableRunnable() { public void run() { cache = null; } });
+    @Override
+    protected final void preTearDown() throws Exception {
+      Host host = Host.getHost(0);
+      VM vm0 = host.getVM(0);
+      VM vm1 = host.getVM(1);
+      vm0.invoke(DistAckMapMethodsDUnitTest.class, "closeCache");
+      vm1.invoke(DistAckMapMethodsDUnitTest.class, "closeCache");
+      cache = null;
+      Invoke.invokeInEveryVM(new SerializableRunnable() { public void run() { cache = null; } });
     }
     
     public static void createCache(){
@@ -197,8 +200,8 @@ public class DistAckMapMethodsDUnitTest extends DistributedTestCase{
         vm0.invoke(DistAckMapMethodsDUnitTest.class, "putMethod", objArr);
         obj1 = vm1.invoke(DistAckMapMethodsDUnitTest.class, "getMethod", objArr);//to make sure that vm1 region has the entry
         obj2 = vm1.invoke(DistAckMapMethodsDUnitTest.class, "removeMethod", objArr);
-        getLogWriter().fine("111111111"+obj1);
-        getLogWriter().fine("2222222222"+obj2);
+        LogWriterUtils.getLogWriter().fine("111111111"+obj1);
+        LogWriterUtils.getLogWriter().fine("2222222222"+obj2);
         if (obj1 == null)
           fail("region1.getMethod returned null");
         if(!(obj1.equals(obj2))){

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckOverflowRegionCCEOffHeapDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckOverflowRegionCCEOffHeapDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckOverflowRegionCCEOffHeapDUnitTest.java
index 5971d5c..2323b0e 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckOverflowRegionCCEOffHeapDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckOverflowRegionCCEOffHeapDUnitTest.java
@@ -22,6 +22,7 @@ import com.gemstone.gemfire.cache.AttributesFactory;
 import com.gemstone.gemfire.cache.RegionAttributes;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.internal.cache.OffHeapTestUtil;
+import com.gemstone.gemfire.test.dunit.Invoke;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 
 /**
@@ -38,7 +39,7 @@ public class DistributedAckOverflowRegionCCEOffHeapDUnitTest extends Distributed
   }
   
   @Override
-  public void tearDown2() throws Exception {
+  protected final void preTearDownCacheTestCase() throws Exception {
     SerializableRunnable checkOrphans = new SerializableRunnable() {
 
       @Override
@@ -49,8 +50,7 @@ public class DistributedAckOverflowRegionCCEOffHeapDUnitTest extends Distributed
       }
     };
     checkOrphans.run();
-    invokeInEveryVM(checkOrphans);
-    super.tearDown2();
+    Invoke.invokeInEveryVM(checkOrphans);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckPersistentRegionCCEDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckPersistentRegionCCEDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckPersistentRegionCCEDUnitTest.java
index aec7c8b..aaae52b 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckPersistentRegionCCEDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckPersistentRegionCCEDUnitTest.java
@@ -41,7 +41,6 @@ import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase.WaitCriterion;
 
 import java.io.IOException;
 import java.util.Map;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckPersistentRegionCCEOffHeapDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckPersistentRegionCCEOffHeapDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckPersistentRegionCCEOffHeapDUnitTest.java
index 24c386a..52a4313 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckPersistentRegionCCEOffHeapDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckPersistentRegionCCEOffHeapDUnitTest.java
@@ -22,6 +22,7 @@ import com.gemstone.gemfire.cache.AttributesFactory;
 import com.gemstone.gemfire.cache.RegionAttributes;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.internal.cache.OffHeapTestUtil;
+import com.gemstone.gemfire.test.dunit.Invoke;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 
 /**
@@ -38,7 +39,7 @@ public class DistributedAckPersistentRegionCCEOffHeapDUnitTest extends Distribut
   }
 
   @Override
-  public void tearDown2() throws Exception {
+  protected final void preTearDownCacheTestCase() throws Exception {
     SerializableRunnable checkOrphans = new SerializableRunnable() {
 
       @Override
@@ -48,12 +49,8 @@ public class DistributedAckPersistentRegionCCEOffHeapDUnitTest extends Distribut
         }
       }
     };
-    invokeInEveryVM(checkOrphans);
-    try {
-      checkOrphans.run();
-    } finally {
-      super.tearDown2();
-    }
+    Invoke.invokeInEveryVM(checkOrphans);
+    checkOrphans.run();
   }
 
   @Override



Mime
View raw message