geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dschnei...@apache.org
Subject [16/61] [abbrv] [partial] incubator-geode git commit: GEODE-773: Extract static methods from DistributedTestCase
Date Thu, 11 Feb 2016 00:38:50 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/FunctionCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/FunctionCommandsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/FunctionCommandsDUnitTest.java
index 1698609..7378ada 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/FunctionCommandsDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/FunctionCommandsDUnitTest.java
@@ -31,11 +31,13 @@ import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
 import com.gemstone.gemfire.management.internal.cli.json.GfJsonException;
 import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
 import com.gemstone.gemfire.management.internal.cli.result.TabularResultData;
-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;
 
 import java.util.List;
 import java.util.Properties;
@@ -118,11 +120,11 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
       e.printStackTrace();
     }
     String command = "execute function --id=" + function.getId() + " --region=" + "/" + "RegionOne";
-    getLogWriter().info("testExecuteFunctionWithNoRegionOnManager command : " + command);
+    LogWriterUtils.getLogWriter().info("testExecuteFunctionWithNoRegionOnManager command : " + command);
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
-      getLogWriter().info("testExecuteFunctionWithNoRegionOnManager stringResult : " + strCmdResult);
+      LogWriterUtils.getLogWriter().info("testExecuteFunctionWithNoRegionOnManager stringResult : " + strCmdResult);
       assertEquals(Result.Status.OK, cmdResult.getStatus());
       assertTrue(strCmdResult.contains("Execution summary"));
     } else {
@@ -150,13 +152,13 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
     });
 
     String command = "execute function --id=" + function.getId() + " --region=" + REGION_NAME;
-    getLogWriter().info("testExecuteFunctionOnRegion command=" + command);
+    LogWriterUtils.getLogWriter().info("testExecuteFunctionOnRegion command=" + command);
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       assertEquals(Result.Status.OK, cmdResult.getStatus());
-      getLogWriter().info("testExecuteFunctionOnRegion cmdResult=" + cmdResult);
+      LogWriterUtils.getLogWriter().info("testExecuteFunctionOnRegion cmdResult=" + cmdResult);
       String stringResult = commandResultToString(cmdResult);
-      getLogWriter().info("testExecuteFunctionOnRegion stringResult=" + stringResult);
+      LogWriterUtils.getLogWriter().info("testExecuteFunctionOnRegion stringResult=" + stringResult);
       assert (stringResult.contains("Execution summary"));
     } else {
       fail("testExecuteFunctionOnRegion did not return CommandResult");
@@ -193,7 +195,7 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
           if (bean == null) {
             return false;
           } else {
-            getLogWriter().info("Probing for checkRegionMBeans testExecuteFunctionOnRegionBug51480 finished");
+            LogWriterUtils.getLogWriter().info("Probing for checkRegionMBeans testExecuteFunctionOnRegionBug51480 finished");
             return true;
           }
         }
@@ -203,7 +205,7 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
           return "Probing for testExecuteFunctionOnRegionBug51480";
         }
       };
-      DistributedTestCase.waitForCriterion(waitForMaangerMBean, 2 * 60 * 1000, 2000, true);
+      Wait.waitForCriterion(waitForMaangerMBean, 2 * 60 * 1000, 2000, true);
       DistributedRegionMXBean bean = ManagementService.getManagementService(getCache()).getDistributedRegionMXBean(
           Region.SEPARATOR + REGION_ONE);
       assertNotNull(bean);
@@ -226,13 +228,13 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
 
     String command = "execute function --id=" + function.getId() + " --region=" + REGION_ONE;
 
-    getLogWriter().info("testExecuteFunctionOnRegionBug51480 command=" + command);
+    LogWriterUtils.getLogWriter().info("testExecuteFunctionOnRegionBug51480 command=" + command);
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
-      getLogWriter().info("testExecuteFunctionOnRegionBug51480 cmdResult=" + cmdResult);
+      LogWriterUtils.getLogWriter().info("testExecuteFunctionOnRegionBug51480 cmdResult=" + cmdResult);
       assertEquals(Result.Status.OK, cmdResult.getStatus());
       String stringResult = commandResultToString(cmdResult);
-      getLogWriter().info("testExecuteFunctionOnRegionBug51480 stringResult=" + stringResult);
+      LogWriterUtils.getLogWriter().info("testExecuteFunctionOnRegionBug51480 stringResult=" + stringResult);
       assert (stringResult.contains("Execution summary"));
     } else {
       fail("testExecuteFunctionOnRegionBug51480 did not return CommandResult");
@@ -261,12 +263,12 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
     });
 
     String command = "execute function --id=" + function.getId() + " --member=" + vm1MemberId;
-    getLogWriter().info("testExecuteFunctionOnMember command=" + command);
+    LogWriterUtils.getLogWriter().info("testExecuteFunctionOnMember command=" + command);
     CommandResult cmdResult = executeCommand(command);
     assertEquals(Result.Status.OK, cmdResult.getStatus());
 
     String stringResult = commandResultToString(cmdResult);
-    getLogWriter().info("testExecuteFunctionOnMember stringResult:" + stringResult);
+    LogWriterUtils.getLogWriter().info("testExecuteFunctionOnMember stringResult:" + stringResult);
     assertTrue(stringResult.contains("Execution summary"));
   }
 
@@ -290,13 +292,13 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
       }
     });
     String command = "execute function --id=" + function.getId();
-    getLogWriter().info("testExecuteFunctionOnMembers command=" + command);
+    LogWriterUtils.getLogWriter().info("testExecuteFunctionOnMembers command=" + command);
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       assertEquals(Result.Status.OK, cmdResult.getStatus());
-      getLogWriter().info("testExecuteFunctionOnMembers cmdResult:" + cmdResult);
+      LogWriterUtils.getLogWriter().info("testExecuteFunctionOnMembers cmdResult:" + cmdResult);
       String stringResult = commandResultToString(cmdResult);
-      getLogWriter().info("testExecuteFunctionOnMembers stringResult:" + stringResult);
+      LogWriterUtils.getLogWriter().info("testExecuteFunctionOnMembers stringResult:" + stringResult);
       assertTrue(stringResult.contains("Execution summary"));
     } else {
       fail("testExecuteFunctionOnMembers did not return CommandResult");
@@ -324,13 +326,13 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
 
     String command = "execute function --id=" + function.getId() + " --arguments=arg1,arg2";
 
-    getLogWriter().info("testExecuteFunctionOnMembersWithArgs command=" + command);
+    LogWriterUtils.getLogWriter().info("testExecuteFunctionOnMembersWithArgs command=" + command);
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       assertEquals(Result.Status.OK, cmdResult.getStatus());
-      getLogWriter().info("testExecuteFunctionOnMembersWithArgs cmdResult:" + cmdResult);
+      LogWriterUtils.getLogWriter().info("testExecuteFunctionOnMembersWithArgs cmdResult:" + cmdResult);
       String stringResult = commandResultToString(cmdResult);
-      getLogWriter().info("testExecuteFunctionOnMembersWithArgs stringResult:" + stringResult);
+      LogWriterUtils.getLogWriter().info("testExecuteFunctionOnMembersWithArgs stringResult:" + stringResult);
       assertTrue(stringResult.contains("Execution summary"));
       assertTrue(stringResult.contains("arg1"));
     } else {
@@ -386,13 +388,13 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
     });
 
     String command = "execute function --id=" + TestFunction.TEST_FUNCTION1 + " --groups=Group1,Group2";
-    getLogWriter().info("testExecuteFunctionOnGroups command=" + command);
+    LogWriterUtils.getLogWriter().info("testExecuteFunctionOnGroups command=" + command);
     CommandResult cmdResult = executeCommand(command);
-    getLogWriter().info("testExecuteFunctionOnGroups cmdResult=" + cmdResult);
+    LogWriterUtils.getLogWriter().info("testExecuteFunctionOnGroups cmdResult=" + cmdResult);
     assertEquals(Result.Status.OK, cmdResult.getStatus());
     TabularResultData resultData = (TabularResultData) cmdResult.getResultData();
     List<String> members = resultData.retrieveAllValues("Member ID/Name");
-    getLogWriter().info("testExecuteFunctionOnGroups members=" + members);
+    LogWriterUtils.getLogWriter().info("testExecuteFunctionOnGroups members=" + members);
     assertTrue(members.size() == 2 && members.contains(vm1id) && members.contains(vm2id));
   }
 
@@ -404,12 +406,12 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
     final VM vm1 = Host.getHost(0).getVM(1);
     final String vm1MemberId = (String) vm1.invoke(FunctionCommandsDUnitTest.class, "getMemberId");
     String command = "destroy function --id=" + function.getId() + " --member=" + vm1MemberId;
-    getLogWriter().info("testDestroyOnMember command=" + command);
+    LogWriterUtils.getLogWriter().info("testDestroyOnMember command=" + command);
     CommandResult cmdResult = executeCommand(command);
     if (cmdResult != null) {
       String strCmdResult = commandResultToString(cmdResult);
       assertEquals(Result.Status.OK, cmdResult.getStatus());
-      getLogWriter().info("testDestroyOnMember strCmdResult=" + strCmdResult);
+      LogWriterUtils.getLogWriter().info("testDestroyOnMember strCmdResult=" + strCmdResult);
       assertTrue(strCmdResult.contains("Destroyed TestFunction1 Successfully"));
     } else {
       fail("testDestroyOnMember failed as did not get CommandResult");
@@ -462,14 +464,14 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
     });
 
     String command = "destroy function --id=" + TestFunction.TEST_FUNCTION1 + " --groups=Group1,Group2";
