geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dschnei...@apache.org
Subject [04/61] [abbrv] [partial] incubator-geode git commit: GEODE-773: Extract static methods from DistributedTestCase
Date Thu, 11 Feb 2016 00:38:38 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ClientCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ClientCommandsDUnitTest.java b/gemfire-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ClientCommandsDUnitTest.java
index d1d9559..c77ab2b 100644
--- a/gemfire-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ClientCommandsDUnitTest.java
+++ b/gemfire-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ClientCommandsDUnitTest.java
@@ -63,11 +63,14 @@ 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.result.CompositeResultData;
 import com.gemstone.gemfire.management.internal.cli.result.CompositeResultData.SectionResultData;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.NetworkUtils;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 import com.gemstone.gemfire.management.internal.cli.result.TabularResultData;
 
 
@@ -140,7 +143,7 @@ public void waitForListClientMbean(){
             return "waitForListClientMbean Probing ...";
           }
         };
-        DistributedTestCase.waitForCriterion(waitForMaangerMBean, 2 * 60 * 1000, 2000, true);
+        Wait.waitForCriterion(waitForMaangerMBean, 2 * 60 * 1000, 2000, true);
       }
     }); 
     
@@ -189,7 +192,7 @@ public void waitForListClientMbean2(){
           return "waitForListClientMbean2 Probing ...";
         }
       };
-      DistributedTestCase.waitForCriterion(waitForMaangerMBean, 2 * 60 * 1000, 2000, true);
+      Wait.waitForCriterion(waitForMaangerMBean, 2 * 60 * 1000, 2000, true);
     }
   }); 
   
@@ -249,7 +252,7 @@ public void waitForListClientMbean2(){
             return "waitForMbean Probing for ";
           }
         };
-        DistributedTestCase.waitForCriterion(waitForMaangerMBean, 2 * 60 * 1000, 2000, true);
+        Wait.waitForCriterion(waitForMaangerMBean, 2 * 60 * 1000, 2000, true);
       }
     }); 
     
@@ -301,7 +304,7 @@ public void waitForListClientMbean2(){
             return "waitForListClientMbean3 Probing ...";
           }
         };
-        DistributedTestCase.waitForCriterion(waitForMaangerMBean, 2 * 60 * 1000, 2000, true);
+        Wait.waitForCriterion(waitForMaangerMBean, 2 * 60 * 1000, 2000, true);
       }
     }); 
     
@@ -981,7 +984,7 @@ public void verifyClientStats(CommandResult commandResultForClient, String serve
           getSystem(props);
           
           final ClientCacheFactory ccf = new ClientCacheFactory(props);
-          ccf.addPoolServer(getServerHostName(server.getHost()), port);
+          ccf.addPoolServer(NetworkUtils.getServerHostName(server.getHost()), port);
           ccf.setPoolSubscriptionEnabled(true);
           ccf.setPoolPingInterval(1);
           ccf.setPoolStatisticInterval(1);
@@ -1001,7 +1004,7 @@ public void verifyClientStats(CommandResult commandResultForClient, String serve
         }else{
           String poolName = "new_pool_" + System.currentTimeMillis();
           try{                      
-            PoolImpl p = (PoolImpl) PoolManager.createFactory().addServer(getServerHostName(server.getHost()), port)
+            PoolImpl p = (PoolImpl) PoolManager.createFactory().addServer(NetworkUtils.getServerHostName(server.getHost()), port)
               .setThreadLocalConnections(true)
               .setMinConnections(1)
               .setSubscriptionEnabled(true)
@@ -1054,7 +1057,7 @@ public void verifyClientStats(CommandResult commandResultForClient, String serve
 
   protected Properties getServerProperties() {
     Properties p = new Properties();
-    p.setProperty(DistributionConfig.LOCATORS_NAME, "localhost["+getDUnitLocatorPort()+"]");
+    p.setProperty(DistributionConfig.LOCATORS_NAME, "localhost["+DistributedTestUtils.getDUnitLocatorPort()+"]");
     return p;
   }
   
@@ -1098,7 +1101,7 @@ public void waitForNonSubCliMBean(){
             return "waitForNonSubScribedClientMBean Probing for ";
           }
         };
-        DistributedTestCase.waitForCriterion(waitForMaangerMBean, 5* 60 * 1000, 2000, true);
+        Wait.waitForCriterion(waitForMaangerMBean, 5* 60 * 1000, 2000, true);
       }
     }); 
     
@@ -1146,7 +1149,7 @@ public void waitForMixedClients(){
             return "waitForMixedClients Probing for ";
           }
         };
-        DistributedTestCase.waitForCriterion(waitForMaangerMBean, 5* 60 * 1000, 2000, true);
+        Wait.waitForCriterion(waitForMaangerMBean, 5* 60 * 1000, 2000, true);
       }
     }); 
     
