geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jensde...@apache.org
Subject [18/62] [abbrv] [partial] incubator-geode git commit: GEODE-773: Extract static methods from DistributedTestCase
Date Thu, 11 Feb 2016 15:26:42 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionBase.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionBase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionBase.java
index 1c3a33a..b515959 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionBase.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionBase.java
@@ -44,7 +44,7 @@ import com.gemstone.gemfire.internal.offheap.annotations.Retained;
 import com.gemstone.gemfire.pdx.PdxReader;
 import com.gemstone.gemfire.pdx.PdxSerializable;
 import com.gemstone.gemfire.pdx.PdxWriter;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 /**
  * Basic test of regions that use off heap storage.
@@ -146,7 +146,7 @@ public abstract class OffHeapRegionBase {
           return "Waiting for disconnect to complete";
         }
       };
-      com.gemstone.gemfire.test.dunit.DistributedTestCase.waitForCriterion(waitForDisconnect, 10*1000, 100, true);
+      com.gemstone.gemfire.test.dunit.Wait.waitForCriterion(waitForDisconnect, 10*1000, 100, true);
 
       assertTrue(gfc.isClosed());
     } finally {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OutOfOffHeapMemoryDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OutOfOffHeapMemoryDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OutOfOffHeapMemoryDUnitTest.java
index cd20ad1..25de4ea 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OutOfOffHeapMemoryDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OutOfOffHeapMemoryDUnitTest.java
@@ -40,7 +40,11 @@ import com.gemstone.gemfire.internal.cache.OffHeapTestUtil;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.util.StopWatch;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.IgnoredException;
+import com.gemstone.gemfire.test.dunit.Invoke;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 
 import static com.jayway.awaitility.Awaitility.with;
@@ -67,11 +71,11 @@ public class OutOfOffHeapMemoryDUnitTest extends CacheTestCase {
   public void setUp() throws Exception {
     disconnectAllFromDS();
     super.setUp();
-    addExpectedException(OutOfOffHeapMemoryException.class.getSimpleName());
+    IgnoredException.addIgnoredException(OutOfOffHeapMemoryException.class.getSimpleName());
   }
 
   @Override
-  public void tearDown2() throws Exception {
+  protected final void preTearDownCacheTestCase() throws Exception {
     final SerializableRunnable checkOrphans = new SerializableRunnable() {
       @Override
       public void run() {
@@ -80,13 +84,8 @@ public class OutOfOffHeapMemoryDUnitTest extends CacheTestCase {
         }
       }
     };
-    invokeInEveryVM(checkOrphans);
-    try {
-      checkOrphans.run();
-    } finally {
-      invokeInEveryVM(getClass(), "cleanup");
-      super.tearDown2();
-    }
+    Invoke.invokeInEveryVM(checkOrphans);
+    checkOrphans.run();
   }
 
   @SuppressWarnings("unused") // invoked by reflection from tearDown2()

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/internal/process/LocalProcessLauncherDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/process/LocalProcessLauncherDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/process/LocalProcessLauncherDUnitTest.java
index 1a27437..cb05740 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/process/LocalProcessLauncherDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/process/LocalProcessLauncherDUnitTest.java
@@ -49,10 +49,6 @@ public class LocalProcessLauncherDUnitTest extends DistributedTestCase {
     new File(getClass().getSimpleName()).mkdir();
   }
   
-  @Override
-  public void tearDown2() throws Exception {
-  }
-  
   public void testExistingPidFileThrows() throws Exception {
     final File pidFile = new File(getClass().getSimpleName() 
         + File.separator + "testExistingPidFileThrows.pid");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/internal/statistics/StatisticsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/statistics/StatisticsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/statistics/StatisticsDUnitTest.java
index 9f35f05..7126c46 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/statistics/StatisticsDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/statistics/StatisticsDUnitTest.java
@@ -60,10 +60,14 @@ import com.gemstone.gemfire.internal.StatArchiveReader.StatSpec;
 import com.gemstone.gemfire.internal.StatSamplerStats;
 import com.gemstone.gemfire.internal.StatisticsTypeFactoryImpl;
 import com.gemstone.gemfire.internal.StatArchiveReader.StatValue;
+import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.AsyncInvocation;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.Invoke;
 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;
 
 /**
  * Integration tests for Statistics. VM0 performs puts and VM1 receives
@@ -127,8 +131,8 @@ public class StatisticsDUnitTest extends CacheTestCase {
   }
 
   @Override
-  public void tearDown2() throws Exception {
-    invokeInEveryVM(getClass(), "cleanup");
+  protected final void preTearDownCacheTestCase() throws Exception {
+    Invoke.invokeInEveryVM(getClass(), "cleanup");
     disconnectAllFromDS(); // because this test enabled stat sampling!
   }
   
@@ -173,7 +177,7 @@ public class StatisticsDUnitTest extends CacheTestCase {
               return "sampler.getSampleCollector() is still null!";
             }
           };
-          waitForCriterion(waitForSampleCollector, 4*1000, 10, true);
+          Wait.waitForCriterion(waitForSampleCollector, 4*1000, 10, true);
   
           final SampleCollector sampleCollector = sampler.getSampleCollector();
           assertNotNull(sampleCollector);
@@ -230,7 +234,7 @@ public class StatisticsDUnitTest extends CacheTestCase {
             return "sampler.getSampleCollector() is still null!";
           }
         };
-        waitForCriterion(waitForSampleCollector, 2*1000, 10, true);
+        Wait.waitForCriterion(waitForSampleCollector, 2*1000, 10, true);
 
         final SampleCollector sampleCollector = sampler.getSampleCollector();
         assertNotNull(sampleCollector);
@@ -284,7 +288,7 @@ public class StatisticsDUnitTest extends CacheTestCase {
                 return rml.members + " should contain " + subMember;
               }
             };
-            waitForCriterion(wc, 4*1000, 10, true);
+            Wait.waitForCriterion(wc, 4*1000, 10, true);
             
             // publish lots of puts cycling through the NUM_KEYS
             assertEquals(0, statistics.getPuts());
@@ -331,14 +335,14 @@ public class StatisticsDUnitTest extends CacheTestCase {
                 return "Waiting for " + StatSamplerStats.SAMPLE_COUNT + " >= " + initialSampleCount + 2;
               }
             };
-            waitForCriterion(wc, 4*1000, 10, true);
+            Wait.waitForCriterion(wc, 4*1000, 10, true);
           }
         });
       }
       for (int pubThread = 0; pubThread < publishers.length; pubThread++) {
         publishers[pubThread].join();
         if (publishers[pubThread].exceptionOccurred()) {
-          fail("Test failed", publishers[pubThread].getException());
+          Assert.fail("Test failed", publishers[pubThread].getException());
         }
       }
     }
@@ -361,7 +365,7 @@ public class StatisticsDUnitTest extends CacheTestCase {
             return "Waiting for " + StatSamplerStats.SAMPLE_COUNT + " >= " + initialSampleCount + 2;
           }
         };
-        waitForCriterion(wc, 4*1000, 10, true);
+        Wait.waitForCriterion(wc, 4*1000, 10, true);
         
         // now post total updateEvents to static
         final PubSubStats statistics = subStatsRef.get();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/internal/statistics/ValueMonitorJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/statistics/ValueMonitorJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/statistics/ValueMonitorJUnitTest.java
index cc76ce2..1d1a738 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/statistics/ValueMonitorJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/statistics/ValueMonitorJUnitTest.java
@@ -39,8 +39,8 @@ import com.gemstone.gemfire.StatisticsType;
 import com.gemstone.gemfire.internal.NanoTimer;
 import com.gemstone.gemfire.internal.StatisticsManager;
 import com.gemstone.gemfire.internal.statistics.StatisticsNotification.Type;
-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;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
 import junit.framework.TestCase;
@@ -369,6 +369,6 @@ public class ValueMonitorJUnitTest {
         return "waiting for notification";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, ms, interval, throwOnTimeout);
+    Wait.waitForCriterion(wc, ms, interval, throwOnTimeout);
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/management/CacheManagementDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/CacheManagementDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/CacheManagementDUnitTest.java
index 2698e2a..320e20a 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/CacheManagementDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/CacheManagementDUnitTest.java
@@ -46,9 +46,11 @@ import com.gemstone.gemfire.management.internal.ManagementConstants;
 import com.gemstone.gemfire.management.internal.SystemManagementService;
 import com.gemstone.gemfire.management.internal.NotificationHub.NotificationHubListener;
 import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 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 static com.jayway.awaitility.Awaitility.*;
 import static org.hamcrest.Matchers.*;
@@ -99,12 +101,6 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
 
   }
 
-  public void tearDown2() throws Exception {
-    super.tearDown2();
-  }
-  
-  
-
   public void testGemFireConfigData() throws Exception {
      initManagement(false);
    
@@ -142,7 +138,7 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
       String log = (String) vm.invoke(CacheManagementDUnitTest.class,
           "fetchLog");
       assertNotNull(log);
-      getLogWriter().info(
+      LogWriterUtils.getLogWriter().info(
           "<ExpectedString> Log Of Member is " + log.toString()
               + "</ExpectedString> ");
 
@@ -658,7 +654,7 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
         .getMemberMXBean();
     JVMMetrics metrics = bean.showJVMMetrics();
 
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "<ExpectedString> JVMMetrics is " + metrics.toString()
             + "</ExpectedString> ");
 
@@ -669,7 +665,7 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
         .getMemberMXBean();
     OSMetrics metrics = bean.showOSMetrics();
 
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "<ExpectedString> OSMetrics is " + metrics.toString()
             + "</ExpectedString> ");
 
@@ -683,7 +679,7 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
   }
 
   public static void assertExpectedMembers(int expectedMemberCount) {
-    DistributedTestCase.waitForCriterion(new WaitCriterion() {
+    Wait.waitForCriterion(new WaitCriterion() {
       public String description() {
         return "Waiting all nodes to shutDown";
       }
@@ -710,14 +706,14 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
       MemberMXBean bean = MBeanUtil.getMemberMbeanProxy(member);
       JVMMetrics metrics = bean.showJVMMetrics();
 
-      getLogWriter().info(
+      LogWriterUtils.getLogWriter().info(
           "<ExpectedString> JVMMetrics is " + metrics.toString()
               + "</ExpectedString> ");
-      getLogWriter().info(
+      LogWriterUtils.getLogWriter().info(
           "<ExpectedString> OSMetrics is " + metrics.toString()
               + "</ExpectedString> ");
       
-      getLogWriter().info(
+      LogWriterUtils.getLogWriter().info(
           "<ExpectedString> Boolean Data Check " +bean.isManager()
               + "</ExpectedString> ");
       
@@ -841,7 +837,7 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
     SystemManagementService service = (SystemManagementService) getManagementService();
     final Map<ObjectName, NotificationHubListener> hubMap = service.getNotificationHub().getListenerObjectMap();
 
-    DistributedTestCase.waitForCriterion(new WaitCriterion() {
+    Wait.waitForCriterion(new WaitCriterion() {
       public String description() {
         return "Waiting for manager to register the listener";
       }
@@ -919,7 +915,7 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
 
       public void run() {
 
-        DistributedTestCase.waitForCriterion(new WaitCriterion() {
+        Wait.waitForCriterion(new WaitCriterion() {
           public String description() {
             return "Waiting for all the RegionCreated notification to reach the manager " + notifList.size();
           }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/management/ClientHealthStatsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/ClientHealthStatsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/ClientHealthStatsDUnitTest.java
index 7f7c4fd..9d42589 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/ClientHealthStatsDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/ClientHealthStatsDUnitTest.java
@@ -48,10 +48,13 @@ import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientProxy;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.IgnoredException;
+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.DistributedTestCase.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 /**
  * Client health stats check
@@ -101,11 +104,11 @@ public class ClientHealthStatsDUnitTest extends DistributedTestCase {
     server = host.getVM(1);
     client = host.getVM(2);
     client2 = host.getVM(3);
-    addExpectedException("Connection reset");
+    IgnoredException.addIgnoredException("Connection reset");
   }
 
-  public void tearDown2() throws Exception {
-    super.tearDown2();
+  @Override
+  protected final void preTearDown() throws Exception {
     reset();
     helper.closeCache(managingNode);
     helper.closeCache(client);
@@ -233,9 +236,9 @@ public class ClientHealthStatsDUnitTest extends DistributedTestCase {
     props.setProperty(DistributionConfig.DURABLE_CLIENT_ID_NAME, "durable-"+clientNum);
     props.setProperty(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME, "300000");
 
-    props.setProperty("log-file", testName+"_client_" + clientNum + ".log");
+    props.setProperty("log-file", getTestMethodName()+"_client_" + clientNum + ".log");
     props.setProperty("log-level", "info");
-    props.setProperty("statistic-archive-file", testName+"_client_" + clientNum
+    props.setProperty("statistic-archive-file", getTestMethodName()+"_client_" + clientNum
         + ".gfs");
     props.setProperty("statistic-sampling-enabled", "true");
 
@@ -340,7 +343,7 @@ public class ClientHealthStatsDUnitTest extends DistributedTestCase {
         return "Did not receive last key.";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 60*1000, 500, true);
+    Wait.waitForCriterion(wc, 60*1000, 500, true);
   }
 
 
@@ -358,8 +361,8 @@ public class ClientHealthStatsDUnitTest extends DistributedTestCase {
 
       String[] clientIds = bean.getClientIds();
       assertTrue(clientIds.length == 2);
-      getLogWriter().info("<ExpectedString> ClientId-1 of the Server is  " + clientIds[0] + "</ExpectedString> ");
-      getLogWriter().info("<ExpectedString> ClientId-2 of the Server is  " + clientIds[1] + "</ExpectedString> ");
+      LogWriterUtils.getLogWriter().info("<ExpectedString> ClientId-1 of the Server is  " + clientIds[0] + "</ExpectedString> ");
+      LogWriterUtils.getLogWriter().info("<ExpectedString> ClientId-2 of the Server is  " + clientIds[1] + "</ExpectedString> ");
       
       ClientHealthStatus[] clientStatuses = bean.showAllClientStats();
 
@@ -369,15 +372,15 @@ public class ClientHealthStatsDUnitTest extends DistributedTestCase {
       ClientHealthStatus clientStatus2 = bean.showClientStats(clientIds[1]);
       assertNotNull(clientStatus1);
       assertNotNull(clientStatus2);
-      getLogWriter().info("<ExpectedString> ClientStats-1 of the Server is  " + clientStatus1 + "</ExpectedString> ");
-      getLogWriter().info("<ExpectedString> ClientStats-2 of the Server is  " + clientStatus2 + "</ExpectedString> ");
+      LogWriterUtils.getLogWriter().info("<ExpectedString> ClientStats-1 of the Server is  " + clientStatus1 + "</ExpectedString> ");
+      LogWriterUtils.getLogWriter().info("<ExpectedString> ClientStats-2 of the Server is  " + clientStatus2 + "</ExpectedString> ");
 
-      getLogWriter().info("<ExpectedString> clientStatuses " + clientStatuses + "</ExpectedString> ");
+      LogWriterUtils.getLogWriter().info("<ExpectedString> clientStatuses " + clientStatuses + "</ExpectedString> ");
       assertNotNull(clientStatuses);
       
       assertTrue(clientStatuses.length == 2);
       for (ClientHealthStatus status : clientStatuses) {
-        getLogWriter().info("<ExpectedString> ClientStats of the Server is  " + status + "</ExpectedString> ");
+        LogWriterUtils.getLogWriter().info("<ExpectedString> ClientStats of the Server is  " + status + "</ExpectedString> ");
 
       }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/management/CompositeTypeTestDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/CompositeTypeTestDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/CompositeTypeTestDUnitTest.java
index e7c11a7..49db7d5 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/CompositeTypeTestDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/CompositeTypeTestDUnitTest.java
@@ -26,6 +26,8 @@ import com.gemstone.gemfire.management.internal.ManagementConstants;
 import com.gemstone.gemfire.management.internal.SystemManagementService;
 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;
 
 public class CompositeTypeTestDUnitTest extends ManagementTestBase {
 
@@ -46,11 +48,6 @@ public class CompositeTypeTestDUnitTest extends ManagementTestBase {
     
   }
 
-  public void tearDown2() throws Exception {
-    super.tearDown2();
-    
-  }
-  
   public void testCompositeTypeGetters() throws Exception{
     
     initManagement(false);
@@ -117,7 +114,7 @@ public class CompositeTypeTestDUnitTest extends ManagementTestBase {
         try {
           final ObjectName objectName = new ObjectName("GemFire:service=custom,type=composite,member="+memberID);
           
-          waitForCriterion(new WaitCriterion() {
+          Wait.waitForCriterion(new WaitCriterion() {
             public String description() {
               return "Waiting for Composite Type MBean";
             }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/management/DLockManagementDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/DLockManagementDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/DLockManagementDUnitTest.java
index 793526c..2e08d58 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/DLockManagementDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/DLockManagementDUnitTest.java
@@ -29,8 +29,11 @@ import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedM
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.management.internal.MBeanJMXAdapter;
 import com.gemstone.gemfire.management.internal.SystemManagementService;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 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;
 
 public class DLockManagementDUnitTest extends ManagementTestBase {
 
@@ -55,11 +58,6 @@ public class DLockManagementDUnitTest extends ManagementTestBase {
 
   }
 
-  public void tearDown2() throws Exception {
-    super.tearDown2();
-    
-  }
-
   /**
    * Distributed Lock Service test
    * 
@@ -145,7 +143,7 @@ public class DLockManagementDUnitTest extends ManagementTestBase {
           RegionMXBean bean = null;
           try {
 
-            waitForCriterion(new WaitCriterion() {
+            Wait.waitForCriterion(new WaitCriterion() {
 
               LockServiceMXBean bean = null;
 
@@ -199,7 +197,7 @@ public class DLockManagementDUnitTest extends ManagementTestBase {
 
         assertNotNull(grantor);
 
-        getLogWriter().info("In identifyLockGrantor - grantor is " + grantor);
+        LogWriterUtils.getLogWriter().info("In identifyLockGrantor - grantor is " + grantor);
 
        
 
@@ -305,7 +303,7 @@ public class DLockManagementDUnitTest extends ManagementTestBase {
 
         final String LOCK_OBJECT = "lockObject_" + vm.getPid();
 
-        waitForCriterion(new WaitCriterion() {
+        Wait.waitForCriterion(new WaitCriterion() {
           DistributedLockService service = null;
 
           public String description() {
@@ -337,10 +335,10 @@ public class DLockManagementDUnitTest extends ManagementTestBase {
         assertNotNull(bean);
         String[] listHeldLock = bean.listHeldLocks();
         assertEquals(listHeldLock.length, 1);
-        getLogWriter().info("List Of Lock Object is  " + listHeldLock[0]);
+        LogWriterUtils.getLogWriter().info("List Of Lock Object is  " + listHeldLock[0]);
         Map<String, String> lockThreadMap = bean.listThreadsHoldingLock();
         assertEquals(lockThreadMap.size(), 1);
-        getLogWriter().info(
+        LogWriterUtils.getLogWriter().info(
             "List Of Lock Thread is  " + lockThreadMap.toString());
       }
     };
@@ -373,10 +371,10 @@ public class DLockManagementDUnitTest extends ManagementTestBase {
           assertNotNull(bean);
           String[] listHeldLock = bean.listHeldLocks();
           assertEquals(listHeldLock.length, 1);
-          getLogWriter().info("List Of Lock Object is  " + listHeldLock[0]);
+          LogWriterUtils.getLogWriter().info("List Of Lock Object is  " + listHeldLock[0]);
           Map<String, String> lockThreadMap = bean.listThreadsHoldingLock();
           assertEquals(lockThreadMap.size(), 1);
-          getLogWriter().info(
+          LogWriterUtils.getLogWriter().info(
               "List Of Lock Thread is  " + lockThreadMap.toString());
         }
 
@@ -432,7 +430,7 @@ public class DLockManagementDUnitTest extends ManagementTestBase {
         final ManagementService service = getManagementService();
         if (expectedMembers == 0) {
           try {
-            waitForCriterion(new WaitCriterion() {
+            Wait.waitForCriterion(new WaitCriterion() {
 
               DistributedLockServiceMXBean bean = null;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/management/DiskManagementDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/DiskManagementDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/DiskManagementDUnitTest.java
index b9f49ab..b850b54 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/DiskManagementDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/DiskManagementDUnitTest.java
@@ -45,6 +45,8 @@ import com.gemstone.gemfire.test.dunit.AsyncInvocation;
 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;
 
 /**
  * Test cases to cover all test cases which pertains to disk from Management
@@ -90,8 +92,8 @@ public class DiskManagementDUnitTest extends ManagementTestBase {
 
   }
 
-  public void tearDown2() throws Exception {
-    super.tearDown2();    
+  @Override
+  protected final void postTearDownManagementTestBase() throws Exception {
     com.gemstone.gemfire.internal.FileUtil.delete(diskDir);
   }
 
@@ -176,9 +178,9 @@ public class DiskManagementDUnitTest extends ManagementTestBase {
     VM vm1 = getManagedNodeList().get(1);
     VM vm2 = getManagedNodeList().get(2);
     
-    getLogWriter().info("Creating region in VM0");
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("Creating region in VM0");
     createPersistentRegion(vm0);
-    getLogWriter().info("Creating region in VM1");
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("Creating region in VM1");
     createPersistentRegion(vm1);
 
     putAnEntry(vm0);
@@ -197,12 +199,12 @@ public class DiskManagementDUnitTest extends ManagementTestBase {
       }
     });
 
-    getLogWriter().info("closing region in vm0");
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("closing region in vm0");
     closeRegion(vm0);
 
     updateTheEntry(vm1);
 
-    getLogWriter().info("closing region in vm1");
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("closing region in vm1");
     closeRegion(vm1);
     AsyncInvocation future = createPersistentRegionAsync(vm0);
     waitForBlockedInitialization(vm0);
@@ -217,14 +219,14 @@ public class DiskManagementDUnitTest extends ManagementTestBase {
         DistributedSystemMXBean bean = service.getDistributedSystemMXBean();
         PersistentMemberDetails[] missingDiskStores = bean
         .listMissingDiskStores();
-        getLogWriter().info("waiting members=" + missingDiskStores);
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("waiting members=" + missingDiskStores);
         assertNotNull(missingDiskStores);
         assertEquals(1, missingDiskStores.length);
 
         for (PersistentMemberDetails id : missingDiskStores) {
-          getLogWriter().info("Missing DiskStoreID is =" + id.getDiskStoreId());
-          getLogWriter().info("Missing Host is =" + id.getHost());
-          getLogWriter().info("Missing Directory is =" + id.getDirectory());
+          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("Missing DiskStoreID is =" + id.getDiskStoreId());
+          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("Missing Host is =" + id.getHost());
+          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("Missing Directory is =" + id.getDirectory());
 
           try {
             bean.revokeMissingDiskStores(id.getDiskStoreId());
@@ -377,11 +379,11 @@ public class DiskManagementDUnitTest extends ManagementTestBase {
         Cache cache = getCache();
         Region region = cache.getRegion(REGION_NAME);
         DiskRegion dr = ((LocalRegion) region).getDiskRegion();
-        getLogWriter().info("putting key1");
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("putting key1");
         region.put("key1", "value1");
-        getLogWriter().info("putting key2");
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("putting key2");
         region.put("key2", "value2");
-        getLogWriter().info("removing key2");
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("removing key2");
         region.remove("key2");
         // now that it is compactable the following forceCompaction should
         // go ahead and do a roll and compact it.
@@ -413,7 +415,7 @@ public class DiskManagementDUnitTest extends ManagementTestBase {
 
         assertTrue(compactedDiskStores.length > 0);
         for (int i = 0; i < compactedDiskStores.length; i++) {
-          getLogWriter().info(
+          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info(
               "<ExpectedString> Compacted Store " + i + " "
                   + compactedDiskStores[i] + "</ExpectedString> ");
         }
@@ -463,13 +465,13 @@ public class DiskManagementDUnitTest extends ManagementTestBase {
             String[] allDisks = bean.listDiskStores(true);
             assertNotNull(allDisks);
             List<String> listString = Arrays.asList(allDisks);
-            getLogWriter().info(
+            com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info(
                 "<ExpectedString> Remote All Disk Stores Are  "
                     + listString.toString() + "</ExpectedString> ");
             String[] compactedDiskStores = bean.compactAllDiskStores();
             assertTrue(compactedDiskStores.length > 0);
             for (int i = 0; i < compactedDiskStores.length; i++) {
-              getLogWriter().info(
+              com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info(
                   "<ExpectedString> Remote Compacted Store " + i + " "
                       + compactedDiskStores[i] + "</ExpectedString> ");
             }
@@ -578,7 +580,7 @@ public class DiskManagementDUnitTest extends ManagementTestBase {
     vm.invoke(new SerializableRunnable() {
 
       public void run() {
-        waitForCriterion(new WaitCriterion() {
+        Wait.waitForCriterion(new WaitCriterion() {
 
           public String description() {
             return "Waiting to blocked waiting for another persistent member to come online";

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/management/DistributedSystemDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/DistributedSystemDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/DistributedSystemDUnitTest.java
index f234e34..10f628d 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/DistributedSystemDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/DistributedSystemDUnitTest.java
@@ -49,10 +49,14 @@ import com.gemstone.gemfire.management.internal.NotificationHub.NotificationHubL
 import com.gemstone.gemfire.management.internal.SystemManagementService;
 import com.gemstone.gemfire.management.internal.beans.MemberMBean;
 import com.gemstone.gemfire.management.internal.beans.SequenceNumber;
+import com.gemstone.gemfire.test.dunit.IgnoredException;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 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.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 /**
  * Distributed System tests
@@ -112,11 +116,6 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
 
   }
 
-  public void tearDown2() throws Exception {
-    super.tearDown2();
-    
-  }
-
   /**
    * Tests each and every operations that is defined on the MemberMXBean
    * 
@@ -205,7 +204,7 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
 
         public Object call() throws Exception {
           
-          waitForCriterion(new WaitCriterion() {
+          Wait.waitForCriterion(new WaitCriterion() {
             public String description() {
               return "Waiting for all alert Listener to register with managed node";
             }
@@ -284,7 +283,7 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
             ManagementService service = getManagementService();
             final DistributedSystemMXBean bean = service.getDistributedSystemMXBean();
             
-            waitForCriterion(new WaitCriterion() {
+            Wait.waitForCriterion(new WaitCriterion() {
               public String description() {
                 return "Waiting for all members to send their initial Data";
               }
@@ -304,7 +303,7 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
                     null);
                 notificationListenerMap.put(objectName, listener);
               } catch (InstanceNotFoundException e) {
-                getLogWriter().error(e);
+                LogWriterUtils.getLogWriter().error(e);
               }
             }
           }
@@ -359,7 +358,7 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
 
       public void run() {
 
-        waitForCriterion(new WaitCriterion() {
+        Wait.waitForCriterion(new WaitCriterion() {
           public String description() {
             return "Waiting for all Notifications to reach the Managing Node";
           }
@@ -383,9 +382,9 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
           try {
             mbeanServer.removeNotificationListener(objectName, listener);
           } catch (ListenerNotFoundException e) {
-            getLogWriter().error(e);
+            LogWriterUtils.getLogWriter().error(e);
           } catch (InstanceNotFoundException e) {
-            getLogWriter().error(e);
+            LogWriterUtils.getLogWriter().error(e);
           }
         }
 
@@ -430,7 +429,7 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
         ManagementService service = getManagementService();
         final DistributedSystemMXBean bean = service.getDistributedSystemMXBean();
         
-        waitForCriterion(new WaitCriterion() {
+        Wait.waitForCriterion(new WaitCriterion() {
           public String description() {
             return "Waiting for all members to send their initial Data";
           }
@@ -450,7 +449,7 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
           try {
             mbeanServer.removeNotificationListener(objectName, listener);
           } catch (InstanceNotFoundException e) {
-            getLogWriter().error(e);
+            LogWriterUtils.getLogWriter().error(e);
           } catch (ListenerNotFoundException e) {
             // TODO: apparently there is never a notification listener on any these mbeans at this point 
             // fix this test so it doesn't hit these unexpected exceptions -- getLogWriter().error(e);
@@ -480,7 +479,7 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
             } catch (ListenerNotFoundException e) {
               // Expected Exception Do nothing
             } catch (InstanceNotFoundException e) {
-              getLogWriter().error(e);
+              LogWriterUtils.getLogWriter().error(e);
             }
           }
         }
@@ -563,7 +562,7 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
 
         public Object call() throws Exception {
           final AlertNotifListener nt = AlertNotifListener.getInstance();
-          waitForCriterion(new WaitCriterion() {
+          Wait.waitForCriterion(new WaitCriterion() {
             public String description() {
               return "Waiting for all alerts to reach the Managing Node";
             }
@@ -614,7 +613,7 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
       vm1.invoke(new SerializableCallable("Warning level Alerts") {
 
         public Object call() throws Exception {
-          final ExpectedException warnEx = addExpectedException(WARNING_LEVEL_MESSAGE);
+          final IgnoredException warnEx = IgnoredException.addIgnoredException(WARNING_LEVEL_MESSAGE);
           logger.warn(WARNING_LEVEL_MESSAGE);
           warnEx.remove();
           return null;
@@ -648,7 +647,7 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
         public Object call() throws Exception {
           // add expected exception strings         
           
-          final ExpectedException severeEx = addExpectedException(SEVERE_LEVEL_MESSAGE);
+          final IgnoredException severeEx = IgnoredException.addIgnoredException(SEVERE_LEVEL_MESSAGE);
           logger.fatal(SEVERE_LEVEL_MESSAGE);
           severeEx.remove();
           return null;
@@ -706,7 +705,7 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
           final DistributedSystemMXBean bean = service.getDistributedSystemMXBean();
           assertNotNull(service.getDistributedSystemMXBean());
           
-          waitForCriterion(new WaitCriterion() {
+          Wait.waitForCriterion(new WaitCriterion() {
             public String description() {
               return "Waiting All members to intitialize DistributedSystemMBean expect 5 but found " + bean.getMemberCount();
             }
@@ -729,10 +728,10 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
           Iterator<DistributedMember> memberIt = otherMemberSet.iterator();
           while (memberIt.hasNext()) {
             DistributedMember member = memberIt.next();
-            getLogWriter().info(
+            LogWriterUtils.getLogWriter().info(
                 "JVM Metrics For Member " + member.getId() + ":"
                     + bean.showJVMMetrics(member.getId()));
-            getLogWriter().info(
+            LogWriterUtils.getLogWriter().info(
                 "OS Metrics For Member " + member.getId() + ":"
                     + bean.showOSMetrics(member.getId()));
           }
@@ -778,7 +777,7 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
           DistributedSystemMXBean bean = service.getDistributedSystemMXBean();
           assertNotNull(service.getDistributedSystemMXBean());
           bean.shutDownAllMembers();
-          staticPause(2000);
+          Wait.pause(2000);
           assertEquals(
               cache.getDistributedSystem().getAllOtherMembers().size(), 1);
           return null;
@@ -805,7 +804,7 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
           waitForAllMembers(4);
           
           for(int i =0; i< bean.listMemberObjectNames().length ; i++){
-            getLogWriter().info(
+            LogWriterUtils.getLogWriter().info(
                 "ObjectNames Of the Mmeber" + bean.listMemberObjectNames()[i] );
           }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/management/LocatorManagementDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/LocatorManagementDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/LocatorManagementDUnitTest.java
index 4c9aaee..0d2fdbc 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/LocatorManagementDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/LocatorManagementDUnitTest.java
@@ -31,9 +31,13 @@ import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.management.internal.ManagementConstants;
+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.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 
 /**
@@ -69,10 +73,9 @@ public class LocatorManagementDUnitTest extends ManagementTestBase {
     locator = managedNode1;
   }
 
-  public void tearDown2() throws Exception {
+  @Override
+  protected final void preTearDownManagementTestBase() throws Exception {
     stopLocator(locator);
-    super.tearDown2();
-
   }
 
   /**
@@ -163,21 +166,21 @@ public class LocatorManagementDUnitTest extends ManagementTestBase {
         props.setProperty(DistributionConfig.MCAST_PORT_NAME,"0");
         
         props.setProperty(DistributionConfig.LOCATORS_NAME, "");
-        props.setProperty(DistributionConfig.LOG_LEVEL_NAME, getDUnitLogLevel());
+        props.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
 
         InetAddress bindAddr = null;
         try {
           bindAddr = InetAddress.getByName(getServerHostName(vm.getHost()));
         } catch (UnknownHostException uhe) {
-          fail("While resolving bind address ", uhe);
+          Assert.fail("While resolving bind address ", uhe);
         }
 
         try {
-          File logFile = new File(testName + "-locator" + port + ".log");
+          File logFile = new File(getTestMethodName() + "-locator" + port + ".log");
           Locator locator = Locator.startLocatorAndDS(port, logFile, bindAddr,
               props, isPeer, true, null);
         } catch (IOException ex) {
-          fail("While starting locator on port " + port, ex);
+          Assert.fail("While starting locator on port " + port, ex);
         }
 
         assertTrue(InternalLocator.hasLocator());
@@ -225,8 +228,8 @@ public class LocatorManagementDUnitTest extends ManagementTestBase {
         LocatorMXBean bean = service.getLocalLocatorMXBean();
         assertNotNull(bean);
         assertEquals(locPort, bean.getPort());
-        getLogWriter().info("Log of Locator" + bean.viewLog());
-        getLogWriter().info("BindAddress" + bean.getBindAddress());
+        LogWriterUtils.getLogWriter().info("Log of Locator" + bean.viewLog());
+        LogWriterUtils.getLogWriter().info("BindAddress" + bean.getBindAddress());
         assertEquals(isPeer, bean.isPeerLocator());
         return null;
       }
@@ -251,8 +254,8 @@ public class LocatorManagementDUnitTest extends ManagementTestBase {
         LocatorMXBean bean = MBeanUtil.getLocatorMbeanProxy(member);
         assertNotNull(bean);
 
-        getLogWriter().info("Log of Locator" + bean.viewLog());
-        getLogWriter().info("BindAddress" + bean.getBindAddress());
+        LogWriterUtils.getLogWriter().info("Log of Locator" + bean.viewLog());
+        LogWriterUtils.getLogWriter().info("BindAddress" + bean.getBindAddress());
 
         return null;
       }
@@ -278,7 +281,7 @@ public class LocatorManagementDUnitTest extends ManagementTestBase {
         final LocatorMXBean bean = service.getLocalLocatorMXBean();
         assertNotNull(bean);
 
-        waitForCriterion(new WaitCriterion() {
+        Wait.waitForCriterion(new WaitCriterion() {
 
           public String description() {
             return "Waiting for the managers List";
@@ -317,7 +320,7 @@ public class LocatorManagementDUnitTest extends ManagementTestBase {
         final LocatorMXBean bean = service.getLocalLocatorMXBean();
         assertNotNull(bean);
 
-        waitForCriterion(new WaitCriterion() {
+        Wait.waitForCriterion(new WaitCriterion() {
 
           public String description() {
             return "Waiting for the Willing managers List";

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/management/MBeanUtil.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/MBeanUtil.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/MBeanUtil.java
index 171204c..6c3c8e7 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/MBeanUtil.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/MBeanUtil.java
@@ -37,7 +37,9 @@ import com.gemstone.gemfire.management.internal.MBeanJMXAdapter;
 import com.gemstone.gemfire.management.internal.ManagementConstants;
 import com.gemstone.gemfire.management.internal.SystemManagementService;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 /**
  * Utility test class to get various proxies
@@ -66,7 +68,7 @@ public class MBeanUtil {
     final SystemManagementService service = (SystemManagementService) ManagementTestBase
         .getManagementService();
     final ObjectName memberMBeanName = service.getMemberMBeanName(member);
-    DistributedTestCase.waitForCriterion(new WaitCriterion() {
+    Wait.waitForCriterion(new WaitCriterion() {
       MemberMXBean bean = null;
 
       public String description() {
@@ -110,7 +112,7 @@ public class MBeanUtil {
     final ObjectName cacheServerMBeanName = service
         .getCacheServerMBeanName(port,member);
 
-    DistributedTestCase.waitForCriterion(new WaitCriterion() {
+    Wait.waitForCriterion(new WaitCriterion() {
       CacheServerMXBean bean = null;
 
       public String description() {
@@ -159,7 +161,7 @@ public class MBeanUtil {
     final ObjectName lockServiceMBeanName = service.getLockServiceMBeanName(
         member, lockServiceName);
 
-    DistributedTestCase.waitForCriterion(new WaitCriterion() {
+    Wait.waitForCriterion(new WaitCriterion() {
       LockServiceMXBean bean = null;
 
       public String description() {
@@ -208,7 +210,7 @@ public class MBeanUtil {
     final ObjectName regionMBeanName = service.getRegionMBeanName(
         member, regionPath);
     
-    DistributedTestCase.waitForCriterion(new WaitCriterion(){ 
+    Wait.waitForCriterion(new WaitCriterion(){ 
       
       RegionMXBean bean = null;
       public String description() {
@@ -258,7 +260,7 @@ public class MBeanUtil {
 
     final ObjectName senderMBeanName = service.getGatewaySenderMBeanName(member, gatwaySenderId);
 
-    DistributedTestCase.waitForCriterion(new WaitCriterion() {
+    Wait.waitForCriterion(new WaitCriterion() {
 
       GatewaySenderMXBean bean = null;
 
@@ -310,7 +312,7 @@ public class MBeanUtil {
     final ObjectName queueMBeanName = service.getAsyncEventQueueMBeanName(
         member, queueId);
 
-    DistributedTestCase.waitForCriterion(new WaitCriterion() {
+    Wait.waitForCriterion(new WaitCriterion() {
 
       AsyncEventQueueMXBean bean = null;
 
@@ -358,7 +360,7 @@ public class MBeanUtil {
 
     final ObjectName receiverMBeanName = service.getGatewayReceiverMBeanName(member);
 
-    DistributedTestCase.waitForCriterion(new WaitCriterion() {
+    Wait.waitForCriterion(new WaitCriterion() {
 
       GatewayReceiverMXBean bean = null;
 
@@ -406,7 +408,7 @@ public class MBeanUtil {
     final ManagementService service = ManagementTestBase
         .getManagementService();
 
-    DistributedTestCase.waitForCriterion(new WaitCriterion() {
+    Wait.waitForCriterion(new WaitCriterion() {
 
       DistributedRegionMXBean bean = null;
 
@@ -444,7 +446,7 @@ public class MBeanUtil {
 
     final ManagementService service = ManagementTestBase
         .getManagementService();
-    DistributedTestCase.waitForCriterion(new WaitCriterion() {
+    Wait.waitForCriterion(new WaitCriterion() {
 
       DistributedLockServiceMXBean bean = null;
 
@@ -483,7 +485,7 @@ public class MBeanUtil {
 
     final ObjectName locatorMBeanName = service.getLocatorMBeanName(member);
 
-    DistributedTestCase.waitForCriterion(new WaitCriterion() {
+    Wait.waitForCriterion(new WaitCriterion() {
 
       LocatorMXBean bean = null;
 
@@ -536,7 +538,7 @@ public class MBeanUtil {
       try {
         propertyName = attributeInfo.getName();
         propertyValue = mbeanServer.getAttribute(objName, propertyName);
-        DistributedTestCase.getLogWriter().info(
+        LogWriterUtils.getLogWriter().info(
             "<ExpectedString> " + propertyName + " = " + propertyValue
                 + "</ExpectedString> ");
       } catch (Exception e) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/management/ManagementTestBase.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/ManagementTestBase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/ManagementTestBase.java
index ecfc698..663abee 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/ManagementTestBase.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/ManagementTestBase.java
@@ -42,12 +42,16 @@ import com.gemstone.gemfire.management.internal.LocalManager;
 import com.gemstone.gemfire.management.internal.MBeanJMXAdapter;
 import com.gemstone.gemfire.management.internal.ManagementStrings;
 import com.gemstone.gemfire.management.internal.SystemManagementService;
+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.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;
 
 public class ManagementTestBase extends DistributedTestCase {
 
@@ -120,16 +124,25 @@ public class ManagementTestBase extends DistributedTestCase {
 
   }
 
-  public void tearDown2() throws Exception {
-    super.tearDown2();
+  @Override
+  protected final void preTearDown() throws Exception {
+    preTearDownManagementTestBase();
+    
     closeAllCache();
     managementService = null;
 
     mcastPort = 0;
     disconnectAllFromDS();
     props.clear();
+    
+    postTearDownManagementTestBase();
   }
 
+  protected void preTearDownManagementTestBase() throws Exception {
+  }
+
+  protected void postTearDownManagementTestBase() throws Exception {
+  }
 
   public void closeAllCache() throws Exception{
     closeCache(managingNode);
@@ -143,7 +156,7 @@ public class ManagementTestBase extends DistributedTestCase {
    * Enable system property gemfire.disableManagement false in each VM.
    */
   public void enableManagement() {
-    invokeInEveryVM(new SerializableRunnable("Enable Management") {
+    Invoke.invokeInEveryVM(new SerializableRunnable("Enable Management") {
       public void run() {
         System.setProperty(InternalDistributedSystem.DISABLE_MANAGEMENT_PROPERTY, "false");
       }
@@ -155,7 +168,7 @@ public class ManagementTestBase extends DistributedTestCase {
    * Disable system property gemfire.disableManagement true in each VM.
    */
   public void disableManagement() {
-    invokeInEveryVM(new SerializableRunnable("Disable Management") {
+    Invoke.invokeInEveryVM(new SerializableRunnable("Disable Management") {
       public void run() {
         System.setProperty(InternalDistributedSystem.DISABLE_MANAGEMENT_PROPERTY, "true");
       }
@@ -213,7 +226,7 @@ public class ManagementTestBase extends DistributedTestCase {
 
   public Cache createCache(Properties props) {
     System.setProperty("dunitLogPerTest", "true");
-    props.setProperty(DistributionConfig.LOG_FILE_NAME,testName+"-.log");
+    props.setProperty(DistributionConfig.LOG_FILE_NAME,getTestMethodName()+"-.log");
     ds = (new ManagementTestBase("temp")).getSystem(props);
     cache = CacheFactory.create(ds);
     managementService = ManagementService.getManagementService(cache);
@@ -238,7 +251,7 @@ public class ManagementTestBase extends DistributedTestCase {
     }
     props.setProperty(DistributionConfig.ENABLE_TIME_STATISTICS_NAME, "true");
     props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
-    props.setProperty(DistributionConfig.LOG_FILE_NAME,testName+"-.log");
+    props.setProperty(DistributionConfig.LOG_FILE_NAME,getTestMethodName()+"-.log");
     ds = (new ManagementTestBase("temp")).getSystem(props);
     cache = CacheFactory.create(ds);
     managementService = ManagementService.getManagementService(cache);
@@ -290,7 +303,7 @@ public class ManagementTestBase extends DistributedTestCase {
   protected void waitForProxy(final ObjectName objectName,
       final Class interfaceClass) {
 
-    waitForCriterion(new WaitCriterion() {
+    Wait.waitForCriterion(new WaitCriterion() {
       public String description() {
         return "Waiting for the proxy of " + objectName.getCanonicalName()
             + " to get propagated to Manager";
@@ -458,7 +471,7 @@ public class ManagementTestBase extends DistributedTestCase {
 
 
         } catch (ManagementException e) {
-          fail("failed with ManagementException", e);
+          Assert.fail("failed with ManagementException", e);
         }
       }
     });
@@ -554,7 +567,7 @@ public class ManagementTestBase extends DistributedTestCase {
         RegionFactory rf = cache
             .createRegionFactory(RegionShortcut.LOCAL);
 
-        getLogWriter().info("Creating Local Region");
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("Creating Local Region");
         rf.create(localRegionName);
 
       }
@@ -577,7 +590,7 @@ public class ManagementTestBase extends DistributedTestCase {
         SystemManagementService service = (SystemManagementService) getManagementService();
         Region region = cache.getRegion(parentRegionPath);
 
-        getLogWriter().info("Creating Sub Region");
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("Creating Sub Region");
         region.createSubregion(subregionName, region.getAttributes());
 
       }
@@ -620,7 +633,7 @@ public class ManagementTestBase extends DistributedTestCase {
         SystemManagementService service = (SystemManagementService) getManagementService();
 
         RegionFactory rf = cache.createRegionFactory(RegionShortcut.REPLICATE);
-        getLogWriter().info("Creating Dist Region");
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("Creating Dist Region");
         rf.create(regionName);
 
       }
@@ -642,7 +655,7 @@ public class ManagementTestBase extends DistributedTestCase {
         SystemManagementService service = (SystemManagementService) getManagementService();
         RegionFactory rf = cache
             .createRegionFactory(RegionShortcut.PARTITION_REDUNDANT);
-        getLogWriter().info("Creating Par Region");
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("Creating Par Region");
         rf.create(partitionRegionName);
 
       }
@@ -661,7 +674,7 @@ public class ManagementTestBase extends DistributedTestCase {
       public void run() {
         GemFireCacheImpl cache = GemFireCacheImpl.getInstance();
 
-        getLogWriter().info("Closing Dist Region");
+        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("Closing Dist Region");
         Region region = cache.getRegion(regionPath);
         region.close();
 
@@ -677,7 +690,7 @@ public class ManagementTestBase extends DistributedTestCase {
     assertNotNull(service.getDistributedSystemMXBean());
 
 
-    waitForCriterion(new WaitCriterion() {
+    Wait.waitForCriterion(new WaitCriterion() {
       public String description() {
         return "Waiting All members to intimate DistributedSystemMBean";
       }
@@ -685,7 +698,7 @@ public class ManagementTestBase extends DistributedTestCase {
       public boolean done() {
         if (bean.listMemberObjectNames() != null) {
 
-          getLogWriter().info(
+          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info(
               "Member Length " + bean.listMemberObjectNames().length);
 
         }
@@ -709,7 +722,7 @@ public class ManagementTestBase extends DistributedTestCase {
 
     final long currentTime = System.currentTimeMillis();
 
-    waitForCriterion(new WaitCriterion() {
+    Wait.waitForCriterion(new WaitCriterion() {
       int actualRefreshCount = 0;
       long lastRefreshTime = service.getLastUpdateTime(objectName);
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/management/MemberMBeanAttributesDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/MemberMBeanAttributesDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/MemberMBeanAttributesDUnitTest.java
index 50db569..c3c1c2f 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/MemberMBeanAttributesDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/MemberMBeanAttributesDUnitTest.java
@@ -26,6 +26,7 @@ import com.gemstone.gemfire.internal.NanoTimer;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.process.PidUnavailableException;
 import com.gemstone.gemfire.internal.process.ProcessUtils;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
 
@@ -62,10 +63,6 @@ public class MemberMBeanAttributesDUnitTest extends ManagementTestBase {
 
   }
 
-  public void tearDown2() throws Exception {
-    super.tearDown2();
-  }
-
   protected void sample(VM vm1) {
     vm1.invoke(new SerializableRunnable("Create Cache") {
       public void run() {
@@ -112,7 +109,7 @@ public class MemberMBeanAttributesDUnitTest extends ManagementTestBase {
       public void run() {
         GemFireCacheImpl cache = GemFireCacheImpl.getInstance();
         RegionFactory rf = cache.createRegionFactory(RegionShortcut.REPLICATE);
-        getLogWriter().info("Creating Dist Region");
+        LogWriterUtils.getLogWriter().info("Creating Dist Region");
         rf.create("testRegion1");
         rf.create("testRegion2");
         rf.create("testRegion3");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/management/OffHeapManagementDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/OffHeapManagementDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/OffHeapManagementDUnitTest.java
index 4e2c278..acafada 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/OffHeapManagementDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/OffHeapManagementDUnitTest.java
@@ -44,6 +44,8 @@ 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.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 /**
  * Tests the off-heap additions to the RegionMXBean and MemberMXBean JMX interfaces.
@@ -151,7 +153,7 @@ public class OffHeapManagementDUnitTest extends CacheTestCase {
   }
 
   @Override
-  public void tearDown2() throws Exception {
+  protected final void preTearDownCacheTestCase() throws Exception {
     Host.getHost(0).getVM(0).invoke(new SerializableRunnable() {
       @Override
       public void run() {
@@ -927,7 +929,7 @@ public class OffHeapManagementDUnitTest extends CacheTestCase {
     vm.invoke(new SerializableRunnable() {
       @Override
       public void run() {
-        waitForCriterion(new WaitCriterion() {          
+        Wait.waitForCriterion(new WaitCriterion() {          
           @Override
           public boolean done() {
             return (notificationListener.getNotificationSize() > 0);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/management/QueryDataDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/QueryDataDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/QueryDataDUnitTest.java
index f55511f..e52594e 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/QueryDataDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/QueryDataDUnitTest.java
@@ -53,9 +53,10 @@ import com.gemstone.gemfire.management.internal.cli.json.TypedJson;
 import com.gemstone.gemfire.pdx.PdxInstance;
 import com.gemstone.gemfire.pdx.PdxInstanceFactory;
 import com.gemstone.gemfire.pdx.internal.PdxInstanceFactoryImpl;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 import org.json.JSONArray;
 import org.json.JSONException;
@@ -148,11 +149,6 @@ public class QueryDataDUnitTest extends ManagementTestBase {
 
   }
 
-  public void tearDown2() throws Exception {
-    super.tearDown2();
-
-  }
-  
   private void initCommonRegions(){
     createRegionsInNodes();
     fillValuesInRegions();
@@ -171,7 +167,7 @@ public class QueryDataDUnitTest extends ManagementTestBase {
         Region region = cache.getRegion(regionName);
         for (int j = from; j < to; j++)
           region.put(new Integer(j), portfolio[j]);
-        getLogWriter()
+        LogWriterUtils.getLogWriter()
             .info(
                 "PRQueryDUnitHelper#getCacheSerializableRunnableForPRPuts: Inserted Portfolio data on Region "
                     + regionName);
@@ -406,7 +402,7 @@ public class QueryDataDUnitTest extends ManagementTestBase {
               if (jsonString1.contains("result")) {
                 JSONObject jsonObj = new JSONObject(jsonString1);
               } else {
-                getLogWriter().info("Failed Test String" + queriesForRR[i] + " is = " + jsonString1);
+                LogWriterUtils.getLogWriter().info("Failed Test String" + queriesForRR[i] + " is = " + jsonString1);
                 fail("Join on Replicated did not work.");
               }
             }
@@ -785,7 +781,7 @@ public class QueryDataDUnitTest extends ManagementTestBase {
             final DistributedRegionMXBean regionMBean = MBeanUtil.getDistributedRegionMbean("/"
                 + PartitionedRegionName6, 3);
 
-            DistributedTestCase.waitForCriterion(new WaitCriterion() {
+            Wait.waitForCriterion(new WaitCriterion() {
 
               public String description() {
                 return "Waiting for all entries to get reflected at managing node";
@@ -799,19 +795,19 @@ public class QueryDataDUnitTest extends ManagementTestBase {
 
             }, MAX_WAIT, 1000, true);
 
-            getLogWriter().info("member1RealData  is = " + member1RealData);
-            getLogWriter().info("member2RealData  is = " + member2RealData);
-            getLogWriter().info("member3RealData  is = " + member3RealData);
+            LogWriterUtils.getLogWriter().info("member1RealData  is = " + member1RealData);
+            LogWriterUtils.getLogWriter().info("member2RealData  is = " + member2RealData);
+            LogWriterUtils.getLogWriter().info("member3RealData  is = " + member3RealData);
             
             String member1Result = bean.queryData(query, member1.getId(), 0);
-            getLogWriter().info("member1Result " + query + " is = " + member1Result);
+            LogWriterUtils.getLogWriter().info("member1Result " + query + " is = " + member1Result);
 
 
             String member2Result = bean.queryData(query, member2.getId(), 0);
-            getLogWriter().info("member2Result " + query + " is = " + member2Result);
+            LogWriterUtils.getLogWriter().info("member2Result " + query + " is = " + member2Result);
             
             String member3Result = bean.queryData(query, member3.getId(), 0);
-            getLogWriter().info("member3Result " + query + " is = " + member3Result);
+            LogWriterUtils.getLogWriter().info("member3Result " + query + " is = " + member3Result);
             
             for (String val : member1RealData) {
               assertTrue(member1Result.contains(val));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/management/RegionManagementDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/RegionManagementDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/RegionManagementDUnitTest.java
index c148029..303188a 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/RegionManagementDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/RegionManagementDUnitTest.java
@@ -49,8 +49,12 @@ import com.gemstone.gemfire.internal.cache.lru.LRUStatistics;
 import com.gemstone.gemfire.internal.cache.partitioned.fixed.SingleHopQuarterPartitionResolver;
 import com.gemstone.gemfire.management.internal.MBeanJMXAdapter;
 import com.gemstone.gemfire.management.internal.SystemManagementService;
+import com.gemstone.gemfire.test.dunit.Assert;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 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;
 
 /**
  * This class checks and verifies various data and operations exposed through
@@ -107,11 +111,6 @@ public class RegionManagementDUnitTest extends ManagementTestBase {
 
   }
 
-  public void tearDown2() throws Exception {
-    super.tearDown2();
-    
-  }
-
   /**
    * Tests all Region MBean related Management APIs
    * 
@@ -439,7 +438,7 @@ public class RegionManagementDUnitTest extends ManagementTestBase {
             region.put(new Integer(total), array);
           }
           assertTrue(bean.getEntrySize() > 0);
-          getLogWriter().info("DEBUG: EntrySize =" + bean.getEntrySize());
+          LogWriterUtils.getLogWriter().info("DEBUG: EntrySize =" + bean.getEntrySize());
           
 
 
@@ -470,7 +469,7 @@ public class RegionManagementDUnitTest extends ManagementTestBase {
           assertNotNull(bean);
 
           assertTrue(bean.getEntrySize() > 0);
-          getLogWriter().info("DEBUG: EntrySize =" + bean.getEntrySize());
+          LogWriterUtils.getLogWriter().info("DEBUG: EntrySize =" + bean.getEntrySize());
         }
       });
 
@@ -673,14 +672,14 @@ public class RegionManagementDUnitTest extends ManagementTestBase {
     attr.setPartitionAttributes(paf.create());
     fixedPrRegion = cache.createRegion(FIXED_PR_NAME, attr.create());
     assertNotNull(fixedPrRegion);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "Partitioned Region " + FIXED_PR_NAME + " created Successfully :"
             + fixedPrRegion.toString());
 
     RegionMXBean bean = service.getLocalRegionMBean(FIXED_PR_PATH);
     RegionAttributes regAttrs = fixedPrRegion.getAttributes();
 
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "FixedPartitionAttribute From GemFire :"
             + regAttrs.getPartitionAttributes().getFixedPartitionAttributes());
 
@@ -697,7 +696,7 @@ public class RegionManagementDUnitTest extends ManagementTestBase {
 
     assertEquals(3, fixedPrData.length);
     for (int i = 0; i < fixedPrData.length; i++) {
-      getLogWriter().info(
+      LogWriterUtils.getLogWriter().info(
           "<ExpectedString> Fixed PR Data is " + fixedPrData[i]
               + "</ExpectedString> ");
     }
@@ -731,7 +730,7 @@ public class RegionManagementDUnitTest extends ManagementTestBase {
           assertNotNull(fixedPrData);
           assertEquals(3, fixedPrData.length);
           for (int i = 0; i < fixedPrData.length; i++) {
-            getLogWriter().info(
+            LogWriterUtils.getLogWriter().info(
                 "<ExpectedString> Remote PR Data is " + fixedPrData[i]
                     + "</ExpectedString> ");
           }
@@ -770,7 +769,7 @@ public class RegionManagementDUnitTest extends ManagementTestBase {
             Set<ObjectName> names = service.queryMBeanNames(member);
             if(names != null){
               for(ObjectName name : names){
-                getLogWriter().info(
+                LogWriterUtils.getLogWriter().info(
                     "<ExpectedString> ObjectNames arr" + name
                         + "</ExpectedString> ");
               }
@@ -779,11 +778,11 @@ public class RegionManagementDUnitTest extends ManagementTestBase {
             mbeanServer.addNotificationListener(memberMBeanName, regionCreate,
                 null, null);
           } catch (NullPointerException e) {
-            fail("FAILED WITH EXCEPION", e);
+            Assert.fail("FAILED WITH EXCEPION", e);
           } catch (InstanceNotFoundException e) {
-            fail("FAILED WITH EXCEPION", e);
+            Assert.fail("FAILED WITH EXCEPION", e);
           } catch (Exception e) {
-            fail("FAILED WITH EXCEPION", e);
+            Assert.fail("FAILED WITH EXCEPION", e);
           }
 
         }
@@ -817,9 +816,9 @@ public class RegionManagementDUnitTest extends ManagementTestBase {
               null, null);
 
         } catch (NullPointerException e) {
-          fail("FAILED WITH EXCEPION", e);
+          Assert.fail("FAILED WITH EXCEPION", e);
         } catch (InstanceNotFoundException e) {
-          fail("FAILED WITH EXCEPION", e);
+          Assert.fail("FAILED WITH EXCEPION", e);
 
         }
 
@@ -844,7 +843,7 @@ public class RegionManagementDUnitTest extends ManagementTestBase {
           RegionMXBean bean = null;
           try {
 
-            waitForCriterion(new WaitCriterion() {
+            Wait.waitForCriterion(new WaitCriterion() {
 
               RegionMXBean bean = null;
 
@@ -905,10 +904,10 @@ public class RegionManagementDUnitTest extends ManagementTestBase {
           EvictionAttributesData evictionData = bean.listEvictionAttributes();
           assertNotNull(membershipData);
           assertNotNull(evictionData);
-          getLogWriter().info(
+          LogWriterUtils.getLogWriter().info(
               "<ExpectedString> Membership Data is "
                   + membershipData.toString() + "</ExpectedString> ");
-          getLogWriter().info(
+          LogWriterUtils.getLogWriter().info(
               "<ExpectedString> Eviction Data is " + membershipData.toString()
                   + "</ExpectedString> ");
  
@@ -942,7 +941,7 @@ public class RegionManagementDUnitTest extends ManagementTestBase {
 
         if (expectedMembers == 0) {
           try {
-            waitForCriterion(new WaitCriterion() {
+            Wait.waitForCriterion(new WaitCriterion() {
 
               RegionMXBean bean = null;
 
@@ -983,15 +982,15 @@ public class RegionManagementDUnitTest extends ManagementTestBase {
 
         // Check Stats related Data
         // Add Mock testing
-        getLogWriter()
+        LogWriterUtils.getLogWriter()
             .info(
                 "<ExpectedString> CacheListenerCallsAvgLatency is "
                     + bean.getCacheListenerCallsAvgLatency()
                     + "</ExpectedString> ");
-        getLogWriter().info(
+        LogWriterUtils.getLogWriter().info(
             "<ExpectedString> CacheWriterCallsAvgLatency is "
                 + bean.getCacheWriterCallsAvgLatency() + "</ExpectedString> ");
-        getLogWriter().info(
+        LogWriterUtils.getLogWriter().info(
             "<ExpectedString> CreatesRate is " + bean.getCreatesRate()
                 + "</ExpectedString> ");
 
@@ -1068,12 +1067,12 @@ public class RegionManagementDUnitTest extends ManagementTestBase {
               .addNotificationListener(memberMBeanName, test, null, null);
         } catch (MalformedObjectNameException e) {
 
-          fail("FAILED WITH EXCEPION", e);
+          Assert.fail("FAILED WITH EXCEPION", e);
         } catch (NullPointerException e) {
-          fail("FAILED WITH EXCEPION", e);
+          Assert.fail("FAILED WITH EXCEPION", e);
 
         } catch (InstanceNotFoundException e) {
-          fail("FAILED WITH EXCEPION", e);
+          Assert.fail("FAILED WITH EXCEPION", e);
 
         }
 
@@ -1092,10 +1091,10 @@ public class RegionManagementDUnitTest extends ManagementTestBase {
         EvictionAttributesData evictionData = bean.listEvictionAttributes();
         assertNotNull(membershipData);
         assertNotNull(evictionData);
-        getLogWriter().info(
+        LogWriterUtils.getLogWriter().info(
             "<ExpectedString> Membership Data is " + membershipData.toString()
                 + "</ExpectedString> ");
-        getLogWriter().info(
+        LogWriterUtils.getLogWriter().info(
             "<ExpectedString> Eviction Data is " + membershipData.toString()
                 + "</ExpectedString> ");
       }
@@ -1143,7 +1142,7 @@ public class RegionManagementDUnitTest extends ManagementTestBase {
         try {
           bean = service.getLocalRegionMBean(REGION_PATH);
         } catch (ManagementException mgtEx) {
-          getLogWriter().info(
+          LogWriterUtils.getLogWriter().info(
               "<ExpectedString> Expected Exception  "
                   + mgtEx.getLocalizedMessage() + "</ExpectedString> ");
         }
@@ -1168,12 +1167,12 @@ public class RegionManagementDUnitTest extends ManagementTestBase {
       public void run() {
         GemFireCacheImpl cache = GemFireCacheImpl.getInstance();
         ManagementService service = getManagementService();
-        getLogWriter().info("Closing Par Region");
+        LogWriterUtils.getLogWriter().info("Closing Par Region");
         RegionMXBean bean = null;
         try {
           bean = service.getLocalRegionMBean(PARTITIONED_REGION_PATH);
         } catch (ManagementException mgtEx) {
-          getLogWriter().info(
+          LogWriterUtils.getLogWriter().info(
               "<ExpectedString> Expected Exception  "
                   + mgtEx.getLocalizedMessage() + "</ExpectedString> ");
         }
@@ -1194,14 +1193,14 @@ public class RegionManagementDUnitTest extends ManagementTestBase {
       public void run() {
         GemFireCacheImpl cache = GemFireCacheImpl.getInstance();
         ManagementService service = getManagementService();
-        getLogWriter().info("Closing Fixed Par Region");
+        LogWriterUtils.getLogWriter().info("Closing Fixed Par Region");
         Region region = cache.getRegion(FIXED_PR_PATH);
         region.close();
         RegionMXBean bean = null;
         try {
           bean = service.getLocalRegionMBean(FIXED_PR_PATH);
         } catch (ManagementException mgtEx) {
-          getLogWriter().info(
+          LogWriterUtils.getLogWriter().info(
               "<ExpectedString> Expected Exception  "
                   + mgtEx.getLocalizedMessage() + "</ExpectedString> ");
         }
@@ -1422,7 +1421,7 @@ public class RegionManagementDUnitTest extends ManagementTestBase {
       Notification rn =  notification;
       assertTrue(rn.getType().equals(JMXNotificationType.REGION_CREATED)
           || rn.getType().equals(JMXNotificationType.REGION_CLOSED));
-      getLogWriter().info(
+      LogWriterUtils.getLogWriter().info(
           "<ExpectedString> Member Level Notifications" + rn.toString()
               + "</ExpectedString> ");
     }
@@ -1441,7 +1440,7 @@ public class RegionManagementDUnitTest extends ManagementTestBase {
     public void handleNotification(Notification notification, Object handback) {
       assertNotNull(notification);
       Notification rn = notification;
-      getLogWriter().info(
+      LogWriterUtils.getLogWriter().info(
           "<ExpectedString> Distributed System Notifications" + rn.toString()
               + "</ExpectedString> ");
     }


Mime
View raw message