-    getLogWriter().info("testDestroyOnGroups command=" + command);
+    LogWriterUtils.getLogWriter().info("testDestroyOnGroups command=" + command);
     CommandResult cmdResult = executeCommand(command);
-    getLogWriter().info("testDestroyOnGroups cmdResult=" + cmdResult);
+    LogWriterUtils.getLogWriter().info("testDestroyOnGroups cmdResult=" + cmdResult);
     assertEquals(Result.Status.OK, cmdResult.getStatus());
     String content = null;
     try {
       content = cmdResult.getContent().get("message").toString();
-      getLogWriter().info("testDestroyOnGroups content = " + content);
+      LogWriterUtils.getLogWriter().info("testDestroyOnGroups content = " + content);
     } catch (GfJsonException e) {
       fail("testDestroyOnGroups exception=" + e);
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java
index 76f51de..d6719d1 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java
@@ -55,11 +55,15 @@ import com.gemstone.gemfire.management.internal.cli.result.CompositeResultData.S
 import com.gemstone.gemfire.management.internal.cli.result.ResultData;
 import com.gemstone.gemfire.management.internal.cli.result.TabularResultData;
 import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.Assert;
+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;
 
 import hydra.GsRandom;
 
@@ -140,29 +144,29 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
         RegionFactory regionFactory = cache.createRegionFactory(RegionShortcut.REPLICATE);
         Region dataRegion = regionFactory.create(DATA_REGION_NAME);
         assertNotNull(dataRegion);
-        getLogWriter().info("Created Region " + dataRegion);
+        LogWriterUtils.getLogWriter().info("Created Region " + dataRegion);
 
         dataRegion = dataRegion.createSubregion(DATA_REGION_NAME_CHILD_1, dataRegion.getAttributes());
         assertNotNull(dataRegion);
-        getLogWriter().info("Created Region " + dataRegion);
+        LogWriterUtils.getLogWriter().info("Created Region " + dataRegion);
 
         dataRegion = dataRegion.createSubregion(DATA_REGION_NAME_CHILD_1_2, dataRegion.getAttributes());
         assertNotNull(dataRegion);
-        getLogWriter().info("Created Region " + dataRegion);
+        LogWriterUtils.getLogWriter().info("Created Region " + dataRegion);
 
         dataRegion = regionFactory.create(DATA_REGION_NAME_VM1);
         assertNotNull(dataRegion);
-        getLogWriter().info("Created Region " + dataRegion);
+        LogWriterUtils.getLogWriter().info("Created Region " + dataRegion);
 
         PartitionAttributes partitionAttrs = new PartitionAttributesFactory().setRedundantCopies(2).create();
         RegionFactory<Object, Object> partitionRegionFactory = cache.createRegionFactory(RegionShortcut.PARTITION);
         partitionRegionFactory.setPartitionAttributes(partitionAttrs);
         Region dataParRegion = partitionRegionFactory.create(DATA_PAR_REGION_NAME);
         assertNotNull(dataParRegion);
-        getLogWriter().info("Created Region " + dataParRegion);
+        LogWriterUtils.getLogWriter().info("Created Region " + dataParRegion);
         dataParRegion = partitionRegionFactory.create(DATA_PAR_REGION_NAME_VM1);
         assertNotNull(dataParRegion);
-        getLogWriter().info("Created Region " + dataParRegion);
+        LogWriterUtils.getLogWriter().info("Created Region " + dataParRegion);
 
       }
     });
@@ -173,19 +177,19 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
         RegionFactory regionFactory = cache.createRegionFactory(RegionShortcut.REPLICATE);
         Region dataRegion = regionFactory.create(DATA_REGION_NAME);
         assertNotNull(dataRegion);
-        getLogWriter().info("Created Region " + dataRegion);
+        LogWriterUtils.getLogWriter().info("Created Region " + dataRegion);
 
         dataRegion = dataRegion.createSubregion(DATA_REGION_NAME_CHILD_1, dataRegion.getAttributes());
         assertNotNull(dataRegion);
-        getLogWriter().info("Created Region " + dataRegion);
+        LogWriterUtils.getLogWriter().info("Created Region " + dataRegion);
 
         dataRegion = dataRegion.createSubregion(DATA_REGION_NAME_CHILD_1_2, dataRegion.getAttributes());
         assertNotNull(dataRegion);
-        getLogWriter().info("Created Region " + dataRegion);
+        LogWriterUtils.getLogWriter().info("Created Region " + dataRegion);
 
         dataRegion = regionFactory.create(DATA_REGION_NAME_VM2);
         assertNotNull(dataRegion);
-        getLogWriter().info("Created Region " + dataRegion);
+        LogWriterUtils.getLogWriter().info("Created Region " + dataRegion);
 
 
         PartitionAttributes partitionAttrs = new PartitionAttributesFactory().setRedundantCopies(2).create();
@@ -193,18 +197,18 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
         partitionRegionFactory.setPartitionAttributes(partitionAttrs);
         Region dataParRegion = partitionRegionFactory.create(DATA_PAR_REGION_NAME);
         assertNotNull(dataParRegion);
-        getLogWriter().info("Created Region " + dataParRegion);
+        LogWriterUtils.getLogWriter().info("Created Region " + dataParRegion);
         dataParRegion = partitionRegionFactory.create(DATA_PAR_REGION_NAME_VM2);
         assertNotNull(dataParRegion);
-        getLogWriter().info("Created Region " + dataParRegion);
+        LogWriterUtils.getLogWriter().info("Created Region " + dataParRegion);
 
       }
     });
 
     final String vm1MemberId = (String) vm1.invoke(GemfireDataCommandsDUnitTest.class, "getMemberId");
     final String vm2MemberId = (String) vm2.invoke(GemfireDataCommandsDUnitTest.class, "getMemberId");
-    getLogWriter().info("Vm1 ID : " + vm1MemberId);
-    getLogWriter().info("Vm2 ID : " + vm2MemberId);
+    LogWriterUtils.getLogWriter().info("Vm1 ID : " + vm1MemberId);
+    LogWriterUtils.getLogWriter().info("Vm2 ID : " + vm2MemberId);
 
     final VM manager = Host.getHost(0).getVM(0);
 
@@ -220,10 +224,10 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
             ManagerMXBean bean1 = service.getManagerMXBean();
             DistributedRegionMXBean bean2 = service.getDistributedRegionMXBean(DATA_REGION_NAME_PATH);
             if (bean1 == null) {
-              getLogWriter().info("Still probing for ManagerMBean");
+              LogWriterUtils.getLogWriter().info("Still probing for ManagerMBean");
               return false;
             } else {
-              getLogWriter().info("Still probing for DistributedRegionMXBean=" + bean2);
+              LogWriterUtils.getLogWriter().info("Still probing for DistributedRegionMXBean=" + bean2);
               return (bean2 != null);
             }
           }
@@ -234,7 +238,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
           }
         };
 
-        DistributedTestCase.waitForCriterion(waitForMaangerMBean, 30000, 2000, true);
+        Wait.waitForCriterion(waitForMaangerMBean, 30000, 2000, true);
 
         assertNotNull(service.getMemberMXBean());
         assertNotNull(service.getManagerMXBean());