@@ -1394,7 +1397,7 @@ private void setUpNonSubscribedClient() throws Exception {
           getSystem(props);
           
           final ClientCacheFactory ccf = new ClientCacheFactory(props);
-          ccf.addPoolServer(getServerHostName(server.getHost()), port);
+          ccf.addPoolServer(NetworkUtils.getServerHostName(server.getHost()), port);
           ccf.setPoolSubscriptionEnabled(false);
           ccf.setPoolPingInterval(1);
           ccf.setPoolStatisticInterval(1);
@@ -1414,7 +1417,7 @@ private void setUpNonSubscribedClient() throws Exception {
         }else{
           String poolName = "new_pool_" + System.currentTimeMillis();
           try{                      
-            PoolImpl p = (PoolImpl) PoolManager.createFactory().addServer(getServerHostName(server.getHost()), port)
+            PoolImpl p = (PoolImpl) PoolManager.createFactory().addServer(NetworkUtils.getServerHostName(server.getHost()), port)
               .setThreadLocalConnections(true)
               .setMinConnections(1)
               .setSubscriptionEnabled(false)
@@ -1433,8 +1436,8 @@ private void setUpNonSubscribedClient() throws Exception {
     });
   }
   
-  public void tearDown2() throws Exception {
-    super.tearDown2();
+  @Override
+  protected final void postTearDownCacheTestCase() throws Exception {
     Host.getHost(0).getVM(0).invoke(CacheServerTestUtil.class, "closeCache");
     Host.getHost(0).getVM(1).invoke(CacheServerTestUtil.class, "closeCache");
     Host.getHost(0).getVM(2).invoke(CacheServerTestUtil.class, "closeCache");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DurableClientCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DurableClientCommandsDUnitTest.java b/gemfire-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DurableClientCommandsDUnitTest.java
index 89c7d5e..d8e65d9 100644
--- a/gemfire-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DurableClientCommandsDUnitTest.java
+++ b/gemfire-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DurableClientCommandsDUnitTest.java
@@ -44,7 +44,10 @@ import com.gemstone.gemfire.management.cli.Result.Status;
 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.DistributedTestUtils;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
+import com.gemstone.gemfire.test.dunit.NetworkUtils;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.VM;
 
@@ -247,7 +250,7 @@ public class DurableClientCommandsDUnitTest extends CliCommandTestBase {
   }
   
   private void writeToLog(String text, String resultAsString) {
-    getLogWriter().info(getUniqueName() + ": " + text + "\n" + resultAsString);
+    LogWriterUtils.getLogWriter().info(getUniqueName() + ": " + text + "\n" + resultAsString);
   }
   
   private void setupSystem() throws Exception {
@@ -357,7 +360,7 @@ public class DurableClientCommandsDUnitTest extends CliCommandTestBase {
         getSystem(props);
         
         final ClientCacheFactory ccf = new ClientCacheFactory(props);
-        ccf.addPoolServer(getServerHostName(server.getHost()), port);
+        ccf.addPoolServer(NetworkUtils.getServerHostName(server.getHost()), port);
         ccf.setPoolSubscriptionEnabled(true);
         
         ClientCache cache = (ClientCache)getClientCache(ccf);
@@ -420,12 +423,12 @@ public class DurableClientCommandsDUnitTest extends CliCommandTestBase {
 
   protected Properties getServerProperties() {
     Properties p = new Properties();
-    p.setProperty(DistributionConfig.LOCATORS_NAME, "localhost["+getDUnitLocatorPort()+"]");
+    p.setProperty(DistributionConfig.LOCATORS_NAME, "localhost["+DistributedTestUtils.getDUnitLocatorPort()+"]");
     return p;
   }
   
-  public void tearDown2() throws Exception {
-    super.tearDown2();
+  @Override
+  protected final void postTearDownCacheTestCase() throws Exception {
     Host.getHost(0).getVM(0).invoke(CacheServerTestUtil.class, "closeCache");
     Host.getHost(0).getVM(1).invoke(CacheServerTestUtil.class, "closeCache");
     Host.getHost(0).getVM(2).invoke(CacheServerTestUtil.class, "closeCache");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-cq/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestCQDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-cq/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestCQDUnitTest.java b/gemfire-cq/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestCQDUnitTest.java
index 131cbcd..4ba48df 100644
--- a/gemfire-cq/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestCQDUnitTest.java
+++ b/gemfire-cq/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestCQDUnitTest.java
@@ -21,7 +21,11 @@ import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.management.DistributedSystemMXBean;
 import com.gemstone.gemfire.management.ManagementService;
 import com.gemstone.gemfire.management.ManagementTestBase;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
+import com.gemstone.gemfire.test.dunit.NetworkUtils;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 /**
  * This is for testing continuous query.
@@ -47,10 +51,6 @@ public class TestCQDUnitTest extends ManagementTestBase {
 
   }
 
-  public void tearDown2() throws Exception {
-    super.tearDown2();
-  }
-
   public static long getNumOfCQ() {
     
     final WaitCriterion waitCriteria = new WaitCriterion() {
@@ -71,7 +71,7 @@ public class TestCQDUnitTest extends ManagementTestBase {
         return "wait for getNumOfCQ to complete and get results";
       }
     };
-    waitForCriterion(waitCriteria, 2 * 60 * 1000, 3000, true);    
+    Wait.waitForCriterion(waitCriteria, 2 * 60 * 1000, 3000, true);    
     final DistributedSystemMXBean bean = getManagementService().getDistributedSystemMXBean();
     assertNotNull(bean);
     return bean.getActiveCQCount();
@@ -79,12 +79,12 @@ public class TestCQDUnitTest extends ManagementTestBase {
 
   public void testNumOfCQ() throws Exception {
     initManagement(false);
-    getLogWriter().info("started testNumOfCQ");
+    LogWriterUtils.getLogWriter().info("started testNumOfCQ");
 
     VM server = managedNodeList.get(1);
     VM client = managedNodeList.get(2);    
     
-    final String host0 = getServerHostName(server.getHost());
+    final String host0 = NetworkUtils.getServerHostName(server.getHost());
 
     int serverPort = AvailablePortHelper.getRandomAvailableTCPPort();
     cqDUnitTest.createServer(server, serverPort);
@@ -128,7 +128,7 @@ public class TestCQDUnitTest extends ManagementTestBase {
     long numOfCQ = ((Number) managingNode.invoke(TestCQDUnitTest.class,
         "getNumOfCQ")).intValue();
 
-    getLogWriter().info("testNumOfCQ numOfCQ= " + numOfCQ);
+    LogWriterUtils.getLogWriter().info("testNumOfCQ numOfCQ= " + numOfCQ);
 
     cqDUnitTest.closeClient(client);
     cqDUnitTest.closeServer(server);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-cq/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestClientsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-cq/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestClientsDUnitTest.java b/gemfire-cq/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestClientsDUnitTest.java
index 814e07e..1659731 100644
--- a/gemfire-cq/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestClientsDUnitTest.java
+++ b/gemfire-cq/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestClientsDUnitTest.java
@@ -21,7 +21,11 @@ import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.management.DistributedSystemMXBean;
 import com.gemstone.gemfire.management.ManagementService;
 import com.gemstone.gemfire.management.ManagementTestBase;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
+import com.gemstone.gemfire.test.dunit.NetworkUtils;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 /**
  * This is for testing Number of clients and can be extended for relevant test
@@ -44,10 +48,6 @@ public class TestClientsDUnitTest extends ManagementTestBase {
 
   }
 
-  public void tearDown2() throws Exception {
-    super.tearDown2();
-  }
-
   public static Integer getNumOfClients() {
     final WaitCriterion waitCriteria = new WaitCriterion() {
       @Override
@@ -69,7 +69,7 @@ public class TestClientsDUnitTest extends ManagementTestBase {
       }
     };
 
-    waitForCriterion(waitCriteria, 2 * 60 * 1000, 3000, true);
+    Wait.waitForCriterion(waitCriteria, 2 * 60 * 1000, 3000, true);
     final DistributedSystemMXBean bean = getManagementService()
         .getDistributedSystemMXBean();
     assertNotNull(bean);
@@ -87,11 +87,11 @@ public class TestClientsDUnitTest extends ManagementTestBase {
     cqDUnitTest.createServer(server, serverPort);
     final int port = server.invokeInt(CqQueryDUnitTest.class,
         "getCacheServerPort");
-    final String host0 = getServerHostName(server.getHost());
+    final String host0 = NetworkUtils.getServerHostName(server.getHost());
     cqDUnitTest.createClient(client, port, host0);
     Integer numOfClients = (Integer) managingNode.invoke(
         TestClientsDUnitTest.class, "getNumOfClients");
-    getLogWriter().info("testNumOfClients numOfClients = " + numOfClients);
+    LogWriterUtils.getLogWriter().info("testNumOfClients numOfClients = " + numOfClients);
     cqDUnitTest.closeClient(client);
     cqDUnitTest.closeServer(server);
     assertEquals(1, numOfClients.intValue());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-cq/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestServerDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-cq/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestServerDUnitTest.java b/gemfire-cq/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestServerDUnitTest.java
index 6475fa5..8fa29a7 100644
--- a/gemfire-cq/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestServerDUnitTest.java
+++ b/gemfire-cq/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestServerDUnitTest.java
@@ -21,7 +21,10 @@ import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.management.DistributedSystemMXBean;
 import com.gemstone.gemfire.management.ManagementService;
 import com.gemstone.gemfire.management.ManagementTestBase;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 /**
  * This is for testing server count details from MBean
@@ -42,10 +45,6 @@ public class TestServerDUnitTest extends ManagementTestBase {
 
   }
 
-  public void tearDown2() throws Exception {
-    super.tearDown2();
-  }
-
   public static int getNumOfServersFromMBean() {
    
    final WaitCriterion waitCriteria = new WaitCriterion() {
@@ -66,7 +65,7 @@ public class TestServerDUnitTest extends ManagementTestBase {
       }
     };
 
-    waitForCriterion(waitCriteria, 2 * 60 * 1000, 3000, true);    
+    Wait.waitForCriterion(waitCriteria, 2 * 60 * 1000, 3000, true);    
     final DistributedSystemMXBean bean = getManagementService().getDistributedSystemMXBean();
     assertNotNull(bean);
     return bean.listCacheServers().length;
@@ -83,7 +82,7 @@ public class TestServerDUnitTest extends ManagementTestBase {
     cqDUnitTest.createServer(server, serverPort);    
     int serverCount = ((Number) managingNode.invoke(TestServerDUnitTest.class,
         "getNumOfServersFromMBean")).intValue();
-    getLogWriter().info("TestServerDUnitTest serverCount =" + serverCount);
+    LogWriterUtils.getLogWriter().info("TestServerDUnitTest serverCount =" + serverCount);
     cqDUnitTest.closeServer(server);
     assertEquals(1, serverCount);
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-cq/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTwoDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-cq/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTwoDUnitTest.java b/gemfire-cq/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTwoDUnitTest.java
index 7725ef6..86e38f3 100644
--- a/gemfire-cq/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTwoDUnitTest.java
+++ b/gemfire-cq/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTwoDUnitTest.java
@@ -18,6 +18,7 @@ package com.gemstone.gemfire.security;
 
 import com.gemstone.gemfire.cache.operations.OperationContext.OperationCode;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.IgnoredException;
 
 /**
  * Tests for authorization from client to server. This tests for authorization
@@ -64,11 +65,11 @@ public class ClientAuthorizationTwoDUnitTest extends
   // Region: Tests
 
   public void testAllOpsWithFailover2() {
-    addExpectedException("Read timed out");
-    addExpectedException("Connection reset");
-    addExpectedException("SocketTimeoutException");
-    addExpectedException("ServerConnectivityException");
-    addExpectedException("Socket Closed");
+    IgnoredException.addIgnoredException("Read timed out");
+    IgnoredException.addIgnoredException("Connection reset");
+    IgnoredException.addIgnoredException("SocketTimeoutException");
+    IgnoredException.addIgnoredException("ServerConnectivityException");
+    IgnoredException.addIgnoredException("Socket Closed");
 
     OperationWithAction[] allOps = {
         // Register interest in all keys using list
@@ -230,9 +231,7 @@ public class ClientAuthorizationTwoDUnitTest extends
   // End Region: Tests
 
   @Override
-  public void tearDown2() throws Exception {
-
-    super.tearDown2();
+  protected final void preTearDown() throws Exception {
     // close the clients first
     client1.invoke(SecurityTestUtil.class, "closeCache");
     client2.invoke(SecurityTestUtil.class, "closeCache");
@@ -241,5 +240,4 @@ public class ClientAuthorizationTwoDUnitTest extends
     server1.invoke(SecurityTestUtil.class, "closeCache");
     server2.invoke(SecurityTestUtil.class, "closeCache");
   }
-
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-cq/src/test/java/com/gemstone/gemfire/security/ClientAuthzObjectModDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-cq/src/test/java/com/gemstone/gemfire/security/ClientAuthzObjectModDUnitTest.java b/gemfire-cq/src/test/java/com/gemstone/gemfire/security/ClientAuthzObjectModDUnitTest.java
index 58f26bb..e26db30 100644
--- a/gemfire-cq/src/test/java/com/gemstone/gemfire/security/ClientAuthzObjectModDUnitTest.java
+++ b/gemfire-cq/src/test/java/com/gemstone/gemfire/security/ClientAuthzObjectModDUnitTest.java
@@ -34,6 +34,7 @@ import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.internal.security.ObjectWithAuthz;
 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;
 
 /**
@@ -139,8 +140,8 @@ public class ClientAuthzObjectModDUnitTest extends ClientAuthorizationTestBase {
     server2.invoke(registerInstantiator);
   }
   
-  public void tearDown2() throws Exception  {
-    super.tearDown2();
+  @Override
+  protected final void preTearDown() throws Exception {
     DistributedTestCase.cleanupAllVms();
   }
 
@@ -338,15 +339,15 @@ public class ClientAuthzObjectModDUnitTest extends ClientAuthorizationTestBase {
     String authInit = gen.getAuthInit();
     String authenticator = gen.getAuthenticator();
 
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "testPutsGetsObjectModWithFailover: Using authinit: " + authInit);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "testPutsGetsObjectModWithFailover: Using authenticator: "
             + authenticator);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "testPutsGetsObjectModWithFailover: Using pre-operation accessor: "
             + preAccessor);
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "testPutsGetsObjectModWithFailover: Using post-operation accessor: "
             + postAccessor);
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-cq/src/test/java/com/gemstone/gemfire/security/ClientCQPostAuthorizationDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-cq/src/test/java/com/gemstone/gemfire/security/ClientCQPostAuthorizationDUnitTest.java b/gemfire-cq/src/test/java/com/gemstone/gemfire/security/ClientCQPostAuthorizationDUnitTest.java
index 2854c24..e17acc0 100644
--- a/gemfire-cq/src/test/java/com/gemstone/gemfire/security/ClientCQPostAuthorizationDUnitTest.java
+++ b/gemfire-cq/src/test/java/com/gemstone/gemfire/security/ClientCQPostAuthorizationDUnitTest.java
@@ -42,9 +42,12 @@ import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.logging.InternalLogWriter;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.Invoke;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 /**
  * This is for multiuser-authentication
  * 
@@ -71,7 +74,7 @@ public class ClientCQPostAuthorizationDUnitTest extends
 
     super.setUp();
     getSystem();
-    invokeInEveryVM(new SerializableRunnable("getSystem") {
+    Invoke.invokeInEveryVM(new SerializableRunnable("getSystem") {
       public void run() {
         getSystem();
       }
@@ -92,8 +95,8 @@ public class ClientCQPostAuthorizationDUnitTest extends
     SecurityTestUtil.registerExpectedExceptions(clientExpectedExceptions);
   }
 
-  public void tearDown2() throws Exception {
-    super.tearDown2();
+  @Override
+  protected final void preTearDown() throws Exception {
     client1.invoke(SecurityTestUtil.class, "closeCache");
     client2.invoke(SecurityTestUtil.class, "closeCache");
     server1.invoke(SecurityTestUtil.class, "closeCache");
@@ -301,7 +304,7 @@ public class ClientCQPostAuthorizationDUnitTest extends
           + SecurityTestUtil.proxyCaches[i].getRegion(regionName).getFullPath();
       // Create CQ Attributes.
       CqAttributesFactory cqf = new CqAttributesFactory();
-      CqListener[] cqListeners = {new CqQueryTestListener(getLogWriter())};
+      CqListener[] cqListeners = {new CqQueryTestListener(LogWriterUtils.getLogWriter())};
       ((CqQueryTestListener)cqListeners[0]).cqName = cqName;
 
       cqf.initCqListeners(cqListeners);
@@ -315,7 +318,7 @@ public class ClientCQPostAuthorizationDUnitTest extends
         AssertionError err = new AssertionError("Failed to create CQ " + cqName
             + " . ");
         err.initCause(ex);
-        getLogWriter().info("CqService is :" + cqService, err);
+        LogWriterUtils.getLogWriter().info("CqService is :" + cqService, err);
         throw err;
       }
     }
@@ -343,16 +346,16 @@ public class ClientCQPostAuthorizationDUnitTest extends
         try {
           cq1 = cqService.getCq(cqName);
           if (cq1 == null) {
-            getLogWriter().info(
+            LogWriterUtils.getLogWriter().info(
                 "Failed to get CqQuery object for CQ name: " + cqName);
             fail("Failed to get CQ " + cqName);
           } else {
-            getLogWriter().info("Obtained CQ, CQ name: " + cq1.getName());
+            LogWriterUtils.getLogWriter().info("Obtained CQ, CQ name: " + cq1.getName());
             assertTrue("newCq() state mismatch", cq1.getState().isStopped());
           }
         } catch (Exception ex) {
-          getLogWriter().info("CqService is :" + cqService);
-          getLogWriter().error(ex);
+          LogWriterUtils.getLogWriter().info("CqService is :" + cqService);
+          LogWriterUtils.getLogWriter().error(ex);
           AssertionError err = new AssertionError("Failed to execute CQ "
               + cqName);
           err.initCause(ex);
@@ -366,9 +369,9 @@ public class ClientCQPostAuthorizationDUnitTest extends
             cqResults = cq1.executeWithInitialResults();
           } catch (CqException ce) {
             if (ce.getCause() instanceof NotAuthorizedException && !postAuthzAllowed[i]) {
-              getLogWriter().info("Got expected exception for CQ " + cqName);
+              LogWriterUtils.getLogWriter().info("Got expected exception for CQ " + cqName);
             } else {
-              getLogWriter().info("CqService is: " + cqService);
+              LogWriterUtils.getLogWriter().info("CqService is: " + cqService);
               ce.printStackTrace();
               AssertionError err = new AssertionError("Failed to execute CQ "
                   + cqName);
@@ -376,14 +379,14 @@ public class ClientCQPostAuthorizationDUnitTest extends
               throw err;
             }
           } catch (Exception ex) {
-            getLogWriter().info("CqService is: " + cqService);
+            LogWriterUtils.getLogWriter().info("CqService is: " + cqService);
             ex.printStackTrace();
             AssertionError err = new AssertionError("Failed to execute CQ "
                 + cqName);
             err.initCause(ex);
             throw err;
           }
-          getLogWriter().info("initial result size = " + cqResults.size());
+          LogWriterUtils.getLogWriter().info("initial result size = " + cqResults.size());
           assertTrue("executeWithInitialResults() state mismatch", cq1
               .getState().isRunning());
           if (expectedResultsSize >= 0) {
@@ -395,9 +398,9 @@ public class ClientCQPostAuthorizationDUnitTest extends
             cq1.execute();
           } catch (CqException ce) {
             if (ce.getCause() instanceof NotAuthorizedException && !postAuthzAllowed[i]) {
-              getLogWriter().info("Got expected exception for CQ " + cqName);
+              LogWriterUtils.getLogWriter().info("Got expected exception for CQ " + cqName);
             } else {
-              getLogWriter().info("CqService is: " + cqService);
+              LogWriterUtils.getLogWriter().info("CqService is: " + cqService);
               ce.printStackTrace();
               AssertionError err = new AssertionError("Failed to execute CQ "
                   + cqName);
@@ -409,7 +412,7 @@ public class ClientCQPostAuthorizationDUnitTest extends
                 + cqName);
             err.initCause(ex);
             if (expectedErr == null) {
-              getLogWriter().info("CqService is: " + cqService, err);
+              LogWriterUtils.getLogWriter().info("CqService is: " + cqService, err);
             }
             throw err;
           }
@@ -492,7 +495,7 @@ public class ClientCQPostAuthorizationDUnitTest extends
             + " CQs to be registered on this server.";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 60 * 1000, 100, false);
+    Wait.waitForCriterion(wc, 60 * 1000, 100, false);
   }
 
   public static void checkCQListeners(Integer numOfUsers,

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-cq/src/test/java/com/gemstone/gemfire/security/ClientPostAuthorizationDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-cq/src/test/java/com/gemstone/gemfire/security/ClientPostAuthorizationDUnitTest.java b/gemfire-cq/src/test/java/com/gemstone/gemfire/security/ClientPostAuthorizationDUnitTest.java
index bd22dfb..78a45b1 100644
--- a/gemfire-cq/src/test/java/com/gemstone/gemfire/security/ClientPostAuthorizationDUnitTest.java
+++ b/gemfire-cq/src/test/java/com/gemstone/gemfire/security/ClientPostAuthorizationDUnitTest.java
@@ -27,6 +27,7 @@ import security.CredentialGenerator;
 import com.gemstone.gemfire.cache.operations.OperationContext.OperationCode;
 import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 
 /**
  * Tests for authorization from client to server. This tests for authorization
@@ -126,10 +127,10 @@ public class ClientPostAuthorizationDUnitTest extends
       String accessor = gen.getAuthorizationCallback();
       TestAuthzCredentialGenerator tgen = new TestAuthzCredentialGenerator(gen);
 
-      getLogWriter().info("testAllPostOps: Using authinit: " + authInit);
-      getLogWriter().info(
+      LogWriterUtils.getLogWriter().info("testAllPostOps: Using authinit: " + authInit);
+      LogWriterUtils.getLogWriter().info(
           "testAllPostOps: Using authenticator: " + authenticator);
-      getLogWriter().info("testAllPostOps: Using accessor: " + accessor);
+      LogWriterUtils.getLogWriter().info("testAllPostOps: Using accessor: " + accessor);
 
       // Start servers with all required properties
       Properties serverProps = buildProperties(authenticator, accessor, true,
@@ -315,7 +316,7 @@ public class ClientPostAuthorizationDUnitTest extends
         OperationWithAction.OPBLOCK_NO_FAILOVER };
 
       AuthzCredentialGenerator gen = getXmlAuthzGenerator();
-      getLogWriter().info("Executing opblocks with credential generator " + gen);
+      LogWriterUtils.getLogWriter().info("Executing opblocks with credential generator " + gen);
       CredentialGenerator cGen = gen.getCredentialGenerator();
       Properties extraAuthProps = cGen.getSystemProperties();
       Properties javaProps = cGen.getJavaProperties();
@@ -325,11 +326,11 @@ public class ClientPostAuthorizationDUnitTest extends
       String accessor = gen.getAuthorizationCallback();
       TestAuthzCredentialGenerator tgen = new TestAuthzCredentialGenerator(gen);
 
-      getLogWriter().info(
+      LogWriterUtils.getLogWriter().info(
           "testAllOpsNotifications: Using authinit: " + authInit);
-      getLogWriter().info(
+      LogWriterUtils.getLogWriter().info(
           "testAllOpsNotifications: Using authenticator: " + authenticator);
-      getLogWriter().info(
+      LogWriterUtils.getLogWriter().info(
           "testAllOpsNotifications: Using accessor: " + accessor);
 
       // Start servers with all required properties
@@ -383,9 +384,8 @@ public class ClientPostAuthorizationDUnitTest extends
 
   // End Region: Tests
 
-  public void tearDown2() throws Exception {
-
-    super.tearDown2();
+  @Override
+  protected final void preTearDown() throws Exception {
     // close the clients first
     client1.invoke(SecurityTestUtil.class, "closeCache");
     client2.invoke(SecurityTestUtil.class, "closeCache");
@@ -394,5 +394,4 @@ public class ClientPostAuthorizationDUnitTest extends
     server1.invoke(SecurityTestUtil.class, "closeCache");
     server2.invoke(SecurityTestUtil.class, "closeCache");
   }
-
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-cq/src/test/java/com/gemstone/gemfire/security/MultiuserAPIDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-cq/src/test/java/com/gemstone/gemfire/security/MultiuserAPIDUnitTest.java b/gemfire-cq/src/test/java/com/gemstone/gemfire/security/MultiuserAPIDUnitTest.java
index 26f2e31..e3931b0 100644
--- a/gemfire-cq/src/test/java/com/gemstone/gemfire/security/MultiuserAPIDUnitTest.java
+++ b/gemfire-cq/src/test/java/com/gemstone/gemfire/security/MultiuserAPIDUnitTest.java
@@ -36,7 +36,9 @@ import com.gemstone.gemfire.cache.query.Query;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.cache.PoolManagerImpl;
+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.VM;
 
 import security.DummyCredentialGenerator;
@@ -136,11 +138,11 @@ public class MultiuserAPIDUnitTest extends ClientAuthorizationTestBase {
     String authenticator = gen.getAuthenticator();
     String authInit = gen.getAuthInit();
 
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "testValidCredentials: Using scheme: " + gen.classCode());
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "testValidCredentials: Using authenticator: " + authenticator);
-    getLogWriter().info("testValidCredentials: Using authinit: " + authInit);
+    LogWriterUtils.getLogWriter().info("testValidCredentials: Using authinit: " + authInit);
 
     // Start the servers
     Integer locPort1 = SecurityTestUtil.getLocatorPort();
@@ -156,12 +158,12 @@ public class MultiuserAPIDUnitTest extends ClientAuthorizationTestBase {
     // Start the clients with valid credentials
     Properties credentials1 = gen.getValidCredentials(1);
     Properties javaProps1 = gen.getJavaProperties();
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "testValidCredentials: For first client credentials: " + credentials1
             + " : " + javaProps1);
     Properties credentials2 = gen.getValidCredentials(2);
     Properties javaProps2 = gen.getJavaProperties();
-    getLogWriter().info(
+    LogWriterUtils.getLogWriter().info(
         "testValidCredentials: For second client credentials: " + credentials2
             + " : " + javaProps2);
     client1.invoke(MultiuserAPIDUnitTest.class, "createCacheClient",
@@ -198,7 +200,7 @@ public class MultiuserAPIDUnitTest extends ClientAuthorizationTestBase {
         Log.getLogWriter().info(op + ": Got expected exception: " + uoe);
         success = true;
       } catch (Exception e) {
-        fail("Got unexpected exception while doing " + op, e);
+        Assert.fail("Got unexpected exception while doing " + op, e);
       }
       if (!success) {
         fail("Did not get exception while doing " + op);
@@ -369,7 +371,7 @@ public class MultiuserAPIDUnitTest extends ClientAuthorizationTestBase {
           Log.getLogWriter().info(op + ": Got expected exception: " + uoe);
           success = true;
         } catch (Exception e) {
-          fail("Got unexpected exception while doing " + op, e);
+          Assert.fail("Got unexpected exception while doing " + op, e);
         }
         if (!success) {
           fail("Did not get exception while doing " + op);
@@ -378,8 +380,8 @@ public class MultiuserAPIDUnitTest extends ClientAuthorizationTestBase {
     }
   }
 
-  public void tearDown2() throws Exception {
-    super.tearDown2();
+  @Override
+  protected final void preTearDown() throws Exception {
     // close the clients first
     client1.invoke(SecurityTestUtil.class, "closeCache");
     client2.invoke(SecurityTestUtil.class, "closeCache");
@@ -387,5 +389,4 @@ public class MultiuserAPIDUnitTest extends ClientAuthorizationTestBase {
     server1.invoke(SecurityTestUtil.class, "closeCache");
     server2.invoke(SecurityTestUtil.class, "closeCache");
   }
-
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-cq/src/test/java/com/gemstone/gemfire/security/MultiuserDurableCQAuthzDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-cq/src/test/java/com/gemstone/gemfire/security/MultiuserDurableCQAuthzDUnitTest.java b/gemfire-cq/src/test/java/com/gemstone/gemfire/security/MultiuserDurableCQAuthzDUnitTest.java
index 675f8c6..23f496d 100644
--- a/gemfire-cq/src/test/java/com/gemstone/gemfire/security/MultiuserDurableCQAuthzDUnitTest.java
+++ b/gemfire-cq/src/test/java/com/gemstone/gemfire/security/MultiuserDurableCQAuthzDUnitTest.java
@@ -39,6 +39,8 @@ import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.logging.InternalLogWriter;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.Invoke;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 
 /**
@@ -62,7 +64,7 @@ public class MultiuserDurableCQAuthzDUnitTest extends
   public void setUp() throws Exception {
     super.setUp();
     getSystem();
-    invokeInEveryVM(new SerializableRunnable("getSystem") {
+    Invoke.invokeInEveryVM(new SerializableRunnable("getSystem") {
       public void run() {
         getSystem();
       }
@@ -318,7 +320,7 @@ public class MultiuserDurableCQAuthzDUnitTest extends
           + SecurityTestUtil.proxyCaches[i].getRegion(regionName).getFullPath();
       // Create CQ Attributes.
       CqAttributesFactory cqf = new CqAttributesFactory();
-      CqListener[] cqListeners = {new CqQueryTestListener(getLogWriter())};
+      CqListener[] cqListeners = {new CqQueryTestListener(LogWriterUtils.getLogWriter())};
       ((CqQueryTestListener)cqListeners[0]).cqName = cqName;
 
       cqf.initCqListeners(cqListeners);
@@ -332,7 +334,7 @@ public class MultiuserDurableCQAuthzDUnitTest extends
         AssertionError err = new AssertionError("Failed to create CQ " + cqName
             + " . ");
         err.initCause(ex);
-        getLogWriter().info("CqService is :" + cqService, err);
+        LogWriterUtils.getLogWriter().info("CqService is :" + cqService, err);
         throw err;
       }
     }
@@ -360,16 +362,16 @@ public class MultiuserDurableCQAuthzDUnitTest extends
         try {
           cq1 = cqService.getCq(cqName);
           if (cq1 == null) {
-            getLogWriter().info(
+            LogWriterUtils.getLogWriter().info(
                 "Failed to get CqQuery object for CQ name: " + cqName);
             fail("Failed to get CQ " + cqName);
           } else {
-            getLogWriter().info("Obtained CQ, CQ name: " + cq1.getName());
+            LogWriterUtils.getLogWriter().info("Obtained CQ, CQ name: " + cq1.getName());
             assertTrue("newCq() state mismatch", cq1.getState().isStopped());
           }
         } catch (Exception ex) {
-          getLogWriter().info("CqService is :" + cqService);
-          getLogWriter().error(ex);
+          LogWriterUtils.getLogWriter().info("CqService is :" + cqService);
+          LogWriterUtils.getLogWriter().error(ex);
           AssertionError err = new AssertionError("Failed to execute CQ "
               + cqName);
           err.initCause(ex);
@@ -382,14 +384,14 @@ public class MultiuserDurableCQAuthzDUnitTest extends
           try {
             cqResults = cq1.executeWithInitialResults();
           } catch (Exception ex) {
-            getLogWriter().info("CqService is: " + cqService);
+            LogWriterUtils.getLogWriter().info("CqService is: " + cqService);
             ex.printStackTrace();
             AssertionError err = new AssertionError("Failed to execute CQ "
                 + cqName);
             err.initCause(ex);
             throw err;
           }
-          getLogWriter().info("initial result size = " + cqResults.size());
+          LogWriterUtils.getLogWriter().info("initial result size = " + cqResults.size());
           assertTrue("executeWithInitialResults() state mismatch", cq1
               .getState().isRunning());
           if (expectedResultsSize >= 0) {
@@ -404,7 +406,7 @@ public class MultiuserDurableCQAuthzDUnitTest extends
                 + cqName);
             err.initCause(ex);
             if (expectedErr == null) {
-              getLogWriter().info("CqService is: " + cqService, err);
+              LogWriterUtils.getLogWriter().info("CqService is: " + cqService, err);
             }
             throw err;
           }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/820cfd63/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/UpdateVersionDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/UpdateVersionDUnitTest.java b/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/UpdateVersionDUnitTest.java
index 70ecac5..2d1e2cd 100644
--- a/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/UpdateVersionDUnitTest.java
+++ b/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/UpdateVersionDUnitTest.java
@@ -54,10 +54,15 @@ import com.gemstone.gemfire.internal.cache.versions.VersionStamp;
 import com.gemstone.gemfire.internal.cache.versions.VersionTag;
 import com.gemstone.gemfire.internal.cache.wan.InternalGatewaySenderFactory;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.IgnoredException;
+import com.gemstone.gemfire.test.dunit.Invoke;
+import com.gemstone.gemfire.test.dunit.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;
 
 /**
  * @author Shobhit Agarwal
@@ -67,7 +72,7 @@ public class UpdateVersionDUnitTest extends DistributedTestCase {
 
   protected static final String regionName = "testRegion";
   protected static Cache cache;
-  private static Set<ExpectedException>expectedExceptions = new HashSet<ExpectedException>();
+  private static Set<IgnoredException>expectedExceptions = new HashSet<IgnoredException>();
 
   
   
@@ -75,10 +80,10 @@ public class UpdateVersionDUnitTest extends DistributedTestCase {
     super(name);
   }
   
-  public void tearDown2() throws Exception {
-    super.tearDown2();
+  @Override
+  protected final void preTearDown() throws Exception {
     closeCache();
-    invokeInEveryVM(new SerializableRunnable() { public void run() {
+    Invoke.invokeInEveryVM(new SerializableRunnable() { public void run() {
       closeCache();
      } });
   }
@@ -184,7 +189,7 @@ public class UpdateVersionDUnitTest extends DistributedTestCase {
               throw new RuntimeException("unexpected exception", e);
             }
             if (entry != null) {
-              getLogWriter().info("found entry " + entry);
+              LogWriterUtils.getLogWriter().info("found entry " + entry);
             }
             return (entry != null);
           }
@@ -193,7 +198,7 @@ public class UpdateVersionDUnitTest extends DistributedTestCase {
             return "Expected "+key+" to be received on remote WAN site";
           }
         };
-        DistributedTestCase.waitForCriterion(wc, 30000, 500, true);
+        Wait.waitForCriterion(wc, 30000, 500, true);
 
         wc = new WaitCriterion() {
           public boolean done() {
@@ -206,7 +211,7 @@ public class UpdateVersionDUnitTest extends DistributedTestCase {
             return "waiting for timestamp to be updated";
           }
         };
-        DistributedTestCase.waitForCriterion(wc, 30000, 500, true);
+        Wait.waitForCriterion(wc, 30000, 500, true);
 
         Entry entry = region.getEntry(key);
         assertTrue("entry class is wrong: " + entry, entry instanceof EntrySnapshot);
@@ -318,7 +323,7 @@ public class UpdateVersionDUnitTest extends DistributedTestCase {
             return "Expected key-1 to be received on remote WAN site";
           }
         };
-        DistributedTestCase.waitForCriterion(wc, 30000, 500, true);
+        Wait.waitForCriterion(wc, 30000, 500, true);
 
         wc = new WaitCriterion() {
           public boolean done() {
@@ -331,7 +336,7 @@ public class UpdateVersionDUnitTest extends DistributedTestCase {
             return "waiting for timestamp to be updated";
           }
         };
-        DistributedTestCase.waitForCriterion(wc, 30000, 500, true);
+        Wait.waitForCriterion(wc, 30000, 500, true);
 
         Entry entry = region.getEntry(key);
         assertTrue(entry instanceof NonTXEntry);
@@ -448,7 +453,7 @@ public class UpdateVersionDUnitTest extends DistributedTestCase {
               throw new RuntimeException("unexpected exception", e);
             }
             if (entry != null) {
-              getLogWriter().info("found entry " + entry);
+              LogWriterUtils.getLogWriter().info("found entry " + entry);
             }
             return (entry != null);
           }
@@ -457,7 +462,7 @@ public class UpdateVersionDUnitTest extends DistributedTestCase {
             return "Expected key-1 to be received on remote WAN site";
           }
         };
-        DistributedTestCase.waitForCriterion(wc, 30000, 500, true);
+        Wait.waitForCriterion(wc, 30000, 500, true);
 
         wc = new WaitCriterion() {
           public boolean done() {
@@ -470,7 +475,7 @@ public class UpdateVersionDUnitTest extends DistributedTestCase {
             return "waiting for timestamp to be updated";
           }
         };
-        DistributedTestCase.waitForCriterion(wc, 30000, 500, true);
+        Wait.waitForCriterion(wc, 30000, 500, true);
 
         Entry entry = region.getEntry(key);
         assertTrue(entry instanceof EntrySnapshot);
@@ -587,7 +592,7 @@ public class UpdateVersionDUnitTest extends DistributedTestCase {
               throw new RuntimeException("unexpected exception", e);
             }
             if (entry != null) {
-              getLogWriter().info("found entry " + entry);
+              LogWriterUtils.getLogWriter().info("found entry " + entry);
             }
             return (entry != null);
           }
@@ -596,7 +601,7 @@ public class UpdateVersionDUnitTest extends DistributedTestCase {
             return "Expected key-1 to be received on remote WAN site";
           }
         };
-        DistributedTestCase.waitForCriterion(wc, 30000, 500, true);
+        Wait.waitForCriterion(wc, 30000, 500, true);
 
         wc = new WaitCriterion() {
           public boolean done() {
@@ -609,7 +614,7 @@ public class UpdateVersionDUnitTest extends DistributedTestCase {
             return "waiting for timestamp to be updated";
           }
         };
-        DistributedTestCase.waitForCriterion(wc, 30000, 500, true);
+        Wait.waitForCriterion(wc, 30000, 500, true);
 
         Entry entry = region.getEntry(key);
         assertTrue(entry instanceof EntrySnapshot);
@@ -646,27 +651,27 @@ public class UpdateVersionDUnitTest extends DistributedTestCase {
    */
 
   private static void createCache(Integer locPort) {
-    UpdateVersionDUnitTest test = new UpdateVersionDUnitTest(testName);
+    UpdateVersionDUnitTest test = new UpdateVersionDUnitTest(getTestMethodName());
     Properties props = new Properties();
     props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
     props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + locPort + "]");
-    props.setProperty(DistributionConfig.LOG_LEVEL_NAME, getDUnitLogLevel());
+    props.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
     props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
     props.setProperty(DistributionConfig.USE_CLUSTER_CONFIGURATION_NAME, "false");
     InternalDistributedSystem ds = test.getSystem(props);
     cache = CacheFactory.create(ds); 
-    ExpectedException ex = new ExpectedException("could not get remote locator information for remote site");
-    cache.getLogger().info(ex.getAddString());
+    IgnoredException ex = new IgnoredException("could not get remote locator information for remote site");
+    cache.getLogger().info(ex.getAddMessage());
     expectedExceptions.add(ex);
-    ex = new ExpectedException("Pool ln1 is not available");
-    cache.getLogger().info(ex.getAddString());
+    ex = new IgnoredException("Pool ln1 is not available");
+    cache.getLogger().info(ex.getAddMessage());
     expectedExceptions.add(ex);
   }
   
   private static void closeCache() {
     if (cache != null && !cache.isClosed()) {
-      for (ExpectedException expectedException: expectedExceptions) {
-        cache.getLogger().info(expectedException.getRemoveString());
+      for (IgnoredException expectedException: expectedExceptions) {
+        cache.getLogger().info(expectedException.getRemoveMessage());
       }
       expectedExceptions.clear();
       cache.getDistributedSystem().disconnect();
@@ -781,11 +786,11 @@ public class UpdateVersionDUnitTest extends DistributedTestCase {
         return "Expected sender isRunning state to be true but is false";
       }
     };
-    DistributedTestCase.waitForCriterion(wc, 300000, 500, true);
+    Wait.waitForCriterion(wc, 300000, 500, true);
   }
 
   public static Integer createFirstRemoteLocator(int dsId, int remoteLocPort) {
-    UpdateVersionDUnitTest test = new UpdateVersionDUnitTest(testName);
+    UpdateVersionDUnitTest test = new UpdateVersionDUnitTest(getTestMethodName());
     int port = AvailablePortHelper.getRandomAvailablePortForDUnitSite();
     Properties props = new Properties();
     props.setProperty(DistributionConfig.MCAST_PORT_NAME,"0");
@@ -853,7 +858,7 @@ public class UpdateVersionDUnitTest extends DistributedTestCase {
   }
 
   public static int createReceiver(int locPort) {
-    UpdateVersionDUnitTest test = new UpdateVersionDUnitTest(testName);
+    UpdateVersionDUnitTest test = new UpdateVersionDUnitTest(getTestMethodName());
     Properties props = new Properties();
     props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
     props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + locPort
@@ -945,7 +950,7 @@ public class UpdateVersionDUnitTest extends DistributedTestCase {
   }
 
   public static Integer createFirstLocatorWithDSId(int dsId) {
-    UpdateVersionDUnitTest test = new UpdateVersionDUnitTest(testName);
+    UpdateVersionDUnitTest test = new UpdateVersionDUnitTest(getTestMethodName());
     int port = AvailablePortHelper.getRandomAvailablePortForDUnitSite();
     Properties props = new Properties();
     props.setProperty(DistributionConfig.MCAST_PORT_NAME,"0");


Mime
View raw message