@@ -264,7 +268,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
             }
 
             if (!flag) {
-              getLogWriter().info(
+              LogWriterUtils.getLogWriter().info(
                   "Still probing for regionMbeans " + DATA_REGION_NAME_PATH + "=" + beans[0] + " " + DATA_REGION_NAME_VM1_PATH + "=" + beans[1] + " " + DATA_REGION_NAME_VM2_PATH + "=" + beans[2] + " " + DATA_PAR_REGION_NAME_PATH + "=" + beans[3] + " " + DATA_PAR_REGION_NAME_VM1_PATH + "=" + beans[4] + " " + DATA_PAR_REGION_NAME_VM2_PATH + "=" + beans[5] + " "
                   //+ DATA_REGION_NAME_CHILD_1_PATH
                   // +"="+ beans[6]  + " " + DATA_REGION_NAME_CHILD_1_2_PATH
@@ -272,7 +276,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
               );
               return false;
             } else {
-              getLogWriter().info(
+              LogWriterUtils.getLogWriter().info(
                   "Probing complete for regionMbeans " + DATA_REGION_NAME_PATH + "=" + beans[0] + " " + DATA_REGION_NAME_VM1_PATH + "=" + beans[1] + " " + DATA_REGION_NAME_VM2_PATH + "=" + beans[2] + " " + DATA_PAR_REGION_NAME_PATH + "=" + beans[3] + " " + DATA_PAR_REGION_NAME_VM1_PATH + "=" + beans[4] + " " + DATA_PAR_REGION_NAME_VM2_PATH + "=" + beans[5] + " "
                   //+ DATA_REGION_NAME_CHILD_1_PATH
                   // +"="+ beans[6]  + " " + DATA_REGION_NAME_CHILD_1_2_PATH
@@ -294,7 +298,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
           }
         };
 
-        DistributedTestCase.waitForCriterion(waitForRegionMBeans, 30000, 2000, true);
+        Wait.waitForCriterion(waitForRegionMBeans, 30000, 2000, true);
 
         String regions[] = {DATA_REGION_NAME_PATH, DATA_REGION_NAME_VM1_PATH, DATA_REGION_NAME_VM2_PATH, DATA_PAR_REGION_NAME_PATH, DATA_PAR_REGION_NAME_VM1_PATH, DATA_PAR_REGION_NAME_VM2_PATH, /*DATA_REGION_NAME_CHILD_1_PATH, DATA_REGION_NAME_CHILD_1_2_PATH*/};
 
@@ -302,7 +306,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
           bean = service.getDistributedRegionMXBean(region);
           assertNotNull(bean);
           String[] membersName = bean.getMembers();
-          getLogWriter().info(
+          LogWriterUtils.getLogWriter().info(
               "Members Array for region " + region + " : " + StringUtils.objectToString(membersName, true, 10));
           if (bean.getMemberCount() < 1) fail(
               "Even after waiting mbean reports number of member hosting region " + DATA_REGION_NAME_VM1_PATH + " is less than one");
@@ -367,7 +371,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
       query = query.replace("?" + i, r);
       i++;
     }
-    getLogWriter().info("Checking members for query : " + query);
+    LogWriterUtils.getLogWriter().info("Checking members for query : " + query);
     QCompiler compiler = new QCompiler();
     Set<String> regionsInQuery = null;
     try {
@@ -375,11 +379,11 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
       Set regionSet = new HashSet();
       compiledQuery.getRegionsInQuery(regionSet, null);//GFSH ENV VARIBLES
       regionsInQuery = Collections.unmodifiableSet(regionSet);
-      getLogWriter().info("Region in query : " + regionsInQuery);
+      LogWriterUtils.getLogWriter().info("Region in query : " + regionsInQuery);
       if (regionsInQuery.size() > 0) {
         Set<DistributedMember> members = DataCommands.getQueryRegionsAssociatedMembers(regionsInQuery, cache,
             returnAll);
-        getLogWriter().info("Members for Region in query : " + members);
+        LogWriterUtils.getLogWriter().info("Members for Region in query : " + members);
         if (expectedMembers != -1) {
           assertNotNull(members);
           assertEquals(expectedMembers, members.size());
@@ -388,7 +392,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
         assertEquals(-1, expectedMembers);//Regions do not exist at all
       }
     } catch (QueryInvalidException qe) {
-      fail("Invalid Query", qe);
+      Assert.fail("Invalid Query", qe);
     }
   }
 
@@ -451,7 +455,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
         MemberMXBean member = service.getMemberMXBean();
         String cmdResult = member.processCommand(query);
         assertNotNull(cmdResult);
-        getLogWriter().info("Text Command Output : " + cmdResult);
+        LogWriterUtils.getLogWriter().info("Text Command Output : " + cmdResult);
       }
     });
   }
@@ -503,7 +507,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
     CommandResult cmdResult = executeCommand(query);
     printCommandOutput(cmdResult);
     validateSelectResult(cmdResult, true, -1, null);
-    ExpectedException ex = addExpectedException(QueryInvalidException.class.getSimpleName(), Host.getHost(0).getVM(0));
+    IgnoredException ex = IgnoredException.addIgnoredException(QueryInvalidException.class.getSimpleName(), Host.getHost(0).getVM(0));
     try {
       query = "query --query=\"select ID , status , createTime , pk, floatMinValue from ${DATA_REGION2} where ID <= ${PORTFOLIO_ID2}" + " and status='${STATUS2}'" + "\" --interactive=false";
       cmdResult = executeCommand(query);
@@ -548,15 +552,15 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
     Double doubleKey = Double.valueOf("12432.235425");
     Double doubleValue = Double.valueOf("111111.111111");
 
-    getLogWriter().info("Testing Byte Wrappers");
+    LogWriterUtils.getLogWriter().info("Testing Byte Wrappers");
     testGetPutLocateEntryFromShellAndGemfire(byteKey, byteValue, Byte.class, true, true);
-    getLogWriter().info("Testing Short Wrappers");
+    LogWriterUtils.getLogWriter().info("Testing Short Wrappers");
     testGetPutLocateEntryFromShellAndGemfire(shortKey, shortValue, Short.class, true, true);
-    getLogWriter().info("Testing Integer Wrappers");
+    LogWriterUtils.getLogWriter().info("Testing Integer Wrappers");
     testGetPutLocateEntryFromShellAndGemfire(integerKey, integerValue, Integer.class, true, true);
-    getLogWriter().info("Testing Float Wrappers");
+    LogWriterUtils.getLogWriter().info("Testing Float Wrappers");
     testGetPutLocateEntryFromShellAndGemfire(floatKey, flaotValue, Float.class, true, true);
-    getLogWriter().info("Testing Double Wrappers");
+    LogWriterUtils.getLogWriter().info("Testing Double Wrappers");
     testGetPutLocateEntryFromShellAndGemfire(doubleKey, doubleValue, Double.class, true, true);
   }
 
@@ -758,7 +762,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
     try {
       for (String col : expectedCols) {
         boolean found = false;
-        getLogWriter().info("Validating column " + col);
+        LogWriterUtils.getLogWriter().info("Validating column " + col);
         for (int i = 0; i < array.size(); i++) {
           String header = (String) array.get(i);
           if (col.equals(header)) found = true;
@@ -766,7 +770,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
         assertEquals(true, found);
       }
     } catch (GfJsonException e) {
-      fail("Error accessing table data", e);
+      Assert.fail("Error accessing table data", e);
     }
   }
 
@@ -779,7 +783,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
     try {
       for (String col : expectedCols) {
         boolean found = false;
-        getLogWriter().info("Validating column " + col);
+        LogWriterUtils.getLogWriter().info("Validating column " + col);
         for (int i = 0; i < array.size(); i++) {
           String header = (String) array.get(i);
           if (col.equals(header)) found = true;
@@ -793,7 +797,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
 
       }
     } catch (GfJsonException e) {
-      fail("Error accessing table data", e);
+      Assert.fail("Error accessing table data", e);
     }
   }
 
@@ -813,7 +817,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
             assertEquals(cols.length, array.size());
             for (String col : cols) {
               boolean found = false;
-              getLogWriter().info("Validating column " + col);
+              LogWriterUtils.getLogWriter().info("Validating column " + col);
               for (int i = 0; i < array.size(); i++) {
                 String header = (String) array.get(i);
                 if (col.equals(header)) found = true;
@@ -821,7 +825,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
               assertEquals(true, found);
             }
           } catch (GfJsonException e) {
-            fail("Error accessing table data", e);
+            Assert.fail("Error accessing table data", e);
           }
         }
       }
@@ -1275,7 +1279,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
       String valueJson = valueTemplate.replaceAll("\\?1", population);
       valueJson = valueJson.replaceAll("\\?2", area);
       valueJson = valueJson.replaceAll("\\?", keyString);
-      getLogWriter().info("Getting key with json key : " + keyJson);
+      LogWriterUtils.getLogWriter().info("Getting key with json key : " + keyJson);
       command = command + " " + "--key=" + keyJson + " --region=" + DATA_REGION_NAME_PATH + " --key-class=" + Key1.class.getCanonicalName();
       command = command + " --value-class=" + Value2.class.getCanonicalName();
       CommandResult cmdResult = executeCommand(command);
@@ -1304,7 +1308,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
       String valueJson = valueTemplate.replaceAll("\\?1", population);
       valueJson = valueJson.replaceAll("\\?2", area);
       valueJson = valueJson.replaceAll("\\?", keyString);
-      getLogWriter().info("Getting key with json key : " + keyJson);
+      LogWriterUtils.getLogWriter().info("Getting key with json key : " + keyJson);
       command = command + " " + "--key=" + keyJson + " --region=" + DATA_REGION_NAME_PATH + " --key-class=" + Key1.class.getCanonicalName();
       command = command + " --value-class=" + Value2.class.getCanonicalName();
       CommandResult cmdResult = executeCommand(command);
@@ -1341,8 +1345,8 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
       String valueJson = valueTemplate.replaceAll("\\?1", population);
       valueJson = valueJson.replaceAll("\\?2", area);
       valueJson = valueJson.replaceAll("\\?", keyString);
-      getLogWriter().info("Putting key with json key : " + keyJson);
-      getLogWriter().info("Putting key with json valye : " + valueJson);
+      LogWriterUtils.getLogWriter().info("Putting key with json key : " + keyJson);
+      LogWriterUtils.getLogWriter().info("Putting key with json valye : " + valueJson);
       command = command + " " + "--key=" + keyJson + " --value=" + valueJson + " --region=" + DATA_REGION_NAME_PATH;
       command = command + " --key-class=" + Key1.class.getCanonicalName() + " --value-class=" + Value2.class.getCanonicalName();
       ;
@@ -1370,8 +1374,8 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
       valueJson = valueJson.replaceAll("\\?set", set);
       valueJson = valueJson.replaceAll("\\?map", map);
 
-      getLogWriter().info("Putting key with json key : " + keyJson);
-      getLogWriter().info("Putting key with json valye : " + valueJson);
+      LogWriterUtils.getLogWriter().info("Putting key with json key : " + keyJson);
+      LogWriterUtils.getLogWriter().info("Putting key with json valye : " + valueJson);
       command = command + " " + "--key=" + keyJson + " --value=" + valueJson + " --region=" + DATA_REGION_NAME_PATH;
       command = command + " --key-class=" + Key1.class.getCanonicalName() + " --value-class=" + Car.class.getCanonicalName();
       ;
@@ -1481,7 +1485,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
       String command = "remove";
       String keyString = keyPrefix + i;
       String keyJson = keyTemplate.replaceAll("\\?", keyString);
-      getLogWriter().info("Removing key with json key : " + keyJson);
+      LogWriterUtils.getLogWriter().info("Removing key with json key : " + keyJson);
       command = command + " " + "--key=" + keyJson + " --region=" + DATA_REGION_NAME_PATH + " --key-class=" + Key1.class.getCanonicalName();
       CommandResult cmdResult = executeCommand(command);
       printCommandOutput(cmdResult);
@@ -1562,8 +1566,8 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
       CommandResult cmdResult = executeCommand(commandString);
       String resultAsString = commandResultToString(cmdResult);
       assertEquals(Result.Status.OK, cmdResult.getStatus());
-      getLogWriter().info("Command Output");
-      getLogWriter().info(resultAsString);
+      LogWriterUtils.getLogWriter().info("Command Output");
+      LogWriterUtils.getLogWriter().info(resultAsString);
 
       vm1.invoke(new SerializableRunnable() {
         public void run() {
@@ -1586,8 +1590,8 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
       cmdResult = executeCommand(commandString);
       resultAsString = commandResultToString(cmdResult);
 
-      getLogWriter().info("Result of import data");
-      getLogWriter().info(resultAsString);
+      LogWriterUtils.getLogWriter().info("Result of import data");
+      LogWriterUtils.getLogWriter().info(resultAsString);
       assertEquals(Result.Status.OK, cmdResult.getStatus());
 
       /**
@@ -1612,8 +1616,8 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
 
       cmdResult = executeCommand(commandString);
       resultAsString = commandResultToString(cmdResult);
-      getLogWriter().info("Result of import data with wrong region name");
-      getLogWriter().info(resultAsString);
+      LogWriterUtils.getLogWriter().info("Result of import data with wrong region name");
+      LogWriterUtils.getLogWriter().info(resultAsString);
       assertEquals(Result.Status.ERROR, cmdResult.getStatus());
 
       csb = new CommandStringBuilder(CliStrings.IMPORT_DATA);
@@ -1624,8 +1628,8 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
 
       cmdResult = executeCommand(commandString);
       resultAsString = commandResultToString(cmdResult);
-      getLogWriter().info("Result of import data with wrong file");
-      getLogWriter().info(resultAsString);
+      LogWriterUtils.getLogWriter().info("Result of import data with wrong file");
+      LogWriterUtils.getLogWriter().info(resultAsString);
       assertEquals(Result.Status.ERROR, cmdResult.getStatus());
 
     } finally {
@@ -1685,7 +1689,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
           final DistributedRegionMXBean bean = service.getDistributedRegionMXBean(
               Region.SEPARATOR + REBALANCE_REGION_NAME);
           if (bean == null) {
-            getLogWriter().info("Still probing for checkRegionMBeans ManagerMBean");
+            LogWriterUtils.getLogWriter().info("Still probing for checkRegionMBeans ManagerMBean");
             return false;
           } else {
             // verify that bean is proper before executing tests
@@ -1702,7 +1706,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
           return "Probing for testRebalanceCommandForSimulateWithNoMember ManagerMBean";
         }
       };
-      DistributedTestCase.waitForCriterion(waitForMaangerMBean, 2 * 60 * 1000, 2000, true);
+      Wait.waitForCriterion(waitForMaangerMBean, 2 * 60 * 1000, 2000, true);
       DistributedRegionMXBean bean = ManagementService.getManagementService(getCache()).getDistributedRegionMXBean(
           "/" + REBALANCE_REGION_NAME);
       assertNotNull(bean);
@@ -1715,13 +1719,13 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
     //check if DistributedRegionMXBean is available so that command will not fail
     final VM manager = Host.getHost(0).getVM(0);
     manager.invoke(checkRegionMBeans);
-    getLogWriter().info("testRebalanceCommandForTimeOut verified Mbean and executin command");
+    LogWriterUtils.getLogWriter().info("testRebalanceCommandForTimeOut verified Mbean and executin command");
     String command = "rebalance --time-out=1";
     CommandResult cmdResult = executeCommand(command);
-    getLogWriter().info("testRebalanceCommandForTimeOut just after executing " + cmdResult);
+    LogWriterUtils.getLogWriter().info("testRebalanceCommandForTimeOut just after executing " + cmdResult);
     if (cmdResult != null) {
       String stringResult = commandResultToString(cmdResult);
-      getLogWriter().info("testRebalanceCommandForTimeOut stringResult : " + stringResult);
+      LogWriterUtils.getLogWriter().info("testRebalanceCommandForTimeOut stringResult : " + stringResult);
       assertEquals(Result.Status.OK, cmdResult.getStatus());
     } else {
       fail("testRebalanceCommandForTimeOut failed as did not get CommandResult");
@@ -1735,16 +1739,16 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
     final VM manager = Host.getHost(0).getVM(0);
     manager.invoke(checkRegionMBeans);
 
-    getLogWriter().info("testRebalanceCommandForTimeOutForRegion verified Mbean and executin command");
+    LogWriterUtils.getLogWriter().info("testRebalanceCommandForTimeOutForRegion verified Mbean and executin command");
 
     String command = "rebalance --time-out=1 --include-region=" + "/" + REBALANCE_REGION_NAME;
     CommandResult cmdResult = executeCommand(command);
 
-    getLogWriter().info("testRebalanceCommandForTimeOutForRegion just after executing " + cmdResult);
+    LogWriterUtils.getLogWriter().info("testRebalanceCommandForTimeOutForRegion just after executing " + cmdResult);
 
     if (cmdResult != null) {
       String stringResult = commandResultToString(cmdResult);
-      getLogWriter().info("testRebalanceCommandForTimeOutForRegion stringResult : " + stringResult);
+      LogWriterUtils.getLogWriter().info("testRebalanceCommandForTimeOutForRegion stringResult : " + stringResult);
       assertEquals(Result.Status.OK, cmdResult.getStatus());
     } else {
       fail("testRebalanceCommandForTimeOut failed as did not get CommandResult");
@@ -1758,13 +1762,13 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
     final VM manager = Host.getHost(0).getVM(0);
     manager.invoke(checkRegionMBeans);
 
-    getLogWriter().info("testRebalanceCommandForSimulate verified Mbean and executin command");
+    LogWriterUtils.getLogWriter().info("testRebalanceCommandForSimulate verified Mbean and executin command");
     String command = "rebalance --simulate=true --include-region=" + "/" + REBALANCE_REGION_NAME;
     CommandResult cmdResult = executeCommand(command);
-    getLogWriter().info("testRebalanceCommandForSimulate just after executing " + cmdResult);
+    LogWriterUtils.getLogWriter().info("testRebalanceCommandForSimulate just after executing " + cmdResult);
     if (cmdResult != null) {
       String stringResult = commandResultToString(cmdResult);
-      getLogWriter().info("testRebalanceCommandForSimulate stringResult : " + stringResult);
+      LogWriterUtils.getLogWriter().info("testRebalanceCommandForSimulate stringResult : " + stringResult);
       assertEquals(Result.Status.OK, cmdResult.getStatus());
     } else {
       fail("testRebalanceCommandForSimulate failed as did not get CommandResult");
@@ -1778,16 +1782,16 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
     final VM manager = Host.getHost(0).getVM(0);
     manager.invoke(checkRegionMBeans);
 
-    getLogWriter().info("testRebalanceCommandForSimulateWithNoMember verified Mbean and executin command");
+    LogWriterUtils.getLogWriter().info("testRebalanceCommandForSimulateWithNoMember verified Mbean and executin command");
 
     String command = "rebalance --simulate=true";
     CommandResult cmdResult = executeCommand(command);
 
-    getLogWriter().info("testRebalanceCommandForSimulateWithNoMember just after executing " + cmdResult);
+    LogWriterUtils.getLogWriter().info("testRebalanceCommandForSimulateWithNoMember just after executing " + cmdResult);
 
     if (cmdResult != null) {
       String stringResult = commandResultToString(cmdResult);
-      getLogWriter().info("testRebalanceCommandForSimulateWithNoMember stringResult : " + stringResult);
+      LogWriterUtils.getLogWriter().info("testRebalanceCommandForSimulateWithNoMember stringResult : " + stringResult);
       assertEquals(Result.Status.OK, cmdResult.getStatus());
     } else {
       fail("testRebalanceCommandForSimulateWithNoMember failed as did not get CommandResult");
@@ -1801,13 +1805,13 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
     //check if DistributedRegionMXBean is available so that command will not fail
     final VM manager = Host.getHost(0).getVM(0);
     manager.invoke(checkRegionMBeans);
-    getLogWriter().info("testRebalanceForIncludeRegionFunction verified Mbean and executin command");
+    LogWriterUtils.getLogWriter().info("testRebalanceForIncludeRegionFunction verified Mbean and executin command");
     String command = "rebalance --include-region=" + "/" + REBALANCE_REGION_NAME + ",/" + REBALANCE_REGION2_NAME;
     CommandResult cmdResult = executeCommand(command);
-    getLogWriter().info("testRebalanceForIncludeRegionFunction just after executing " + cmdResult);
+    LogWriterUtils.getLogWriter().info("testRebalanceForIncludeRegionFunction just after executing " + cmdResult);
     if (cmdResult != null) {
       String stringResult = commandResultToString(cmdResult);
-      getLogWriter().info("testRebalanceForIncludeRegionFunction stringResult : " + stringResult);
+      LogWriterUtils.getLogWriter().info("testRebalanceForIncludeRegionFunction stringResult : " + stringResult);
       assertEquals(Result.Status.OK, cmdResult.getStatus());
     } else {
       fail("testRebalanceForIncludeRegionFunction failed as did not get CommandResult");
@@ -1820,17 +1824,17 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
     final VM manager = Host.getHost(0).getVM(0);
     manager.invoke(checkRegionMBeans);
 
-    getLogWriter().info("testSimulateForEntireDS verified Mbean and executin command");
+    LogWriterUtils.getLogWriter().info("testSimulateForEntireDS verified Mbean and executin command");
 
     String command = "rebalance --simulate=true";
 
     CommandResult cmdResult = executeCommand(command);
 
-    getLogWriter().info("testSimulateForEntireDS just after executing " + cmdResult);
+    LogWriterUtils.getLogWriter().info("testSimulateForEntireDS just after executing " + cmdResult);
 
     if (cmdResult != null) {
       String stringResult = commandResultToString(cmdResult);
-      getLogWriter().info("testSimulateForEntireDS stringResult : " + stringResult);
+      LogWriterUtils.getLogWriter().info("testSimulateForEntireDS stringResult : " + stringResult);
       assertEquals(Result.Status.OK, cmdResult.getStatus());
     } else {
       fail("testRebalanceForIncludeRegionFunction failed as did not get CommandResult");
@@ -1842,13 +1846,13 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
     //check if DistributedRegionMXBean is available so that command will not fail
     final VM manager = Host.getHost(0).getVM(0);
     manager.invoke(checkRegionMBeans);
-    getLogWriter().info("testRebalanceForEntireDS verified Mbean and executin command");
+    LogWriterUtils.getLogWriter().info("testRebalanceForEntireDS verified Mbean and executin command");
     String command = "rebalance";
     CommandResult cmdResult = executeCommand(command);
-    getLogWriter().info("testRebalanceForEntireDS just after executing " + cmdResult);
+    LogWriterUtils.getLogWriter().info("testRebalanceForEntireDS just after executing " + cmdResult);
     if (cmdResult != null) {
       String stringResult = commandResultToString(cmdResult);
-      getLogWriter().info("testRebalanceForEntireDS stringResult : " + stringResult);
+      LogWriterUtils.getLogWriter().info("testRebalanceForEntireDS stringResult : " + stringResult);
       assertEquals(Result.Status.OK, cmdResult.getStatus());
     } else {
       fail("testRebalanceForIncludeRegionFunction failed as did not get CommandResult");
@@ -1899,14 +1903,14 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
 
   private static void printCommandOutput(CommandResult cmdResult) {
     assertNotNull(cmdResult);
-    getLogWriter().info("Command Output : ");
+    LogWriterUtils.getLogWriter().info("Command Output : ");
     StringBuilder sb = new StringBuilder();
     cmdResult.resetToFirstLine();
     while (cmdResult.hasNextLine()) {
       sb.append(cmdResult.nextLine()).append(DataCommandRequest.NEW_LINE);
     }
-    getLogWriter().info(sb.toString());
-    getLogWriter().info("");
+    LogWriterUtils.getLogWriter().info(sb.toString());
+    LogWriterUtils.getLogWriter().info("");
   }
 
   public static class Value1WithValue2 extends Value1 {
@@ -1933,15 +1937,15 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
     final VM manager = Host.getHost(0).getVM(0);
     manager.invoke(checkRegionMBeans);
 
-    getLogWriter().info("testRebalanceForExcludeRegionFunction verified Mbean and executing command");
+    LogWriterUtils.getLogWriter().info("testRebalanceForExcludeRegionFunction verified Mbean and executing command");
 
     String command = "rebalance --exclude-region=" + "/" + REBALANCE_REGION2_NAME;
-    getLogWriter().info("testRebalanceForExcludeRegionFunction command : " + command);
+    LogWriterUtils.getLogWriter().info("testRebalanceForExcludeRegionFunction command : " + command);
     CommandResult cmdResult = executeCommand(command);
-    getLogWriter().info("testRebalanceForExcludeRegionFunction just after executing " + cmdResult);
+    LogWriterUtils.getLogWriter().info("testRebalanceForExcludeRegionFunction just after executing " + cmdResult);
     if (cmdResult != null) {
       String stringResult = commandResultToString(cmdResult);
-      getLogWriter().info("testRebalanceForExcludeRegionFunction stringResult : " + stringResult);
+      LogWriterUtils.getLogWriter().info("testRebalanceForExcludeRegionFunction stringResult : " + stringResult);
       assertEquals(Result.Status.OK, cmdResult.getStatus());
     } else {
       fail("testRebalanceForIncludeRegionFunction failed as did not get CommandResult");
@@ -1964,19 +1968,19 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
             ManagerMXBean bean1 = service.getManagerMXBean();
             DistributedRegionMXBean bean2 = service.getDistributedRegionMXBean(regionName);
             if (bean1 == null) {
-              getLogWriter().info("waitForListClientMbean Still probing for ManagerMBean");
+              LogWriterUtils.getLogWriter().info("waitForListClientMbean Still probing for ManagerMBean");
               return false;
             } else {
-              getLogWriter().info("waitForListClientMbean Still probing for DistributedRegionMXBean=" + bean2);
+              LogWriterUtils.getLogWriter().info("waitForListClientMbean Still probing for DistributedRegionMXBean=" + bean2);
               if (bean2 == null) {
                 bean2 = service.getDistributedRegionMXBean(Region.SEPARATOR + regionName);
               }
               if (bean2 == null) {
-                getLogWriter().info(
+                LogWriterUtils.getLogWriter().info(
                     "waitForListClientMbean Still probing for DistributedRegionMXBean with separator = " + bean2);
                 return false;
               } else {
-                getLogWriter().info(
+                LogWriterUtils.getLogWriter().info(
                     "waitForListClientMbean Still probing for DistributedRegionMXBean with separator Not null  " + bean2.getMembers().length);
                 if (bean2.getMembers().length > 1) {
                   return true;
@@ -1993,7 +1997,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
           }
         };
 
-        DistributedTestCase.waitForCriterion(waitForMaangerMBean, 30000, 2000, true);
+        Wait.waitForCriterion(waitForMaangerMBean, 30000, 2000, true);
         DistributedRegionMXBean bean = service.getDistributedRegionMXBean(regionName);
         if (bean == null) {
           bean = service.getDistributedRegionMXBean(Region.SEPARATOR + regionName);
@@ -2029,7 +2033,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
       }
     });
 
-    getLogWriter().info("testRegionsViaMbeanAndFunctions memSizeFromMbean= " + memSizeFromMbean);
+    LogWriterUtils.getLogWriter().info("testRegionsViaMbeanAndFunctions memSizeFromMbean= " + memSizeFromMbean);
 
     String memSizeFromFunctionCall = (String) manager.invoke(new SerializableCallable() {
       public Object call() {
@@ -2039,7 +2043,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
       }
     });
 
-    getLogWriter().info("testRegionsViaMbeanAndFunctions memSizeFromFunctionCall= " + memSizeFromFunctionCall);
+    LogWriterUtils.getLogWriter().info("testRegionsViaMbeanAndFunctions memSizeFromFunctionCall= " + memSizeFromFunctionCall);
     assertTrue(memSizeFromFunctionCall.equals(memSizeFromMbean));
   }
 
@@ -2068,7 +2072,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
       }
     });
 
-    getLogWriter().info("testRegionsViaMbeanAndFunctionsForPartRgn memSizeFromMbean= " + memSizeFromMbean);
+    LogWriterUtils.getLogWriter().info("testRegionsViaMbeanAndFunctionsForPartRgn memSizeFromMbean= " + memSizeFromMbean);
 
     String memSizeFromFunctionCall = (String) manager.invoke(new SerializableCallable() {
       public Object call() {
@@ -2077,12 +2081,8 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
       }
     });
 
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "testRegionsViaMbeanAndFunctionsForPartRgn memSizeFromFunctionCall= " + memSizeFromFunctionCall);
     assertTrue(memSizeFromFunctionCall.equals(memSizeFromMbean));
   }
-
-  public void tearDown2() throws Exception {
-    super.tearDown2();
-  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest.java
index f092196..7f161fe 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest.java
@@ -39,11 +39,13 @@ import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
 import com.gemstone.gemfire.management.internal.cli.result.CompositeResultData;
 import com.gemstone.gemfire.management.internal.cli.result.ResultData;
 import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
-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.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.SerializableRunnableIF;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 /**
  * The GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest class is test suite of test cases testing the Gfsh
@@ -172,7 +174,7 @@ public class GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest extends C
           }
         };
 
-        DistributedTestCase.waitForCriterion(waitOnManagerCriterion, 30000, 2000, true);
+        Wait.waitForCriterion(waitOnManagerCriterion, 30000, 2000, true);
       }
     });
   }
@@ -195,7 +197,7 @@ public class GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest extends C
 
   protected void log(final String tag, final String message) {
     //System.out.printf("%1$s (%2$s)%n", tag, message);
-    getLogWriter().info(String.format("%1$s (%2$s)%n", tag, message));
+    LogWriterUtils.getLogWriter().info(String.format("%1$s (%2$s)%n", tag, message));
   }
 
   protected CommandResult runCommand(final String command) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsDUnitTest.java
index 99ba73d..431c6b3 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsDUnitTest.java
@@ -35,11 +35,14 @@ import com.gemstone.gemfire.management.internal.cli.domain.Stock;
 import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
 import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
 import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
-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.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 java.io.File;
 import java.io.IOException;
@@ -604,7 +607,7 @@ public class IndexCommandsDUnitTest extends CliCommandTestBase {
           final InternalLocator locator = (InternalLocator) Locator.startLocatorAndDS(locatorPort, locatorLogFile, null,
               locatorProps);
 
-          DistributedTestCase.WaitCriterion wc = new DistributedTestCase.WaitCriterion() {
+          WaitCriterion wc = new WaitCriterion() {
             @Override
             public boolean done() {
               return locator.isSharedConfigurationRunning();
@@ -615,7 +618,7 @@ public class IndexCommandsDUnitTest extends CliCommandTestBase {
               return "Waiting for shared configuration to be started";
             }
           };
-          DistributedTestCase.waitForCriterion(wc, 5000, 500, true);
+          Wait.waitForCriterion(wc, 5000, 500, true);
         } catch (IOException ioex) {
           fail("Unable to create a locator with a shared configuration");
         }
@@ -664,7 +667,7 @@ public class IndexCommandsDUnitTest extends CliCommandTestBase {
           xmlFromConfig = sharedConfig.getConfiguration(groupName).getCacheXmlContent();
           assertTrue(xmlFromConfig.contains(indexName));
         } catch (Exception e) {
-          fail("Error occurred in cluster configuration service", e);
+          Assert.fail("Error occurred in cluster configuration service", e);
         }
       }
     });
@@ -709,7 +712,7 @@ public class IndexCommandsDUnitTest extends CliCommandTestBase {
           xmlFromConfig = sharedConfig.getConfiguration(groupName).getCacheXmlContent();
           assertFalse(xmlFromConfig.contains(indexName));
         } catch (Exception e) {
-          fail("Error occurred in cluster configuration service", e);
+          Assert.fail("Error occurred in cluster configuration service", e);
         }
       }
     });
@@ -738,8 +741,8 @@ public class IndexCommandsDUnitTest extends CliCommandTestBase {
   }
 
   private void writeToLog(String text, String resultAsString) {
-    getLogWriter().info(testName + "\n");
-    getLogWriter().info(resultAsString);
+    LogWriterUtils.getLogWriter().info(getTestMethodName() + "\n");
+    LogWriterUtils.getLogWriter().info(resultAsString);
   }
 
   private void setupSystem() {
@@ -809,9 +812,4 @@ public class IndexCommandsDUnitTest extends CliCommandTestBase {
       }
     });
   }
-
-  @Override
-  public void tearDown2() throws Exception {
-    super.tearDown2();
-  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeDiskStoreCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeDiskStoreCommandsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeDiskStoreCommandsDUnitTest.java
index acb7759..386b8ed 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeDiskStoreCommandsDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeDiskStoreCommandsDUnitTest.java
@@ -29,6 +29,7 @@ import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.management.cli.Result;
 import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.SerializableRunnableIF;
 import com.gemstone.gemfire.test.dunit.VM;
@@ -68,11 +69,6 @@ public class ListAndDescribeDiskStoreCommandsDUnitTest extends CliCommandTestBas
     setupGemFire();
   }
 
-  @Override
-  public void tearDown2() throws Exception {
-    super.tearDown2();
-  }
-
   protected Peer createPeer(final Properties distributedSystemConfiguration, final VM vm) {
     return new Peer(distributedSystemConfiguration, vm);
   }
@@ -95,7 +91,7 @@ public class ListAndDescribeDiskStoreCommandsDUnitTest extends CliCommandTestBas
   protected Properties createDistributedSystemProperties(final String gemfireName) {
     final Properties distributedSystemProperties = new Properties();
 
-    distributedSystemProperties.setProperty(DistributionConfig.LOG_LEVEL_NAME, getDUnitLogLevel());
+    distributedSystemProperties.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
     distributedSystemProperties.setProperty(DistributionConfig.NAME_NAME, gemfireName);
 
     return distributedSystemProperties;
@@ -131,7 +127,7 @@ public class ListAndDescribeDiskStoreCommandsDUnitTest extends CliCommandTestBas
     final Result result = executeCommand(CliStrings.LIST_DISK_STORE);
 
     assertNotNull(result);
-    getLogWriter().info(toString(result));
+    LogWriterUtils.getLogWriter().info(toString(result));
     assertEquals(Result.Status.OK, result.getStatus());
   }
 
@@ -140,7 +136,7 @@ public class ListAndDescribeDiskStoreCommandsDUnitTest extends CliCommandTestBas
         CliStrings.DESCRIBE_DISK_STORE + " --member=producerServer --name=producerData");
 
     assertNotNull(result);
-    getLogWriter().info(toString(result));
+    LogWriterUtils.getLogWriter().info(toString(result));
     assertEquals(Result.Status.OK, result.getStatus());
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java
index a81a085..2d11491 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java
@@ -35,6 +35,7 @@ import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
 import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
 import com.gemstone.gemfire.management.internal.cli.util.RegionAttributesNames;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
 
@@ -192,8 +193,8 @@ public class ListAndDescribeRegionDUnitTest extends CliCommandTestBase {
     String commandString = csb.toString();
     CommandResult commandResult = executeCommand(commandString);
     String commandResultAsString = commandResultToString(commandResult);
-    getLogWriter().info("Command String : " + commandString);
-    getLogWriter().info("Output : \n" + commandResultAsString);
+    LogWriterUtils.getLogWriter().info("Command String : " + commandString);
+    LogWriterUtils.getLogWriter().info("Output : \n" + commandResultAsString);
     assertEquals(Status.OK, commandResult.getStatus());
     assertTrue(commandResultAsString.contains(PR1));
     assertTrue(commandResultAsString.contains(LOCALREGIONONMANAGER));
@@ -207,8 +208,8 @@ public class ListAndDescribeRegionDUnitTest extends CliCommandTestBase {
     commandString = csb.toString();
     commandResult = executeCommand(commandString);
     commandResultAsString = commandResultToString(commandResult);
-    getLogWriter().info("Command String : " + commandString);
-    getLogWriter().info("Output : \n" + commandResultAsString);
+    LogWriterUtils.getLogWriter().info("Command String : " + commandString);
+    LogWriterUtils.getLogWriter().info("Output : \n" + commandResultAsString);
     assertEquals(Status.OK, commandResult.getStatus());
     assertTrue(commandResultAsString.contains(PR1));
     assertTrue(commandResultAsString.contains(LOCALREGIONONMANAGER));
@@ -218,8 +219,8 @@ public class ListAndDescribeRegionDUnitTest extends CliCommandTestBase {
     commandString = csb.toString();
     commandResult = executeCommand(commandString);
     commandResultAsString = commandResultToString(commandResult);
-    getLogWriter().info("Command String : " + commandString);
-    getLogWriter().info("Output : \n" + commandResultAsString);
+    LogWriterUtils.getLogWriter().info("Command String : " + commandString);
+    LogWriterUtils.getLogWriter().info("Output : \n" + commandResultAsString);
     assertEquals(Status.OK, commandResult.getStatus());
     assertTrue(commandResultAsString.contains(PR1));
     assertTrue(commandResultAsString.contains(REGION1));
@@ -232,8 +233,8 @@ public class ListAndDescribeRegionDUnitTest extends CliCommandTestBase {
     commandString = csb.toString();
     commandResult = executeCommand(commandString);
     commandResultAsString = commandResultToString(commandResult);
-    getLogWriter().info("Command String : " + commandString);
-    getLogWriter().info("Output : \n" + commandResultAsString);
+    LogWriterUtils.getLogWriter().info("Command String : " + commandString);
+    LogWriterUtils.getLogWriter().info("Output : \n" + commandResultAsString);
     assertEquals(Status.OK, commandResult.getStatus());
     assertTrue(commandResultAsString.contains(PR1));
     assertTrue(commandResultAsString.contains(LOCALREGIONONMANAGER));
@@ -243,8 +244,8 @@ public class ListAndDescribeRegionDUnitTest extends CliCommandTestBase {
     commandString = csb.toString();
     commandResult = executeCommand(commandString);
     commandResultAsString = commandResultToString(commandResult);
-    getLogWriter().info("Command String : " + commandString);
-    getLogWriter().info("Output : \n" + commandResultAsString);
+    LogWriterUtils.getLogWriter().info("Command String : " + commandString);
+    LogWriterUtils.getLogWriter().info("Output : \n" + commandResultAsString);
     assertEquals(Status.OK, commandResult.getStatus());
     assertTrue(commandResultAsString.contains(PR1));
     assertTrue(commandResultAsString.contains(REGION1));
@@ -260,8 +261,8 @@ public class ListAndDescribeRegionDUnitTest extends CliCommandTestBase {
     String commandString = csb.toString();
     CommandResult commandResult = executeCommand(commandString);
     String commandResultAsString = commandResultToString(commandResult);
-    getLogWriter().info("Command String : " + commandString);
-    getLogWriter().info("Output : \n" + commandResultAsString);
+    LogWriterUtils.getLogWriter().info("Command String : " + commandString);
+    LogWriterUtils.getLogWriter().info("Output : \n" + commandResultAsString);
     assertEquals(Status.OK, commandResult.getStatus());
     assertTrue(commandResultAsString.contains(PR1));
     assertTrue(commandResultAsString.contains("Server1"));
@@ -271,8 +272,8 @@ public class ListAndDescribeRegionDUnitTest extends CliCommandTestBase {
     commandString = csb.toString();
     commandResult = executeCommand(commandString);
     commandResultAsString = commandResultToString(commandResult);
-    getLogWriter().info("Command String : " + commandString);
-    getLogWriter().info("Output : \n" + commandResultAsString);
+    LogWriterUtils.getLogWriter().info("Command String : " + commandString);
+    LogWriterUtils.getLogWriter().info("Output : \n" + commandResultAsString);
     assertEquals(Status.OK, commandResult.getStatus());
     assertTrue(commandResultAsString.contains(LOCALREGIONONMANAGER));
     assertTrue(commandResultAsString.contains("Manager"));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListIndexCommandDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListIndexCommandDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListIndexCommandDUnitTest.java
index 399e89c..b7c42dc 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListIndexCommandDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListIndexCommandDUnitTest.java
@@ -45,6 +45,7 @@ import com.gemstone.gemfire.management.cli.Result;
 import com.gemstone.gemfire.management.internal.cli.domain.IndexDetails;
 import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.SerializableRunnableIF;
 import com.gemstone.gemfire.test.dunit.VM;
@@ -90,11 +91,6 @@ public class ListIndexCommandDUnitTest extends CliCommandTestBase {
     setupGemFire();
   }
 
-  @Override
-  public void tearDown2() throws Exception {
-    super.tearDown2();
-  }
-
   protected Index createIndex(final String name, final String indexedExpression, final String fromClause) {
     return createIndex(name, IndexType.FUNCTIONAL, indexedExpression, fromClause);
   }
@@ -142,7 +138,7 @@ public class ListIndexCommandDUnitTest extends CliCommandTestBase {
   protected Properties createDistributedSystemProperties(final String gemfireName) {
     final Properties distributedSystemProperties = new Properties();
 
-    distributedSystemProperties.setProperty(DistributionConfig.LOG_LEVEL_NAME, getDUnitLogLevel());
+    distributedSystemProperties.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
     distributedSystemProperties.setProperty(DistributionConfig.NAME_NAME, gemfireName);
 
     return distributedSystemProperties;
@@ -180,7 +176,7 @@ public class ListIndexCommandDUnitTest extends CliCommandTestBase {
               }
             }
           } catch (Exception e) {
-            getLogWriter().error(
+            LogWriterUtils.getLogWriter().error(
                 String.format("Error occurred creating Index (%1$s) on Region (%2$s) - (%3$s)", indexName,
                     region.getFullPath(), e.getMessage()));
           }
@@ -282,11 +278,11 @@ public class ListIndexCommandDUnitTest extends CliCommandTestBase {
   @SuppressWarnings("unchecked")
   protected <T extends Comparable<T>, B extends AbstractBean<T>> B query(final Cache cache, final String queryString) {
     try {
-      getLogWriter().info(String.format("Running Query (%1$s) in GemFire...", queryString));
+      LogWriterUtils.getLogWriter().info(String.format("Running Query (%1$s) in GemFire...", queryString));
 
       final SelectResults<B> results = (SelectResults<B>) cache.getQueryService().newQuery(queryString).execute();
 
-      getLogWriter().info(
+      LogWriterUtils.getLogWriter().info(
           String.format("Running Query (%1$s) in GemFire returned (%2$d) result(s).", queryString, results.size()));
 
       return (results.iterator().hasNext() ? results.iterator().next() : null);
@@ -298,12 +294,12 @@ public class ListIndexCommandDUnitTest extends CliCommandTestBase {
   protected <T extends Comparable<T>, B extends AbstractBean<T>> B query(final Region<T, B> region,
       final String queryPredicate) {
     try {
-      getLogWriter().info(
+      LogWriterUtils.getLogWriter().info(
           String.format("Running Query (%1$s) on Region (%2$s)...", queryPredicate, region.getFullPath()));
 
       final SelectResults<B> results = region.query(queryPredicate);
 
-      getLogWriter().info(
+      LogWriterUtils.getLogWriter().info(
           String.format("Running Query (%1$s) on Region (%2$s) returned (%3$d) result(s).", queryPredicate,
               region.getFullPath(), results.size()));
 
@@ -319,7 +315,7 @@ public class ListIndexCommandDUnitTest extends CliCommandTestBase {
     final Result result = executeCommand(CliStrings.LIST_INDEX + " --" + CliStrings.LIST_INDEX__STATS);
 
     assertNotNull(result);
-    getLogWriter().info(toString(result));
+    LogWriterUtils.getLogWriter().info(toString(result));
     assertEquals(Result.Status.OK, result.getStatus());
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MemberCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MemberCommandsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MemberCommandsDUnitTest.java
index a000053..7d6efc5 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MemberCommandsDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MemberCommandsDUnitTest.java
@@ -39,6 +39,8 @@ import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
 import com.gemstone.gemfire.management.internal.cli.remote.CommandProcessor;
 import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
 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.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
 
@@ -79,8 +81,7 @@ public class MemberCommandsDUnitTest extends CacheTestCase {
   }
 
   @Override
-  public void tearDown2() throws Exception {
-    super.tearDown2();
+  protected final void postTearDownCacheTestCase() throws Exception {
     disconnectFromDS();
     CliUtil.isGfshVM = true;
   }
@@ -180,7 +181,7 @@ public class MemberCommandsDUnitTest extends CacheTestCase {
     Properties props = new Properties();
 
     props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
-    props.setProperty(DistributionConfig.LOCATORS_NAME, getServerHostName(host) + "[" + locatorPort + "]");
+    props.setProperty(DistributionConfig.LOCATORS_NAME, NetworkUtils.getServerHostName(host) + "[" + locatorPort + "]");
     props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info");
     props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
     props.setProperty(DistributionConfig.ENABLE_TIME_STATISTICS_NAME, "true");
@@ -207,7 +208,7 @@ public class MemberCommandsDUnitTest extends CacheTestCase {
     setupSystem();
     CommandProcessor commandProcessor = new CommandProcessor();
     Result result = commandProcessor.createCommandStatement(CliStrings.LIST_MEMBER, EMPTY_ENV).process();
-    getLogWriter().info("#SB" + getResultAsString(result));
+    LogWriterUtils.getLogWriter().info("#SB" + getResultAsString(result));
     assertEquals(true, result.getStatus().equals(Status.OK));
   }
 
@@ -230,7 +231,7 @@ public class MemberCommandsDUnitTest extends CacheTestCase {
       CommandProcessor commandProcessor = new CommandProcessor();
       Result result = commandProcessor.createCommandStatement(CliStrings.LIST_MEMBER, EMPTY_ENV).process();
 
-      getLogWriter().info("#SB" + getResultAsString(result));
+      LogWriterUtils.getLogWriter().info("#SB" + getResultAsString(result));
       assertEquals(true, result.getStatus().equals(Status.ERROR));
     } finally {
       locator.stop(); // fix for bug 46562
@@ -249,7 +250,7 @@ public class MemberCommandsDUnitTest extends CacheTestCase {
     CommandStringBuilder csb = new CommandStringBuilder(CliStrings.LIST_MEMBER);
     csb.addOption(CliStrings.LIST_MEMBER__GROUP, "G1");
     Result result = commandProcessor.createCommandStatement(csb.toString(), EMPTY_ENV).process();
-    getLogWriter().info("#SB" + getResultAsString(result));
+    LogWriterUtils.getLogWriter().info("#SB" + getResultAsString(result));
     assertEquals(true, result.getStatus().equals(Status.OK));
   }
 
@@ -272,7 +273,7 @@ public class MemberCommandsDUnitTest extends CacheTestCase {
       Result result = commandProcessor.createCommandStatement("describe member --name=" + member.getId(),
           EMPTY_ENV).process();
       assertEquals(true, result.getStatus().equals(Status.OK));
-      getLogWriter().info("#SB" + getResultAsString(result));
+      LogWriterUtils.getLogWriter().info("#SB" + getResultAsString(result));
       //assertEquals(true, result.getStatus().equals(Status.OK));
     }
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsDUnitTest.java
index c449a18..841c960 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsDUnitTest.java
@@ -33,9 +33,14 @@ import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
 import com.gemstone.gemfire.management.internal.cli.result.CompositeResultData;
 import com.gemstone.gemfire.management.internal.cli.result.CompositeResultData.SectionResultData;
 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.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.management.internal.cli.result.ResultBuilder;
 import com.gemstone.gemfire.management.internal.cli.result.ResultData;
 import com.gemstone.gemfire.management.internal.cli.result.TabularResultData;
@@ -61,8 +66,8 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
   }
 
   @Override
-  public void tearDown2() throws Exception {
-    invokeInEveryVM(new SerializableRunnable("reset log level") {
+  protected final void preTearDownCliCommandTestBase() throws Exception {
+    Invoke.invokeInEveryVM(new SerializableRunnable("reset log level") {
       public void run() {
         if (cachedLogLevel != null) {
           System.setProperty("gemfire.log-level", cachedLogLevel);
@@ -82,7 +87,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
     cmdResult.resetToFirstLine();
     if (cmdResult != null) {
       String cmdResultStr = commandResultToString(cmdResult);
-      getLogWriter().info("testGCForGroup cmdResultStr=" + cmdResultStr + "; cmdResult=" + cmdResult);
+      LogWriterUtils.getLogWriter().info("testGCForGroup cmdResultStr=" + cmdResultStr + "; cmdResult=" + cmdResult);
       assertEquals(Result.Status.OK, cmdResult.getStatus());
       if (cmdResult.getType().equals(ResultData.TYPE_TABULAR)) {
         TabularResultData table = (TabularResultData) cmdResult.getResultData();
@@ -110,7 +115,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
     cmdResult.resetToFirstLine();
     if (cmdResult != null) {
       String cmdResultStr = commandResultToString(cmdResult);
-      getLogWriter().info("testGCForMemberID cmdResultStr=" + cmdResultStr);
+      LogWriterUtils.getLogWriter().info("testGCForMemberID cmdResultStr=" + cmdResultStr);
       assertEquals(Result.Status.OK, cmdResult.getStatus());
       if (cmdResult.getType().equals(ResultData.TYPE_TABULAR)) {
         TabularResultData table = (TabularResultData) cmdResult.getResultData();
@@ -136,7 +141,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
       if (cmdResult != null) {
         String log = commandResultToString(cmdResult);
         assertNotNull(log);
-        getLogWriter().info("Show Log is" + log);
+        LogWriterUtils.getLogWriter().info("Show Log is" + log);
         assertEquals(Result.Status.OK, cmdResult.getStatus());
       } else {
         fail("testShowLog failed as did not get CommandResult");
@@ -158,7 +163,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
       if (cmdResult != null) {
         String log = commandResultToString(cmdResult);
         assertNotNull(log);
-        getLogWriter().info("Show Log is" + log);
+        LogWriterUtils.getLogWriter().info("Show Log is" + log);
         assertEquals(Result.Status.OK, cmdResult.getStatus());
       } else {
         fail("testShowLog failed as did not get CommandResult");
@@ -175,7 +180,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
     cmdResult.resetToFirstLine();
     if (cmdResult != null) {
       String cmdResultStr = commandResultToString(cmdResult);
-      getLogWriter().info("testGCForEntireCluster cmdResultStr=" + cmdResultStr + "; cmdResult=" + cmdResult);
+      LogWriterUtils.getLogWriter().info("testGCForEntireCluster cmdResultStr=" + cmdResultStr + "; cmdResult=" + cmdResult);
       assertEquals(Result.Status.OK, cmdResult.getStatus());
       if (cmdResult.getType().equals(ResultData.TYPE_TABULAR)) {
         TabularResultData table = (TabularResultData) cmdResult.getResultData();
@@ -222,7 +227,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
 
   public void testShutDownWithoutTimeout() {
 
-    addExpectedException("EntryDestroyedException");
+    IgnoredException.addIgnoredException("EntryDestroyedException");
 
     setupForShutDown();
     ThreadUtils.sleep(2500);
@@ -232,7 +237,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
 
     if (cmdResult != null) {
       String cmdResultStr = commandResultToString(cmdResult);
-      getLogWriter().info("testShutDownWithoutTimeout cmdResultStr=" + cmdResultStr);
+      LogWriterUtils.getLogWriter().info("testShutDownWithoutTimeout cmdResultStr=" + cmdResultStr);
     }
 
     verifyShutDown();
@@ -241,7 +246,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
 
     // Need for the Gfsh HTTP enablement during shutdown to properly assess the
     // state of the connection.
-    waitForCriterion(new WaitCriterion() {
+    Wait.waitForCriterion(new WaitCriterion() {
       public boolean done() {
         return !defaultShell.isConnectedAndReady();
       }
@@ -259,14 +264,14 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
     setupForShutDown();
     ThreadUtils.sleep(2500);
 
-    addExpectedException("EntryDestroyedException");
+    IgnoredException.addIgnoredException("EntryDestroyedException");
 
     String command = "shutdown --time-out=15";
     CommandResult cmdResult = executeCommand(command);
 
     if (cmdResult != null) {
       String cmdResultStr = commandResultToString(cmdResult);
-      getLogWriter().info("testShutDownWithTIMEOUT cmdResultStr=" + cmdResultStr);
+      LogWriterUtils.getLogWriter().info("testShutDownWithTIMEOUT cmdResultStr=" + cmdResultStr);
     }
 
     verifyShutDown();
@@ -274,7 +279,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
     final HeadlessGfsh defaultShell = getDefaultShell();
 
     // Need for the Gfsh HTTP enablement during shutdown to properly assess the state of the connection.
-    waitForCriterion(new WaitCriterion() {
+    Wait.waitForCriterion(new WaitCriterion() {
       public boolean done() {
         return !defaultShell.isConnectedAndReady();
       }
@@ -303,7 +308,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
 
     if (cmdResult != null) {
       String cmdResultStr = commandResultToString(cmdResult);
-      getLogWriter().info("testShutDownForTIMEOUT cmdResultStr = " + cmdResultStr);
+      LogWriterUtils.getLogWriter().info("testShutDownForTIMEOUT cmdResultStr = " + cmdResultStr);
       CommandResult result = (CommandResult) ResultBuilder.createInfoResult(CliStrings.SHUTDOWN_TIMEDOUT);
       String expectedResult = commandResultToString(result);
       assertEquals(expectedResult, cmdResultStr);
@@ -383,7 +388,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
         return "Wait for gfsh to get disconnected from Manager.";
       }
     };
-    waitForCriterion(waitCriterion, 5000, 200, true);
+    Wait.waitForCriterion(waitCriterion, 5000, 200, true);
 
     assertTrue(Boolean.FALSE.equals(vm1.invoke(connectedChecker)));
     assertTrue(Boolean.FALSE.equals(vm0.invoke(connectedChecker)));
@@ -414,7 +419,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
     String commandString = CliStrings.CHANGE_LOGLEVEL + " --" + CliStrings.CHANGE_LOGLEVEL__LOGLEVEL + "=finer" + " --" + CliStrings.CHANGE_LOGLEVEL__MEMBER + "=" + serverName1 + "," + serverName2;
 
     CommandResult commandResult = executeCommand(commandString);
-    getLogWriter().info("testChangeLogLevel commandResult=" + commandResult);
+    LogWriterUtils.getLogWriter().info("testChangeLogLevel commandResult=" + commandResult);
     assertTrue(Status.OK.equals(commandResult.getStatus()));
     CompositeResultData resultData = (CompositeResultData) commandResult.getResultData();
     SectionResultData section = resultData.retrieveSection("section");
@@ -470,7 +475,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
     String commandString = CliStrings.CHANGE_LOGLEVEL + " --" + CliStrings.CHANGE_LOGLEVEL__LOGLEVEL + "=finer" + " --" + CliStrings.CHANGE_LOGLEVEL__GROUPS + "=" + grp1 + "," + grp2;
 
     CommandResult commandResult = executeCommand(commandString);
-    getLogWriter().info("testChangeLogLevelForGrps commandResult=" + commandResult);
+    LogWriterUtils.getLogWriter().info("testChangeLogLevelForGrps commandResult=" + commandResult);
 
     assertTrue(Status.OK.equals(commandResult.getStatus()));
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart1DUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart1DUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart1DUnitTest.java
index 1bd8999..c8928fa 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart1DUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart1DUnitTest.java
@@ -25,6 +25,7 @@ import com.gemstone.gemfire.internal.logging.LogWriterImpl;
 import com.gemstone.gemfire.management.cli.Result;
 import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
 
@@ -95,11 +96,11 @@ public class MiscellaneousCommandsExportLogsPart1DUnitTest extends CliCommandTes
     Result cmdResult = misc.exportLogsPreprocessing("./testExportLogs" + dir, null, null, logLevel, false, false, start,
         end, 1);
 
-    getLogWriter().info("testExportLogs command result =" + cmdResult);
+    LogWriterUtils.getLogWriter().info("testExportLogs command result =" + cmdResult);
 
     if (cmdResult != null) {
       String cmdStringRsult = commandResultToString((CommandResult) cmdResult);
-      getLogWriter().info("testExportLogs cmdStringRsult=" + cmdStringRsult);
+      LogWriterUtils.getLogWriter().info("testExportLogs cmdStringRsult=" + cmdStringRsult);
       assertEquals(Result.Status.OK, cmdResult.getStatus());
     } else {
       fail("testExportLogs failed as did not get CommandResult");
@@ -124,11 +125,11 @@ public class MiscellaneousCommandsExportLogsPart1DUnitTest extends CliCommandTes
 
     Result cmdResult = misc.exportLogsPreprocessing("./testExportLogsForMerge" + dir, null, null, logLevel, false, true,
         start, end, 1);
-    getLogWriter().info("testExportLogsForMerge command=" + cmdResult);
+    LogWriterUtils.getLogWriter().info("testExportLogsForMerge command=" + cmdResult);
 
     if (cmdResult != null) {
       String cmdStringRsult = commandResultToString((CommandResult) cmdResult);
-      getLogWriter().info("testExportLogsForMerge cmdStringRsult=" + cmdStringRsult);
+      LogWriterUtils.getLogWriter().info("testExportLogsForMerge cmdStringRsult=" + cmdStringRsult);
 
       assertEquals(Result.Status.OK, cmdResult.getStatus());
     } else {


Mime
View raw message