geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [47/62] [abbrv] incubator-geode git commit: Merge remote-tracking branch 'origin/develop' into feature/GEODE-837
Date Tue, 07 Jun 2016 20:55:02 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestListRecoveryDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestListRecoveryDUnitTest.java
index 46e4e40,0a44d60..280ab66
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestListRecoveryDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestListRecoveryDUnitTest.java
@@@ -16,29 -16,9 +16,30 @@@
   */
  package com.gemstone.gemfire.internal.cache.tier.sockets;
  
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
 +import static org.junit.Assert.*;
 +
 +import java.io.EOFException;
 +import java.net.SocketException;
 +import java.util.HashSet;
 +import java.util.Iterator;
 +import java.util.Properties;
 +import java.util.Set;
 +
 +import org.junit.Ignore;
 +import org.junit.Test;
 +import org.junit.experimental.categories.Category;
 +
  import com.gemstone.gemfire.LogWriter;
  import com.gemstone.gemfire.SystemFailure;
 -import com.gemstone.gemfire.cache.*;
 +import com.gemstone.gemfire.cache.AttributesFactory;
 +import com.gemstone.gemfire.cache.Cache;
 +import com.gemstone.gemfire.cache.CacheFactory;
 +import com.gemstone.gemfire.cache.DataPolicy;
 +import com.gemstone.gemfire.cache.InterestResultPolicy;
 +import com.gemstone.gemfire.cache.Region;
 +import com.gemstone.gemfire.cache.RegionAttributes;
 +import com.gemstone.gemfire.cache.Scope;
  import com.gemstone.gemfire.cache.client.PoolManager;
  import com.gemstone.gemfire.cache.client.internal.PoolImpl;
  import com.gemstone.gemfire.cache.client.internal.RegisterInterestTracker;
@@@ -103,9 -92,9 +103,9 @@@ public class InterestListRecoveryDUnitT
      createClientCache(NetworkUtils.getServerHostName(host), new Integer(PORT1), new Integer(PORT2));
    }
  
-   @Ignore("TODO: this test fails because of #35352: proxy.markServerUnavailable() is not causing interestListEndpoint to change")
 -  // this test fails because of bug# 35352 , hence commented the bug is Deferred to: Danube
 -  public void XtestKeyInterestRecoveryWhileServerFailover() throws Exception
 -  {
++  @Ignore("TODO: test is disabled because of #35352: proxy.markServerUnavailable() is not causing interestListEndpoint to change")
 +  @Test
 +  public void testKeyInterestRecoveryWhileServerFailover() throws Exception {
      createEntries();
      server1.invoke(() -> InterestListRecoveryDUnitTest.createEntries());
      registerK1toK5();
@@@ -200,10 -188,11 +200,10 @@@
  
    public static void createClientCache(String host, Integer port1, Integer port2 ) throws Exception
    {
 -    InterestListRecoveryDUnitTest test = new InterestListRecoveryDUnitTest(
 -        "temp");
 +    InterestListRecoveryDUnitTest test = new InterestListRecoveryDUnitTest();
      Properties props = new Properties();
-     props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
-     props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+     props.setProperty(MCAST_PORT, "0");
+     props.setProperty(LOCATORS, "");
      cache = test.createCache(props);
      PoolImpl p = (PoolImpl)PoolManager.createFactory()
        .addServer(host, port1.intValue())
@@@ -244,9 -234,9 +244,6 @@@
      return new Integer(server1.getPort());
    }
  
--
--
--
    public static void createEntries()
    {
      try {
@@@ -300,6 -290,6 +297,7 @@@
        Assert.fail("while setting server unavailable  "+ server, ex);
      }
    }
++
    public static void setServerAvailable(String server)
    {
      try {
@@@ -326,8 -316,8 +324,6 @@@
      }
    }
  
--
--
    public static void put(String key)
    {
      try {
@@@ -339,7 -329,7 +335,6 @@@
      }
    }
  
--
    public static void verifyRegionToProxyMapForFullRegistrationRetry() {
      WaitCriterion ev = new WaitCriterion() {
        public boolean done() {
@@@ -365,21 -355,21 +360,19 @@@
      Wait.waitForCriterion(ev, 20 * 1000, 200, true);
    }
    
--   public static void verifyRegionToProxyMapForFullRegistration()
--   {
--     Iterator iter = getCacheClientProxies().iterator();
--     if(iter.hasNext()){
--       Set keys = getKeysOfInterestMap((CacheClientProxy)iter.next(), "/" + REGION_NAME);
--       assertNotNull(keys);
--
--       assertTrue(keys.contains("key-1"));
--       assertTrue(keys.contains("key-2"));
--       assertTrue(keys.contains("key-3"));
--       assertTrue(keys.contains("key-4"));
--       assertTrue(keys.contains("key-5"));
--     }
--   }
--
++  public static void verifyRegionToProxyMapForFullRegistration() {
++    Iterator iter = getCacheClientProxies().iterator();
++    if(iter.hasNext()){
++      Set keys = getKeysOfInterestMap((CacheClientProxy)iter.next(), "/" + REGION_NAME);
++      assertNotNull(keys);
++
++      assertTrue(keys.contains("key-1"));
++      assertTrue(keys.contains("key-2"));
++      assertTrue(keys.contains("key-3"));
++      assertTrue(keys.contains("key-4"));
++      assertTrue(keys.contains("key-5"));
++    }
++  }
  
    public static void verifyRegisterK4toK5Retry() {
      WaitCriterion ev = new WaitCriterion() {
@@@ -407,19 -397,19 +400,19 @@@
      Wait.waitForCriterion(ev, 20 * 1000, 200, true);
    }
  
--   public static void verifyRegisterK4toK5() {
--     Iterator iter = getCacheClientProxies().iterator();
--     if (iter.hasNext()) {
--       Set keysMap = getKeysOfInterestMap((CacheClientProxy)iter.next(), "/" + REGION_NAME);
--       assertNotNull(keysMap);
--
--       assertFalse(keysMap.contains("key-1"));
--       assertFalse(keysMap.contains("key-2"));
--       assertFalse(keysMap.contains("key-3"));
--       assertTrue(keysMap.contains("key-4"));
--       assertTrue(keysMap.contains("key-5"));
--     }
--   }
++  public static void verifyRegisterK4toK5() {
++    Iterator iter = getCacheClientProxies().iterator();
++    if (iter.hasNext()) {
++      Set keysMap = getKeysOfInterestMap((CacheClientProxy)iter.next(), "/" + REGION_NAME);
++      assertNotNull(keysMap);
++
++      assertFalse(keysMap.contains("key-1"));
++      assertFalse(keysMap.contains("key-2"));
++      assertFalse(keysMap.contains("key-3"));
++      assertTrue(keysMap.contains("key-4"));
++      assertTrue(keysMap.contains("key-5"));
++    }
++  }
  
    public static void verifyRegionToProxyMapForNoRegistrationRetry() {
      WaitCriterion ev = new WaitCriterion() {
@@@ -446,41 -436,41 +439,40 @@@
      Wait.waitForCriterion(ev, 20 * 1000, 200, true);
    }
  
-- public static void verifyRegionToProxyMapForNoRegistration()
-- {
--   Iterator iter = getCacheClientProxies().iterator();
--   if (iter.hasNext()) {
--     Set keysMap = getKeysOfInterestMap((CacheClientProxy)iter.next(), "/" + REGION_NAME);
--     if (keysMap != null) { // its ok not to have an empty map, just means there is no registration
--       assertFalse(keysMap.contains("key-1"));
--       assertFalse(keysMap.contains("key-2"));
--       assertFalse(keysMap.contains("key-3"));
--       assertFalse(keysMap.contains("key-4"));
--       assertFalse(keysMap.contains("key-5"));
--     }
--   }
-- }
--
-- public static Set getCacheClientProxies() {
--   Cache c = CacheFactory.getAnyInstance();
--   assertEquals("More than one CacheServer", 1, c.getCacheServers().size());
--   CacheServerImpl bs = (CacheServerImpl)c.getCacheServers().iterator()
--   .next();
--   assertNotNull(bs);
--   assertNotNull(bs.getAcceptor());
--   assertNotNull(bs.getAcceptor().getCacheClientNotifier());
--   return new HashSet(bs.getAcceptor().getCacheClientNotifier().getClientProxies());
-- }
--
-- public static Set getKeysOfInterestMap(CacheClientProxy proxy, String regionName) {
--   //assertNotNull(proxy.cils[RegisterInterestTracker.interestListIndex]);
--   //assertNotNull(proxy.cils[RegisterInterestTracker.interestListIndex]._keysOfInterest);
--   return proxy.cils[RegisterInterestTracker.interestListIndex]
--     .getProfile(regionName).getKeysOfInterestFor(proxy.getProxyID());
-- }
--
-- @Override
-- public final void preTearDown() throws Exception {
++  public static void verifyRegionToProxyMapForNoRegistration() {
++    Iterator iter = getCacheClientProxies().iterator();
++    if (iter.hasNext()) {
++      Set keysMap = getKeysOfInterestMap((CacheClientProxy)iter.next(), "/" + REGION_NAME);
++      if (keysMap != null) { // its ok not to have an empty map, just means there is no registration
++        assertFalse(keysMap.contains("key-1"));
++        assertFalse(keysMap.contains("key-2"));
++        assertFalse(keysMap.contains("key-3"));
++        assertFalse(keysMap.contains("key-4"));
++        assertFalse(keysMap.contains("key-5"));
++      }
++    }
++  }
++
++  public static Set getCacheClientProxies() {
++    Cache c = CacheFactory.getAnyInstance();
++    assertEquals("More than one CacheServer", 1, c.getCacheServers().size());
++    CacheServerImpl bs = (CacheServerImpl)c.getCacheServers().iterator()
++    .next();
++    assertNotNull(bs);
++    assertNotNull(bs.getAcceptor());
++    assertNotNull(bs.getAcceptor().getCacheClientNotifier());
++    return new HashSet(bs.getAcceptor().getCacheClientNotifier().getClientProxies());
++  }
++
++  public static Set getKeysOfInterestMap(CacheClientProxy proxy, String regionName) {
++    //assertNotNull(proxy.cils[RegisterInterestTracker.interestListIndex]);
++    //assertNotNull(proxy.cils[RegisterInterestTracker.interestListIndex]._keysOfInterest);
++    return proxy.cils[RegisterInterestTracker.interestListIndex]
++      .getProfile(regionName).getKeysOfInterestFor(proxy.getProxyID());
++  }
++
++  @Override
++  public final void preTearDown() throws Exception {
      // close the clients first
      server2.invoke(() -> InterestListRecoveryDUnitTest.closeCache());
      closeCache();
@@@ -495,8 -485,8 +487,7 @@@
        cache.getDistributedSystem().disconnect();
      }
    }
--  
--  
++
    public static void verifyDeadAndLiveServers(final int expectedDeadServers, 
        final int expectedLiveServers)
    {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestRegrListenerDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestRegrListenerDUnitTest.java
index 6d33e20,a2536c1..e16eb9c
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestRegrListenerDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestRegrListenerDUnitTest.java
@@@ -16,7 -16,15 +16,8 @@@
   */
  package com.gemstone.gemfire.internal.cache.tier.sockets;
  
 -import com.gemstone.gemfire.cache.*;
 -import com.gemstone.gemfire.cache.client.ClientCache;
 -import com.gemstone.gemfire.cache.client.ClientCacheFactory;
 -import com.gemstone.gemfire.cache.client.ClientRegionFactory;
 -import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
 -import com.gemstone.gemfire.cache.server.CacheServer;
 -import com.gemstone.gemfire.distributed.DistributedSystem;
 -import com.gemstone.gemfire.internal.AvailablePortHelper;
 -import com.gemstone.gemfire.test.dunit.*;
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
 +import static org.junit.Assert.*;
  
  import java.io.IOException;
  import java.net.InetAddress;
@@@ -53,10 -36,9 +54,9 @@@ import com.gemstone.gemfire.test.junit.
  
  /**
   * Written to test fix for Bug #47132
-- *
   */
 -public class InterestRegrListenerDUnitTest extends DistributedTestCase {
 +@Category(DistributedTest.class)
 +public class InterestRegrListenerDUnitTest extends JUnit4DistributedTestCase {
    
    private Cache cache;
    private DistributedSystem ds;
@@@ -68,16 -50,17 +68,10 @@@
    
    private static final String UNREGISTER_INTEREST = "UnregisterInterest";
    private static final String REGISTER_INTEREST = "RegisterInterest";
-   private static final int DURABLE_CLIENT_TIMEOUT=20;  
+   private static final int DURABLE_CLIENT_TIMEOUT_TEST=20;
    
 -  private static InterestRegrListenerDUnitTest instance = new InterestRegrListenerDUnitTest("InterestRegrListenerDUnitTest");
 -
 -
 -  public InterestRegrListenerDUnitTest(String name) {
 -    super(name);    
 -  }
 -  
 -  private static final long serialVersionUID = 1L;
 +  private static InterestRegrListenerDUnitTest instance = new InterestRegrListenerDUnitTest();
  
-   public InterestRegrListenerDUnitTest() {
-     super();    
-   }
-   
-   private static final long serialVersionUID = 1L;
- 
    @Override
    public final void preSetUp() throws Exception {
      disconnectAllFromDS();
@@@ -101,8 -84,8 +95,7 @@@
      hostName = InetAddress.getLocalHost().getHostAddress();
      listnerMap.clear();
    }
--  
--  
++
    public int getCacheServerPort(){
      return cacheServerPort;
    }
@@@ -320,9 -302,8 +313,8 @@@
      assertEquals(3, unregisterCount);
      serverVM.invoke(() -> InterestRegrListenerDUnitTest.closeCacheTask());    
    }
--  
--  
++
 +  @Test
    public void testDurableClientExit_ServerExpressedInterest() throws Exception {
      final Host host = Host.getHost(0);
      VM serverVM = host.getVM(0);
@@@ -382,12 -363,11 +374,9 @@@
      assertEquals(3, registerCount);
      assertEquals(3, unregisterCount);
      serverVM.invoke(() -> InterestRegrListenerDUnitTest.closeCacheTask());
--    
    }
--  
--  
--  
++
 +  @Test
    public void testDurableClientExit_ServerExpressedInterest_NonDurableInterest() throws Exception {
      final Host host = Host.getHost(0);
      final VM serverVM = host.getVM(0);
@@@ -461,10 -441,10 +450,9 @@@
      Wait.waitForCriterion(wc, 20000, 500, true);
      
      LogWriterUtils.getLogWriter().info("Sleeping till durable client queue are expired and unregister event is called on to listener");
-     Thread.sleep((DURABLE_CLIENT_TIMEOUT+5)*1000);
+     Thread.sleep((DURABLE_CLIENT_TIMEOUT_TEST+5)*1000);
      serverVM.invoke(() -> InterestRegrListenerDUnitTest.closeCacheTask());
    }
--  
  
    private int getMapValueForKey(Map<String, Integer> map, String key) {
      if (map.containsKey(key))

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestResultPolicyDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestResultPolicyDUnitTest.java
index 048c3e2,eaa8433..6f23ff8
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestResultPolicyDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestResultPolicyDUnitTest.java
@@@ -16,39 -16,22 +16,39 @@@
   */
  package com.gemstone.gemfire.internal.cache.tier.sockets;
  
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
 +import static org.junit.Assert.*;
 +
 +import java.util.ArrayList;
 +import java.util.List;
 +import java.util.Properties;
 +
 +import org.junit.Test;
 +import org.junit.experimental.categories.Category;
 +
  import com.gemstone.gemfire.LogWriter;
 -import com.gemstone.gemfire.cache.*;
 +import com.gemstone.gemfire.cache.AttributesFactory;
 +import com.gemstone.gemfire.cache.Cache;
 +import com.gemstone.gemfire.cache.CacheFactory;
 +import com.gemstone.gemfire.cache.CacheWriterException;
 +import com.gemstone.gemfire.cache.InterestResultPolicy;
 +import com.gemstone.gemfire.cache.Region;
 +import com.gemstone.gemfire.cache.RegionAttributes;
 +import com.gemstone.gemfire.cache.Scope;
  import com.gemstone.gemfire.cache.client.Pool;
  import com.gemstone.gemfire.cache.client.PoolManager;
  import com.gemstone.gemfire.cache.client.ServerConnectivityException;
  import com.gemstone.gemfire.cache.server.CacheServer;
  import com.gemstone.gemfire.distributed.DistributedSystem;
- import com.gemstone.gemfire.distributed.internal.DistributionConfig;
  import com.gemstone.gemfire.internal.AvailablePort;
 -import com.gemstone.gemfire.test.dunit.*;
 -
 -import java.util.ArrayList;
 -import java.util.List;
 -import java.util.Properties;
 -
 -import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.LOCATORS;
 -import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.MCAST_PORT;
 +import com.gemstone.gemfire.test.dunit.Assert;
 +import com.gemstone.gemfire.test.dunit.Host;
 +import com.gemstone.gemfire.test.dunit.IgnoredException;
 +import com.gemstone.gemfire.test.dunit.NetworkUtils;
 +import com.gemstone.gemfire.test.dunit.VM;
 +import com.gemstone.gemfire.test.dunit.Wait;
 +import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
 +import com.gemstone.gemfire.test.junit.categories.DistributedTest;
  
  /**
   * DUnit Test for use-cases of various {@link InterestResultPolicy} types.
@@@ -65,9 -49,9 +65,9 @@@ public class InterestResultPolicyDUnitT
    /** the cache instance for the test */
    private static Cache cache = null;
    
--  private int PORT   ; 
++  private int PORT;
  
--  private static final String REGION_NAME = "InterestResultPolicyDUnitTest_region" ;
++  private static final String REGION_NAME = InterestResultPolicyDUnitTest.class.getSimpleName() + "_region" ;
  
    private IgnoredException expectedEx;
  
@@@ -288,10 -279,11 +288,10 @@@
    public static void createClientCache(String host, Integer port) throws Exception
    {
      int PORT = port.intValue() ;
 -    InterestResultPolicyDUnitTest test = new InterestResultPolicyDUnitTest(
 -        "temp");
 +    InterestResultPolicyDUnitTest test = new InterestResultPolicyDUnitTest();
      Properties props = new Properties();
-     props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
-     props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+     props.setProperty(MCAST_PORT, "0");
+     props.setProperty(LOCATORS, "");
      cache = test.createCache(props);
      Pool p = PoolManager.createFactory()
        .addServer(host, port.intValue())

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelTestBase.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelTestBase.java
index 1c5a755,0d2c80a..201e559
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelTestBase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelTestBase.java
@@@ -16,25 -16,7 +16,26 @@@
   */
  package com.gemstone.gemfire.internal.cache.tier.sockets;
  
- import static org.junit.Assert.*;
 -import com.gemstone.gemfire.cache.*;
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
++import static com.gemstone.gemfire.test.dunit.Assert.*;
 +
 +import java.util.ArrayList;
 +import java.util.Iterator;
 +import java.util.List;
 +import java.util.Properties;
 +import java.util.Set;
 +
 +import org.junit.BeforeClass;
 +import org.junit.experimental.categories.Category;
 +
 +import com.gemstone.gemfire.cache.AttributesFactory;
 +import com.gemstone.gemfire.cache.Cache;
 +import com.gemstone.gemfire.cache.CacheFactory;
 +import com.gemstone.gemfire.cache.InterestResultPolicy;
 +import com.gemstone.gemfire.cache.MirrorType;
 +import com.gemstone.gemfire.cache.Region;
 +import com.gemstone.gemfire.cache.RegionAttributes;
 +import com.gemstone.gemfire.cache.Scope;
  import com.gemstone.gemfire.cache.client.PoolManager;
  import com.gemstone.gemfire.cache.client.internal.PoolImpl;
  import com.gemstone.gemfire.cache.client.internal.RegisterInterestTracker;
@@@ -58,26 -37,27 +59,23 @@@ import com.gemstone.gemfire.test.junit.
  
  /**
   * Tests Redundancy Level Functionality
 - * 
 - * 
   */
 -public class RedundancyLevelTestBase extends DistributedTestCase
 -{
 +@Category(DistributedTest.class)
 +public class RedundancyLevelTestBase extends JUnit4DistributedTestCase {
 +
++  protected static volatile boolean registerInterestCalled = false;
++  protected static volatile boolean makePrimaryCalled = false;
++
    static Cache cache = null;
  
    VM server0 = null;
--
    VM server1 = null;
--
    VM server2 = null;
--
    VM server3 = null;
  
    static int PORT1;
--
    static int PORT2;
--
    static int PORT3;
--
    static int PORT4;
  
    static String SERVER1;
@@@ -86,7 -66,7 +84,6 @@@
    static String SERVER4;
  
    static final String k1 = "k1";
--
    static final String k2 = "k2";
  
    static final String REGION_NAME = "RedundancyLevelTestBase_region";
@@@ -128,9 -112,9 +125,6 @@@
      CacheServerTestUtil.disableShufflingOfEndpoints();
    }
  
--  protected static volatile boolean registerInterestCalled = false;
--  protected static volatile boolean makePrimaryCalled = false;
--  
    public static void doPuts()
    {
      putEntriesK1andK2();
@@@ -150,7 -134,7 +144,7 @@@
        assertEquals(r1.getEntry(k2).getValue(), k2);
      }
      catch (Exception ex) {
--      //ignore
++      fail("putEntriesK1andK2 failed", ex);
      }
    }
  
@@@ -258,8 -242,8 +252,7 @@@
        Assert.fail("while setting verifyDispatcherIsNotAlive  ", ex);
      }
    }
--  
--  
++
    public static void verifyRedundantServersContain(final String server) {
      WaitCriterion wc = new WaitCriterion() {
        public boolean done() {
@@@ -474,7 -458,7 +467,7 @@@
        }
      }
      catch (Exception ex) {
--      fail("while setting verifyInterestRegistration  " + ex);
++      fail("while setting verifyInterestRegistration", ex);
      }
    }
  
@@@ -502,7 -486,7 +495,7 @@@
        bs.start();
      }
      catch (Exception ex) {
--      Assert.fail("while startServer()  ", ex);
++      Assert.fail("while startServer()", ex);
      }
    }
  
@@@ -517,19 -501,19 +510,13 @@@
    }
  
    
--  public static void createClientCache(String host, int port1, int port2, int port3,
--                                       int port4, int redundancy)
--    throws Exception {
++  public static void createClientCache(String host, int port1, int port2, int port3, int port4, int redundancy) throws Exception {
      createClientCache(host, port1, port2, port3,
                        port4,  redundancy, 3000, /* defaul socket timeout of 250 millisec*/
                        10 /*default retry interval*/);
    }
--  public static void createClientCache(String host, int port1, int port2, int port3,
--                                       int port4, int redundancy,
--                                       int socketReadTimeout,
--                                       int retryInterval) throws Exception
--  {
--    
++
++  public static void createClientCache(String host, int port1, int port2, int port3, int port4, int redundancy, int socketReadTimeout, int retryInterval) throws Exception {
      if(!FailOverDetectionByCCU)
      {
          oldBo = ClientServerObserverHolder.setInstance(new ClientServerObserverAdapter() {
@@@ -548,9 -532,9 +535,9 @@@
      }
      
      Properties props = new Properties();
-     props.setProperty("mcast-port", "0");
-     props.setProperty("locators", "");
+     props.setProperty(MCAST_PORT, "0");
+     props.setProperty(LOCATORS, "");
 -    new RedundancyLevelTestBase("temp").createCache(props);
 +    new RedundancyLevelTestBase().createCache(props);
  
      PoolImpl p = (PoolImpl)PoolManager.createFactory()
        .addServer(host, PORT1)

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegionCloseDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegionCloseDUnitTest.java
index fcd2e51,193e329..468d82a
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegionCloseDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegionCloseDUnitTest.java
@@@ -16,36 -16,20 +16,36 @@@
   */
  package com.gemstone.gemfire.internal.cache.tier.sockets;
  
 -import com.gemstone.gemfire.cache.*;
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
 +import static org.junit.Assert.*;
 +
 +import java.util.Iterator;
 +import java.util.Properties;
 +
 +import org.junit.Test;
 +import org.junit.experimental.categories.Category;
 +
 +import com.gemstone.gemfire.cache.AttributesFactory;
 +import com.gemstone.gemfire.cache.Cache;
 +import com.gemstone.gemfire.cache.CacheFactory;
 +import com.gemstone.gemfire.cache.DataPolicy;
 +import com.gemstone.gemfire.cache.Region;
 +import com.gemstone.gemfire.cache.RegionAttributes;
 +import com.gemstone.gemfire.cache.Scope;
  import com.gemstone.gemfire.cache.client.Pool;
  import com.gemstone.gemfire.cache.client.PoolManager;
  import com.gemstone.gemfire.cache.server.CacheServer;
  import com.gemstone.gemfire.distributed.DistributedSystem;
- import com.gemstone.gemfire.distributed.internal.DistributionConfig;
  import com.gemstone.gemfire.internal.AvailablePort;
  import com.gemstone.gemfire.internal.cache.CacheServerImpl;
 -import com.gemstone.gemfire.test.dunit.*;
 -
 -import java.util.Iterator;
 -import java.util.Properties;
 -
 -import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.LOCATORS;
 -import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.MCAST_PORT;
 +import com.gemstone.gemfire.test.dunit.Assert;
 +import com.gemstone.gemfire.test.dunit.Host;
 +import com.gemstone.gemfire.test.dunit.NetworkUtils;
 +import com.gemstone.gemfire.test.dunit.VM;
 +import com.gemstone.gemfire.test.dunit.Wait;
 +import com.gemstone.gemfire.test.dunit.WaitCriterion;
 +import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
 +import com.gemstone.gemfire.test.junit.categories.DistributedTest;
  
  /**
   * Test to verify that client side region.close() should unregister the client with the server.
@@@ -108,9 -93,9 +108,9 @@@ public class RegionCloseDUnitTest exten
    {
      int PORT1 = port1.intValue() ;
      Properties props = new Properties();
-     props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
-     props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+     props.setProperty(MCAST_PORT, "0");
+     props.setProperty(LOCATORS, "");
 -    new RegionCloseDUnitTest("temp").createCache(props);
 +    new RegionCloseDUnitTest().createCache(props);
      Pool p = PoolManager.createFactory()
        .addServer(host, PORT1)
        .setSubscriptionEnabled(true)

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestBeforeRegionCreationDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestBeforeRegionCreationDUnitTest.java
index f171ef5,7b8cd12..b390f51
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestBeforeRegionCreationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestBeforeRegionCreationDUnitTest.java
@@@ -16,22 -16,7 +16,24 @@@
   */
  package com.gemstone.gemfire.internal.cache.tier.sockets;
  
 -import com.gemstone.gemfire.cache.*;
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
 +import static org.junit.Assert.*;
 +
 +import java.util.Properties;
 +
++import org.junit.Ignore;
 +import org.junit.Test;
 +import org.junit.experimental.categories.Category;
 +
 +import com.gemstone.gemfire.cache.AttributesFactory;
 +import com.gemstone.gemfire.cache.Cache;
 +import com.gemstone.gemfire.cache.CacheException;
 +import com.gemstone.gemfire.cache.CacheFactory;
 +import com.gemstone.gemfire.cache.InterestResultPolicy;
 +import com.gemstone.gemfire.cache.MirrorType;
 +import com.gemstone.gemfire.cache.Region;
 +import com.gemstone.gemfire.cache.RegionAttributes;
 +import com.gemstone.gemfire.cache.Scope;
  import com.gemstone.gemfire.cache.client.Pool;
  import com.gemstone.gemfire.cache.client.PoolManager;
  import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
@@@ -80,14 -68,14 +82,10 @@@ public class RegisterInterestBeforeRegi
    /** Server2 port **/
    public static int PORT2;
    /** Region name **/
--  private static final String REGION_NAME = "RegisterInterestBeforeRegionCreationDUnitTest_Region";
++  private static final String REGION_NAME = RegisterInterestBeforeRegionCreationDUnitTest.class.getSimpleName() + "_Region";
    /** Server2 VM **/
    protected static Cache cache = null;
  
-   public RegisterInterestBeforeRegionCreationDUnitTest() {
-     super();
 -  public RegisterInterestBeforeRegionCreationDUnitTest(String name) {
 -    super(name);
--  }
--
    @Override
    public final void postSetUp() throws Exception {
      final Host host = Host.getHost(0);
@@@ -100,7 -88,7 +98,6 @@@
  
    /**
     * close the cache on all the vms
--   * @throws Exception
     */
    @Override
    public final void preTearDown() throws Exception {
@@@ -110,7 -98,7 +107,6 @@@
      server2.invoke(() -> RegisterInterestBeforeRegionCreationDUnitTest.closeCache());
    }
  
--  
    /**
     * - Creates the client-server configuration (which also registers interest)
     * - put on server1
@@@ -118,11 -106,11 +114,10 @@@
     * - create region on server2
     * - verify puts received on server2 via GII
     * - verify puts received on client2 via server2
--   * 
--   * @throws Exception
     */
--  public void YOGESH_testRegisterInterestHappeningBeforeRegionCreation() throws Exception
--  {
++  @Ignore("TODO:YOGESH: test is disabled")
++  @Test
++  public void testRegisterInterestHappeningBeforeRegionCreation() throws Exception {
      createClientServerConfigurationForClearTest();
      server1.invoke(putFromServer());
      client1.invoke(verifyIfAllPutsGot());
@@@ -130,10 -118,9 +125,6 @@@
      server2.invoke(verifyIfAllPutsGot());
      client2.invoke(verifyIfAllPutsGot());
    }
-   @Test
--  public void testDummyAsThereIsNoOtherTestInThisClass(){
--    //DO NOTHING
--  }
  
    private CacheSerializableRunnable putFromServer()
    {
@@@ -241,9 -228,9 +232,9 @@@
    {
      PORT1 = port1.intValue();
      Properties props = new Properties();
-     props.setProperty("mcast-port", "0");
-     props.setProperty("locators", "");
+     props.setProperty(MCAST_PORT, "0");
+     props.setProperty(LOCATORS, "");
 -    new RegisterInterestBeforeRegionCreationDUnitTest("temp").createCache(props);
 +    new RegisterInterestBeforeRegionCreationDUnitTest().createCache(props);
      Pool p = PoolManager.createFactory()
        .addServer(host, PORT1)
        .setSubscriptionEnabled(true)

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestKeysDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestKeysDUnitTest.java
index ee5a2eb,f22544b..a4a8d16
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestKeysDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestKeysDUnitTest.java
@@@ -16,37 -16,20 +16,37 @@@
   */
  package com.gemstone.gemfire.internal.cache.tier.sockets;
  
 -import com.gemstone.gemfire.cache.*;
 -import com.gemstone.gemfire.cache.client.Pool;
 -import com.gemstone.gemfire.cache.client.PoolManager;
 -import com.gemstone.gemfire.cache.server.CacheServer;
 -import com.gemstone.gemfire.distributed.DistributedSystem;
 -import com.gemstone.gemfire.internal.AvailablePort;
 -import com.gemstone.gemfire.test.dunit.*;
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
 +import static org.junit.Assert.*;
  
  import java.util.ArrayList;
  import java.util.List;
  import java.util.Properties;
  
 -import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.LOCATORS;
 -import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.MCAST_PORT;
 +import org.junit.Test;
 +import org.junit.experimental.categories.Category;
 +
 +import com.gemstone.gemfire.cache.AttributesFactory;
 +import com.gemstone.gemfire.cache.Cache;
 +import com.gemstone.gemfire.cache.CacheFactory;
 +import com.gemstone.gemfire.cache.DataPolicy;
 +import com.gemstone.gemfire.cache.InterestResultPolicy;
 +import com.gemstone.gemfire.cache.Region;
 +import com.gemstone.gemfire.cache.RegionAttributes;
 +import com.gemstone.gemfire.cache.Scope;
 +import com.gemstone.gemfire.cache.client.Pool;
 +import com.gemstone.gemfire.cache.client.PoolManager;
 +import com.gemstone.gemfire.cache.server.CacheServer;
 +import com.gemstone.gemfire.distributed.DistributedSystem;
- import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 +import com.gemstone.gemfire.internal.AvailablePort;
 +import com.gemstone.gemfire.test.dunit.Assert;
 +import com.gemstone.gemfire.test.dunit.Host;
 +import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 +import com.gemstone.gemfire.test.dunit.NetworkUtils;
 +import com.gemstone.gemfire.test.dunit.VM;
 +import com.gemstone.gemfire.test.dunit.Wait;
 +import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
 +import com.gemstone.gemfire.test.junit.categories.DistributedTest;
  
  /**
   * Test code copied from UpdatePropagationDUnitTest
@@@ -161,9 -146,9 +161,9 @@@ public class RegisterInterestKeysDUnitT
      int PORT1 = port1.intValue() ;
      int PORT2 = port2.intValue();
      Properties props = new Properties();
-     props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
-     props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+     props.setProperty(MCAST_PORT, "0");
+     props.setProperty(LOCATORS, "");
 -    new RegisterInterestKeysDUnitTest("temp").createCache(props);
 +    new RegisterInterestKeysDUnitTest().createCache(props);
      CacheServerTestUtil.disableShufflingOfEndpoints();
      Pool p;
      try {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ReliableMessagingDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ReliableMessagingDUnitTest.java
index 4bd8a99,f4a4fa5..e69d3d8
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ReliableMessagingDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ReliableMessagingDUnitTest.java
@@@ -16,22 -16,7 +16,23 @@@
   */
  package com.gemstone.gemfire.internal.cache.tier.sockets;
  
 -import com.gemstone.gemfire.cache.*;
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
 +import static org.junit.Assert.*;
 +
 +import java.util.Iterator;
 +import java.util.Map;
 +import java.util.Properties;
 +
 +import org.junit.Test;
 +import org.junit.experimental.categories.Category;
 +
 +import com.gemstone.gemfire.cache.AttributesFactory;
 +import com.gemstone.gemfire.cache.Cache;
 +import com.gemstone.gemfire.cache.CacheFactory;
 +import com.gemstone.gemfire.cache.DataPolicy;
 +import com.gemstone.gemfire.cache.Region;
 +import com.gemstone.gemfire.cache.RegionAttributes;
 +import com.gemstone.gemfire.cache.Scope;
  import com.gemstone.gemfire.cache.client.PoolManager;
  import com.gemstone.gemfire.cache.client.internal.PoolImpl;
  import com.gemstone.gemfire.cache.client.internal.QueueStateImpl.SequenceIdAndExpirationObject;
@@@ -87,15 -69,15 +87,8 @@@ public class ReliableMessagingDUnitTes
    static int CLIENT_ACK_INTERVAL = 5000;
  
    /** name of the test region */
--  private static final String REGION_NAME = "ReliableMessagingDUnitTest_Region";
++  private static final String REGION_NAME = ReliableMessagingDUnitTest.class.getSimpleName() + "_Region";
  
--  /**
--   * Constructor
--   */
-   public ReliableMessagingDUnitTest() {
-     super();
 -  public ReliableMessagingDUnitTest(String name) {
 -    super(name);
--  }
--  
    /*
     * Test verifies that client is sending periodic ack to the primary 
     * server for messages received.
@@@ -385,10 -365,10 +378,10 @@@
  
    public static void createClientCache(int port1, int port2) throws Exception
    {
 -    ReliableMessagingDUnitTest test = new ReliableMessagingDUnitTest("temp");
 +    ReliableMessagingDUnitTest test = new ReliableMessagingDUnitTest();
      Properties props = new Properties();
-     props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
-     props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+     props.setProperty(MCAST_PORT, "0");
+     props.setProperty(LOCATORS, "");
      cache = test.createCache(props);
      String host = NetworkUtils.getServerHostName(Host.getHost(0));
      PoolImpl p = (PoolImpl)PoolManager.createFactory()

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UnregisterInterestDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UnregisterInterestDUnitTest.java
index dcf7a7d,a5059f7..3638eaf
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UnregisterInterestDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UnregisterInterestDUnitTest.java
@@@ -19,20 -19,7 +19,21 @@@
   */
  package com.gemstone.gemfire.internal.cache.tier.sockets;
  
 -import com.gemstone.gemfire.cache.*;
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
 +import static org.junit.Assert.*;
 +
 +import java.util.ArrayList;
 +import java.util.Properties;
 +
 +import org.junit.Ignore;
 +import org.junit.Test;
 +import org.junit.experimental.categories.Category;
 +
 +import com.gemstone.gemfire.cache.CacheFactory;
 +import com.gemstone.gemfire.cache.GemFireCache;
 +import com.gemstone.gemfire.cache.Region;
 +import com.gemstone.gemfire.cache.RegionFactory;
 +import com.gemstone.gemfire.cache.RegionShortcut;
  import com.gemstone.gemfire.cache.client.ClientCacheFactory;
  import com.gemstone.gemfire.cache.client.ClientRegionFactory;
  import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
@@@ -61,7 -48,7 +62,7 @@@ public class UnregisterInterestDUnitTes
  
    private static GemFireCache cache = null;
  
--  private static final String regionname = "UnregisterInterestDUnitTest_region";
++  private static final String regionname = UnregisterInterestDUnitTest.class.getSimpleName() + "_region";
    private static final int all_keys = 0;
    private static final int list = 1;
    private static final int regex = 2;
@@@ -203,9 -192,8 +204,9 @@@
      client2.invoke(() -> UnregisterInterestDUnitTest.timedWaitForInvalidates(5));
    }
  
-   @Ignore("TODO")
 -  public void _testUnregisterInterestFilters() throws Exception {
 -    
++  @Ignore("TODO: never implemented")
 +  @Test
 +  public void testUnregisterInterestFilters() throws Exception {
    }
  
    public static void checkRIArtifacts(Integer interestType, Integer value, Integer valueInv) {
@@@ -315,10 -303,10 +316,10 @@@
    }
  
    public static Integer createCacheAndStartServer() throws Exception {
 -    DistributedSystem ds = new UnregisterInterestDUnitTest("UnregisterInterestDUnitTest").getSystem();
 +    DistributedSystem ds = new UnregisterInterestDUnitTest().getSystem();
      ds.disconnect();
      Properties props = new Properties();
-     props.setProperty("locators", "localhost["+DistributedTestUtils.getDUnitLocatorPort()+"]");
+     props.setProperty(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
      CacheFactory cf = new CacheFactory(props);
      cache = cf.create();
      RegionFactory rf = ((GemFireCacheImpl)cache).createRegionFactory(RegionShortcut.REPLICATE);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UpdatePropagationDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UpdatePropagationDUnitTest.java
index 9048d19,54d993f..055a424
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UpdatePropagationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UpdatePropagationDUnitTest.java
@@@ -16,28 -16,7 +16,30 @@@
   */
  package com.gemstone.gemfire.internal.cache.tier.sockets;
  
- import static org.junit.Assert.*;
 -import com.gemstone.gemfire.cache.*;
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
++import static junit.framework.TestCase.assertNotNull;
++import static org.junit.Assert.assertEquals;
 +
 +import java.io.IOException;
 +import java.util.ArrayList;
 +import java.util.Iterator;
 +import java.util.List;
 +import java.util.Properties;
 +import java.util.Set;
 +import java.util.concurrent.TimeUnit;
 +
 +import com.jayway.awaitility.Awaitility;
 +import org.junit.Test;
 +import org.junit.experimental.categories.Category;
 +
 +import com.gemstone.gemfire.cache.AttributesFactory;
 +import com.gemstone.gemfire.cache.Cache;
 +import com.gemstone.gemfire.cache.CacheException;
 +import com.gemstone.gemfire.cache.DataPolicy;
 +import com.gemstone.gemfire.cache.EntryEvent;
 +import com.gemstone.gemfire.cache.Region;
 +import com.gemstone.gemfire.cache.RegionAttributes;
 +import com.gemstone.gemfire.cache.Scope;
  import com.gemstone.gemfire.cache.client.ClientCache;
  import com.gemstone.gemfire.cache.client.ClientCacheFactory;
  import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
@@@ -227,10 -225,11 +229,10 @@@ public class UpdatePropagationDUnitTes
      }
    }
  
 -  public void createClientCache(String host, Integer port1 , Integer port2 ) throws Exception
 -  {
 +  private void createClientCache(String host, Integer port1 , Integer port2 ) throws Exception {
      ClientCache cache;
      try {
-       System.setProperty("gemfire.PoolImpl.DISABLE_RANDOM", "true");
+       System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "PoolImpl.DISABLE_RANDOM", "true");
        int PORT1 = port1.intValue() ;
        int PORT2 = port2.intValue();
        Properties props = new Properties();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/VerifyUpdatesFromNonInterestEndPointDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/VerifyUpdatesFromNonInterestEndPointDUnitTest.java
index 50366cc,897cd87..53267b5
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/VerifyUpdatesFromNonInterestEndPointDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/VerifyUpdatesFromNonInterestEndPointDUnitTest.java
@@@ -16,20 -16,7 +16,21 @@@
   */
  package com.gemstone.gemfire.internal.cache.tier.sockets;
  
 -import com.gemstone.gemfire.cache.*;
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
 +import static org.junit.Assert.*;
 +
 +import java.util.Properties;
 +
 +import org.junit.Test;
 +import org.junit.experimental.categories.Category;
 +
 +import com.gemstone.gemfire.cache.AttributesFactory;
 +import com.gemstone.gemfire.cache.Cache;
 +import com.gemstone.gemfire.cache.CacheFactory;
 +import com.gemstone.gemfire.cache.DataPolicy;
 +import com.gemstone.gemfire.cache.Region;
 +import com.gemstone.gemfire.cache.RegionAttributes;
 +import com.gemstone.gemfire.cache.Scope;
  import com.gemstone.gemfire.cache.client.Pool;
  import com.gemstone.gemfire.cache.client.PoolManager;
  import com.gemstone.gemfire.cache.client.internal.Connection;
@@@ -54,19 -39,20 +54,17 @@@ import com.gemstone.gemfire.test.junit.
   * Ensure that client 1 has registered interest list on server 2.
   * Now Client does a put on server1 .
   * The Client should not receive callback of his own put.
 -
 - *
   */
 -public class VerifyUpdatesFromNonInterestEndPointDUnitTest extends DistributedTestCase
 -{
 -  VM vm0 = null;
 -
 -  VM vm1 = null;
 +@Category(DistributedTest.class)
 +public class VerifyUpdatesFromNonInterestEndPointDUnitTest extends JUnit4DistributedTestCase {
  
-   VM vm0 = null;
- 
-   VM vm1 = null;
- 
--  VM vm2 = null;
++  private VM vm0 = null;
++  private VM vm1 = null;
++  private VM vm2 = null;
  
    private int PORT1;
    private int PORT2;
--  private static final String REGION_NAME = "VerifyUpdatesFromNonInterestEndPointDUnitTest_region";
++  private static final String REGION_NAME = VerifyUpdatesFromNonInterestEndPointDUnitTest.class.getSimpleName() + "_region";
  
    private static Cache cache = null;
  
@@@ -101,8 -87,7 +99,7 @@@
      return cache;
    }
  
--
 +  @Test
    public void testVerifyUpdatesFromNonInterestEndPoint()
    {
      vm2.invoke(() -> VerifyUpdatesFromNonInterestEndPointDUnitTest.createEntries());
@@@ -116,7 -101,7 +113,6 @@@
      vm2.invoke(() -> VerifyUpdatesFromNonInterestEndPointDUnitTest.verifyPut());
    }
  
--
    public static void acquireConnectionsAndPut(Integer port)
    {
      try {
@@@ -163,10 -148,10 +159,10 @@@
  
    public static void createClientCache(String host, Integer port1, Integer port2) throws Exception
    {
 -    VerifyUpdatesFromNonInterestEndPointDUnitTest test = new VerifyUpdatesFromNonInterestEndPointDUnitTest("temp");
 +    VerifyUpdatesFromNonInterestEndPointDUnitTest test = new VerifyUpdatesFromNonInterestEndPointDUnitTest();
      Properties props = new Properties();
-     props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
-     props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+     props.setProperty(MCAST_PORT, "0");
+     props.setProperty(LOCATORS, "");
      cache = test.createCache(props);
      Pool p;
      try {
@@@ -209,7 -194,7 +205,6 @@@
      return new Integer(server1.getPort());
    }
  
--
    public static void registerKey()
    {
      try {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/AsyncEventQueueTestBase.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/AsyncEventQueueTestBase.java
index 7a73529,1e48447..cfde00a
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/AsyncEventQueueTestBase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/AsyncEventQueueTestBase.java
@@@ -16,47 -16,9 +16,48 @@@
   */
  package com.gemstone.gemfire.internal.cache.wan;
  
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
 +import static org.junit.Assert.*;
 +
 +import java.io.DataInput;
 +import java.io.DataOutput;
 +import java.io.File;
 +import java.io.IOException;
 +import java.net.InetSocketAddress;
 +import java.util.ArrayList;
 +import java.util.Arrays;
 +import java.util.Collection;
 +import java.util.Collections;
 +import java.util.HashMap;
 +import java.util.HashSet;
 +import java.util.Iterator;
 +import java.util.List;
 +import java.util.Map;
 +import java.util.Properties;
 +import java.util.Set;
 +import java.util.StringTokenizer;
 +import java.util.concurrent.ConcurrentHashMap;
 +import java.util.concurrent.atomic.AtomicInteger;
 +
 +import org.junit.experimental.categories.Category;
 +
  import com.gemstone.gemfire.DataSerializable;
  import com.gemstone.gemfire.DataSerializer;
 -import com.gemstone.gemfire.cache.*;
 +import com.gemstone.gemfire.cache.AttributesFactory;
 +import com.gemstone.gemfire.cache.Cache;
 +import com.gemstone.gemfire.cache.CacheClosedException;
 +import com.gemstone.gemfire.cache.CacheFactory;
 +import com.gemstone.gemfire.cache.CacheLoader;
 +import com.gemstone.gemfire.cache.DataPolicy;
 +import com.gemstone.gemfire.cache.Declarable;
 +import com.gemstone.gemfire.cache.DiskStore;
 +import com.gemstone.gemfire.cache.DiskStoreFactory;
 +import com.gemstone.gemfire.cache.EntryEvent;
 +import com.gemstone.gemfire.cache.LoaderHelper;
 +import com.gemstone.gemfire.cache.PartitionAttributesFactory;
 +import com.gemstone.gemfire.cache.Region;
 +import com.gemstone.gemfire.cache.RegionFactory;
 +import com.gemstone.gemfire.cache.Scope;
  import com.gemstone.gemfire.cache.asyncqueue.AsyncEvent;
  import com.gemstone.gemfire.cache.asyncqueue.AsyncEventListener;
  import com.gemstone.gemfire.cache.asyncqueue.AsyncEventQueue;
@@@ -70,15 -32,9 +71,14 @@@ import com.gemstone.gemfire.cache.contr
  import com.gemstone.gemfire.cache.control.ResourceManager;
  import com.gemstone.gemfire.cache.persistence.PartitionOfflineException;
  import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
 -import com.gemstone.gemfire.cache.wan.*;
 +import com.gemstone.gemfire.cache.wan.GatewayEventFilter;
 +import com.gemstone.gemfire.cache.wan.GatewayEventSubstitutionFilter;
 +import com.gemstone.gemfire.cache.wan.GatewayReceiver;
 +import com.gemstone.gemfire.cache.wan.GatewayReceiverFactory;
 +import com.gemstone.gemfire.cache.wan.GatewaySender;
  import com.gemstone.gemfire.cache.wan.GatewaySender.OrderPolicy;
 +import com.gemstone.gemfire.cache.wan.GatewaySenderFactory;
  import com.gemstone.gemfire.distributed.Locator;
- import com.gemstone.gemfire.distributed.internal.DistributionConfig;
  import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
  import com.gemstone.gemfire.internal.AvailablePortHelper;
  import com.gemstone.gemfire.internal.cache.ForceReattemptException;
@@@ -161,31 -118,30 +161,30 @@@ public class AsyncEventQueueTestBase ex
      if (Locator.hasLocator()) {
        Locator.getLocator().stop();
      }
 -    AsyncEventQueueTestBase test = new AsyncEventQueueTestBase(getTestMethodName());
 +    AsyncEventQueueTestBase test = new AsyncEventQueueTestBase();
      int port = AvailablePortHelper.getRandomAvailablePortForDUnitSite();
      Properties props = test.getDistributedSystemProperties();
-     props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
-     //props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "" + dsId);
-     props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + port
+     props.setProperty(MCAST_PORT, "0");
+     //props.setProperty(DISTRIBUTED_SYSTEM_ID, "" + dsId);
+     props.setProperty(LOCATORS, "localhost[" + port
          + "]");
-     props.setProperty(DistributionConfig.START_LOCATOR_NAME, "localhost["
+     props.setProperty(START_LOCATOR, "localhost["
          + port + "],server=true,peer=true,hostname-for-clients=localhost");
      test.getSystem(props);
      return port;
    }
  
    public static Integer createFirstRemoteLocator(int dsId, int remoteLocPort) {
 -    AsyncEventQueueTestBase test = new AsyncEventQueueTestBase(getTestMethodName());
 +    AsyncEventQueueTestBase test = new AsyncEventQueueTestBase();
      int port = AvailablePortHelper.getRandomAvailablePortForDUnitSite();
      Properties props = test.getDistributedSystemProperties();
-     props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
-     props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "" + dsId);
-     props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + port
+     props.setProperty(MCAST_PORT, "0");
+     props.setProperty(DISTRIBUTED_SYSTEM_ID, "" + dsId);
+     props.setProperty(LOCATORS, "localhost[" + port
          + "]");
-     props.setProperty(DistributionConfig.START_LOCATOR_NAME, "localhost["
+     props.setProperty(START_LOCATOR, "localhost["
          + port + "],server=true,peer=true,hostname-for-clients=localhost");
-     props.setProperty(DistributionConfig.REMOTE_LOCATORS_NAME, "localhost["
-         + remoteLocPort + "]");
+     props.setProperty(REMOTE_LOCATORS, "localhost[" + remoteLocPort + "]");
      test.getSystem(props);
      return port;
    }
@@@ -695,19 -651,19 +694,19 @@@
    }
  
    protected static void createCache(Integer locPort) {
 -    AsyncEventQueueTestBase test = new AsyncEventQueueTestBase(getTestMethodName());
 +    AsyncEventQueueTestBase test = new AsyncEventQueueTestBase();
      Properties props = test.getDistributedSystemProperties();
-     props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
-     props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + locPort
+     props.setProperty(MCAST_PORT, "0");
+     props.setProperty(LOCATORS, "localhost[" + locPort
          + "]");
      InternalDistributedSystem ds = test.getSystem(props);
      cache = CacheFactory.create(ds);
    }
  
    public static void createCacheWithoutLocator(Integer mCastPort) {
 -    AsyncEventQueueTestBase test = new AsyncEventQueueTestBase(getTestMethodName());
 +    AsyncEventQueueTestBase test = new AsyncEventQueueTestBase();
      Properties props = test.getDistributedSystemProperties();
-     props.setProperty(DistributionConfig.MCAST_PORT_NAME, "" + mCastPort);
+     props.setProperty(MCAST_PORT, "" + mCastPort);
      InternalDistributedSystem ds = test.getSystem(props);
      cache = CacheFactory.create(ds);
    }
@@@ -916,10 -872,10 +915,10 @@@
    }
  
    public static int createReceiver(int locPort) {
 -    AsyncEventQueueTestBase test = new AsyncEventQueueTestBase(getTestMethodName());
 +    AsyncEventQueueTestBase test = new AsyncEventQueueTestBase();
      Properties props = test.getDistributedSystemProperties();
-     props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
-     props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + locPort
+     props.setProperty(MCAST_PORT, "0");
+     props.setProperty(LOCATORS, "localhost[" + locPort
          + "]");
  
      InternalDistributedSystem ds = test.getSystem(props);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventListenerDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventListenerDUnitTest.java
index 460f69f,5ef8909..3a1d901
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventListenerDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventListenerDUnitTest.java
@@@ -16,27 -16,6 +16,18 @@@
   */
  package com.gemstone.gemfire.internal.cache.wan.asyncqueue;
  
- import org.junit.experimental.categories.Category;
- import org.junit.Test;
- 
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
 +import static org.junit.Assert.*;
 +
- import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
- import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
- import com.gemstone.gemfire.test.junit.categories.DistributedTest;
- 
- import java.io.Serializable;
 +import java.util.HashMap;
 +import java.util.Map;
 +import java.util.Properties;
 +import java.util.Set;
 +
- import com.gemstone.gemfire.cache.Declarable;
- import com.gemstone.gemfire.cache.EntryEvent;
- import com.gemstone.gemfire.cache.wan.GatewayEventSubstitutionFilter;
 +import org.junit.Ignore;
++import org.junit.Test;
 +import org.junit.experimental.categories.Category;
 +
  import com.gemstone.gemfire.cache.CacheFactory;
  import com.gemstone.gemfire.cache.asyncqueue.AsyncEventQueueFactory;
  import com.gemstone.gemfire.cache.asyncqueue.internal.AsyncEventQueueFactoryImpl;
@@@ -49,26 -27,33 +39,25 @@@ import com.gemstone.gemfire.internal.ca
  import com.gemstone.gemfire.test.dunit.LogWriterUtils;
  import com.gemstone.gemfire.test.dunit.SerializableRunnableIF;
  import com.gemstone.gemfire.test.dunit.Wait;
++import com.gemstone.gemfire.test.junit.categories.DistributedTest;
  import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 -import org.junit.Ignore;
 -import org.junit.experimental.categories.Category;
 -
 -import java.util.HashMap;
 -import java.util.Map;
 -import java.util.Properties;
 -import java.util.Set;
 -
 -import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.MCAST_PORT;
  
 +@Category(DistributedTest.class)
  public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase {
  
--  private static final long serialVersionUID = 1L;
--
 -  public AsyncEventListenerDUnitTest(String name) {
 -    super(name);
 +  public AsyncEventListenerDUnitTest() {
 +    super();
    }
  
    /**
     * Test to verify that AsyncEventQueue can not be created when null listener
     * is passed.
     */
 +  @Test
    public void testCreateAsyncEventQueueWithNullListener() {
 -    AsyncEventQueueTestBase test = new AsyncEventQueueTestBase(getTestMethodName());
 +    AsyncEventQueueTestBase test = new AsyncEventQueueTestBase();
      Properties props = new Properties();
-     props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+     props.setProperty(MCAST_PORT, "0");
      InternalDistributedSystem ds = test.getSystem(props);
      cache = CacheFactory.create(ds);
  
@@@ -155,39 -138,38 +144,39 @@@
     * Added to reproduce defect #50366: 
     * NullPointerException with AsyncEventQueue#size() when number of dispatchers is more than 1
     */
 +  @Test
    public void testConcurrentSerialAsyncEventQueueSize() {
--	Integer lnPort = (Integer)vm0.invoke(() -> AsyncEventQueueTestBase.createFirstLocatorWithDSId( 1 ));
++    Integer lnPort = (Integer)vm0.invoke(() -> AsyncEventQueueTestBase.createFirstLocatorWithDSId( 1 ));
  
--	vm1.invoke(createCacheRunnable(lnPort));
--	vm2.invoke(createCacheRunnable(lnPort));
--	vm3.invoke(createCacheRunnable(lnPort));
--	vm4.invoke(createCacheRunnable(lnPort));
++    vm1.invoke(createCacheRunnable(lnPort));
++    vm2.invoke(createCacheRunnable(lnPort));
++    vm3.invoke(createCacheRunnable(lnPort));
++    vm4.invoke(createCacheRunnable(lnPort));
  
      vm1.invoke(() -> AsyncEventQueueTestBase.createConcurrentAsyncEventQueue( "ln",
          false, 100, 150, true, false, null, false, 2, OrderPolicy.KEY ));
      vm2.invoke(() -> AsyncEventQueueTestBase.createConcurrentAsyncEventQueue( "ln",
          false, 100, 150, true, false, null, false, 2, OrderPolicy.KEY ));
  
--	vm1.invoke(createReplicatedRegionRunnable());
--	vm2.invoke(createReplicatedRegionRunnable());
--	vm3.invoke(createReplicatedRegionRunnable());
--	vm4.invoke(createReplicatedRegionRunnable());
++    vm1.invoke(createReplicatedRegionRunnable());
++    vm2.invoke(createReplicatedRegionRunnable());
++    vm3.invoke(createReplicatedRegionRunnable());
++    vm4.invoke(createReplicatedRegionRunnable());
  
--	vm1
--	  .invoke(pauseAsyncEventQueueRunnable());
--	vm2
--	  .invoke(pauseAsyncEventQueueRunnable());
++    vm1
++      .invoke(pauseAsyncEventQueueRunnable());
++    vm2
++      .invoke(pauseAsyncEventQueueRunnable());
  
--	Wait.pause(1000);// pause at least for the batchTimeInterval
++    Wait.pause(1000);// pause at least for the batchTimeInterval
  
--	vm1.invoke(() -> AsyncEventQueueTestBase.doPuts( getTestMethodName() + "_RR",
--		1000 ));
++    vm1.invoke(() -> AsyncEventQueueTestBase.doPuts( getTestMethodName() + "_RR",
++      1000 ));
  
--	int vm1size = (Integer)vm1.invoke(() -> AsyncEventQueueTestBase.getAsyncEventQueueSize( "ln" ));
--	int vm2size = (Integer)vm2.invoke(() -> AsyncEventQueueTestBase.getAsyncEventQueueSize( "ln" ));
--	assertEquals("Size of AsyncEventQueue is incorrect", 1000, vm1size);
--	assertEquals("Size of AsyncEventQueue is incorrect", 1000, vm2size);
++    int vm1size = (Integer)vm1.invoke(() -> AsyncEventQueueTestBase.getAsyncEventQueueSize( "ln" ));
++    int vm2size = (Integer)vm2.invoke(() -> AsyncEventQueueTestBase.getAsyncEventQueueSize( "ln" ));
++    assertEquals("Size of AsyncEventQueue is incorrect", 1000, vm1size);
++    assertEquals("Size of AsyncEventQueue is incorrect", 1000, vm2size);
    }
    
    /**
@@@ -196,8 -178,7 +185,7 @@@
     * Region: Replicated WAN: Serial Region persistence enabled: false Async
     * channel persistence enabled: false
     */
--
 +  @Test
    public void testReplicatedSerialAsyncEventQueue() {
      Integer lnPort = (Integer)vm0.invoke(() -> AsyncEventQueueTestBase.createFirstLocatorWithDSId( 1 ));
  
@@@ -272,8 -252,7 +260,7 @@@
     * Error is thrown from AsyncEventListener implementation while processing the batch.
     * Added to test the fix done for defect #45152.
     */
--
 +  @Test
    public void testReplicatedSerialAsyncEventQueue_ExceptionScenario() {
      Integer lnPort = (Integer)vm0.invoke(() -> AsyncEventQueueTestBase.createFirstLocatorWithDSId( 1 ));
  
@@@ -403,8 -381,8 +390,6 @@@
      vm4.invoke(() -> AsyncEventQueueTestBase.validateAsyncEventListener( "ln", 0 ));// secondary
    }
  
--  
--
    /**
     * Test configuration::
     * 
@@@ -413,8 -391,8 +398,9 @@@
     * 
     * Note: The test doesn't create a locator but uses MCAST port instead.
     */
--  @Ignore("Disabled until I can sort out the hydra dependencies - see bug 52214")
--  public void DISABLED_testReplicatedSerialAsyncEventQueueWithoutLocator() {
++  @Ignore("TODO: Disabled until I can sort out the hydra dependencies - see bug 52214")
++  @Test
++  public void testReplicatedSerialAsyncEventQueueWithoutLocator() {
      int mPort = AvailablePortHelper.getRandomAvailablePortForDUnitSite();
      vm1.invoke(() -> AsyncEventQueueTestBase.createCacheWithoutLocator( mPort ));
      vm2.invoke(() -> AsyncEventQueueTestBase.createCacheWithoutLocator( mPort ));
@@@ -488,9 -465,9 +474,9 @@@
     * 
     * There is only one vm in the site and that vm is restarted
     */
--
--  @Ignore("Disabled for 52351")
--  public void DISABLED_testReplicatedSerialAsyncEventQueueWithPeristenceEnabled_Restart() {
++  @Ignore("TODO: Disabled for 52351")
++  @Test
++  public void testReplicatedSerialAsyncEventQueueWithPeristenceEnabled_Restart() {
      Integer lnPort = (Integer)vm0.invoke(() -> AsyncEventQueueTestBase.createFirstLocatorWithDSId( 1 ));
  
      vm1.invoke(createCacheRunnable(lnPort));
@@@ -529,8 -506,8 +515,9 @@@
     * 
     * There are 3 VMs in the site and the VM with primary sender is shut down.
     */
--  @Ignore("Disabled for 52351")
--  public void DISABLED_testReplicatedSerialAsyncEventQueueWithPeristenceEnabled_Restart2() {
++  @Ignore("TODO: Disabled for 52351")
++  @Test
++  public void testReplicatedSerialAsyncEventQueueWithPeristenceEnabled_Restart2() {
      Integer lnPort = (Integer)vm0.invoke(() -> AsyncEventQueueTestBase.createFirstLocatorWithDSId( 1 ));
  
      vm1.invoke(createCacheRunnable(lnPort));
@@@ -1361,12 -1320,12 +1348,13 @@@
      assertEquals(vm1size + vm2size + vm3size + vm4size, 256);
    }
    
--/**
-- * Test case to test possibleDuplicates. vm1 & vm2 are hosting the PR. vm2 is
-- * killed so the buckets hosted by it are shifted to vm1.
-- */
--  @Ignore("Disabled for 52349")
--  public void DISABLED_testParallelAsyncEventQueueHA_Scenario1() {
++  /**
++   * Test case to test possibleDuplicates. vm1 & vm2 are hosting the PR. vm2 is
++   * killed so the buckets hosted by it are shifted to vm1.
++   */
++  @Ignore("TODO: Disabled for 52349")
++  @Test
++  public void testParallelAsyncEventQueueHA_Scenario1() {
      Integer lnPort = (Integer)vm0.invoke(() -> AsyncEventQueueTestBase.createFirstLocatorWithDSId( 1 ));
      vm1.invoke(createCacheRunnable(lnPort));
      vm2.invoke(createCacheRunnable(lnPort));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventQueueValidationsJUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventQueueValidationsJUnitTest.java
index a3a154d,2a7e57f..e8ecdc9
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventQueueValidationsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventQueueValidationsJUnitTest.java
@@@ -19,11 -19,6 +19,12 @@@
   */
  package com.gemstone.gemfire.internal.cache.wan.asyncqueue;
  
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
 +import static org.junit.Assert.*;
 +
 +import org.junit.Test;
 +import org.junit.experimental.categories.Category;
 +
  import com.gemstone.gemfire.cache.Cache;
  import com.gemstone.gemfire.cache.CacheFactory;
  import com.gemstone.gemfire.cache.asyncqueue.AsyncEventQueueFactory;
@@@ -63,8 -67,9 +64,8 @@@ public class AsyncEventQueueValidations
        fact.create("id", new com.gemstone.gemfire.internal.cache.wan.MyAsyncEventListener());
        fail("Expected AsyncEventQueueConfigurationException.");
      } catch (AsyncEventQueueConfigurationException e) {
-         assertTrue(e.getMessage()
-             .contains("can not be created with OrderPolicy"));
+       assertTrue(e.getMessage()
+           .contains("can not be created with OrderPolicy"));
      }
    }
 -
  }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheConfigDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheConfigDUnitTest.java
index 3393fc5,26832db..1092721
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheConfigDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheConfigDUnitTest.java
@@@ -16,38 -16,25 +16,36 @@@
   */
  package com.gemstone.gemfire.internal.compression;
  
- import org.junit.experimental.categories.Category;
- import org.junit.Test;
- 
 -import com.gemstone.gemfire.cache.Region;
 -import com.gemstone.gemfire.cache30.CacheTestCase;
 -import com.gemstone.gemfire.compression.Compressor;
 -import com.gemstone.gemfire.compression.SnappyCompressor;
 -import com.gemstone.gemfire.internal.cache.LocalRegion;
 -import com.gemstone.gemfire.test.dunit.*;
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
 +import static org.junit.Assert.*;
  
- import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
- import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
- import com.gemstone.gemfire.test.junit.categories.DistributedTest;
- 
  import java.io.File;
  import java.io.IOException;
  import java.io.PrintStream;
  import java.util.Properties;
  
 -import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
++import org.junit.Test;
++import org.junit.experimental.categories.Category;
++
 +import com.gemstone.gemfire.cache.Region;
- import com.gemstone.gemfire.cache30.CacheTestCase;
 +import com.gemstone.gemfire.compression.Compressor;
 +import com.gemstone.gemfire.compression.SnappyCompressor;
 +import com.gemstone.gemfire.internal.cache.LocalRegion;
++import com.gemstone.gemfire.test.dunit.Host;
 +import com.gemstone.gemfire.test.dunit.IgnoredException;
 +import com.gemstone.gemfire.test.dunit.LogWriterUtils;
- import com.gemstone.gemfire.test.dunit.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.cache.internal.JUnit4CacheTestCase;
++import com.gemstone.gemfire.test.junit.categories.DistributedTest;
  
  /**
   * Tests configured and badly configured cache.xml files with regards to compression.
-- * 
   */
 -public class CompressionCacheConfigDUnitTest extends CacheTestCase {
 +@Category(DistributedTest.class)
 +public class CompressionCacheConfigDUnitTest extends JUnit4CacheTestCase {
++
    /**
     * The name of our test region.
     */
@@@ -64,23 -51,22 +62,14 @@@
    private static final String BAD_COMPRESSOR = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE cache PUBLIC \"-//GemStone Systems, Inc.//GemFire Declarative Cache 8.0//EN\" \"http://www.gemstone.com/dtd/cache8_0.dtd\">\n<cache lock-lease=\"120\" lock-timeout=\"60\" search-timeout=\"300\" is-server=\"true\" copy-on-read=\"false\">\n<region name=\"compressedRegion\">\n<region-attributes data-policy=\"replicate\" cloning-enabled=\"true\">\n<compressor>\n<class-name>BAD_COMPRESSOR</class-name>\n</compressor>\n</region-attributes>\n</region>\n</cache>";
  
    /**
--   * Create a new CompressionCacheConfigDUnitTest.
--   * @param name test name.
--   */
-   public CompressionCacheConfigDUnitTest() {
-     super();
 -  public CompressionCacheConfigDUnitTest(String name) {
 -    super(name);
--  }
--
--  /**
     * Asserts that a member is successfully initialized with a compressed region when
     * a compressor is included in the region attributes.
--   * @throws Exception
     */
 +  @Test
    public void testCreateCacheWithGoodCompressor() throws Exception {
      try {
        SnappyCompressor.getDefaultInstance();
--    } catch (Throwable t) {
++    } catch (Throwable t) { // TODO: use junit Assume
        // Not a supported OS
        return;
      }
@@@ -94,9 -80,8 +83,8 @@@
    /**
     * Asserts that member initialization fails when an unrecognized compressor is declared in the
     * cache.xml.
--   * @throws Exception
     */
 +  @Test
    public void testCreateCacheWithBadCompressor() throws Exception {
      IgnoredException.addIgnoredException("Unable to load class BAD_COMPRESSOR");
      File cacheXml = createCacheXml(BAD_COMPRESSOR);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheListenerOffHeapDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheListenerOffHeapDUnitTest.java
index 564d882,e42a801..ddf814e
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheListenerOffHeapDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheListenerOffHeapDUnitTest.java
@@@ -16,38 -16,30 +16,21 @@@
   */
  package com.gemstone.gemfire.internal.compression;
  
- import org.junit.experimental.categories.Category;
- import org.junit.Test;
- 
- import static org.junit.Assert.*;
- 
- import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
- import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
- import com.gemstone.gemfire.test.junit.categories.DistributedTest;
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
 +
 +import java.util.Properties;
 +
++import org.junit.experimental.categories.Category;
++
  import com.gemstone.gemfire.compression.SnappyCompressor;
--import com.gemstone.gemfire.distributed.internal.DistributionConfig;
  import com.gemstone.gemfire.internal.cache.OffHeapTestUtil;
  import com.gemstone.gemfire.test.dunit.Invoke;
  import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 -
 -import java.util.Properties;
 -
 -import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
++import com.gemstone.gemfire.test.junit.categories.DistributedTest;
  
  @SuppressWarnings("serial")
 -public class CompressionCacheListenerOffHeapDUnitTest extends
 -    CompressionCacheListenerDUnitTest {
 -
 -  public CompressionCacheListenerOffHeapDUnitTest(String name) {
 -    super(name);
 -  }
 -  
 -  public static void caseSetUp() {
 -    System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "trackOffHeapRefCounts", "true");
 -  }
 -  public static void caseTearDown() {
 -    System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + "trackOffHeapRefCounts");
 -  }
 +@Category(DistributedTest.class)
- public class CompressionCacheListenerOffHeapDUnitTest extends
-     CompressionCacheListenerDUnitTest {
- 
-   public CompressionCacheListenerOffHeapDUnitTest() {
-     super();
-   }
-   
-   public static void caseSetUp() {
-     System.setProperty("gemfire.trackOffHeapRefCounts", "true");
-   }
-   public static void caseTearDown() {
-     System.clearProperty("gemfire.trackOffHeapRefCounts");
-   }
++public class CompressionCacheListenerOffHeapDUnitTest extends CompressionCacheListenerDUnitTest {
  
    @Override
    public final void preTearDownAssertions() throws Exception {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionOperationsDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionOperationsDUnitTest.java
index f8ff937,dedf3eb..1f56859
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionOperationsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionOperationsDUnitTest.java
@@@ -16,23 -16,14 +16,18 @@@
   */
  package com.gemstone.gemfire.internal.compression;
  
- import org.junit.experimental.categories.Category;
- import org.junit.Test;
- 
 +import static org.junit.Assert.*;
 +
- import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
- import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
- import com.gemstone.gemfire.test.junit.categories.DistributedTest;
- 
  import java.util.Collection;
  import java.util.HashMap;
  import java.util.HashSet;
  import java.util.Map;
  
++import org.junit.Test;
++import org.junit.experimental.categories.Category;
++
  import com.gemstone.gemfire.cache.DataPolicy;
  import com.gemstone.gemfire.cache.Region;
--import com.gemstone.gemfire.cache30.CacheTestCase;
  import com.gemstone.gemfire.compression.Compressor;
  import com.gemstone.gemfire.compression.SnappyCompressor;
  import com.gemstone.gemfire.internal.cache.CachedDeserializableFactory;
@@@ -41,13 -32,12 +36,14 @@@ import com.gemstone.gemfire.test.dunit.
  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.cache.internal.JUnit4CacheTestCase;
++import com.gemstone.gemfire.test.junit.categories.DistributedTest;
  
  /**
   * Tests basic region operations with compression enabled.
-- * 
   */
 -public class CompressionRegionOperationsDUnitTest extends CacheTestCase {
 +@Category(DistributedTest.class)
 +public class CompressionRegionOperationsDUnitTest extends JUnit4CacheTestCase {
    /**
     * The name of our test region.
     */
@@@ -129,14 -119,14 +125,6 @@@
      getAllCollection.add(KEY_3);
    }
    
--  /**
--   * Creates a new CompressionRegionOperationsDUnitTest.
--   * @param name a test name.
--   */
-   public CompressionRegionOperationsDUnitTest() {
-     super();
 -  public CompressionRegionOperationsDUnitTest(String name) {
 -    super(name);
--  }
--
    @Override
    public final void postSetUp() throws Exception {
      createRegion();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionOperationsOffHeapDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionOperationsOffHeapDUnitTest.java
index 3c8bf91,7e15b12..16398a7
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionOperationsOffHeapDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionOperationsOffHeapDUnitTest.java
@@@ -16,32 -16,22 +16,22 @@@
   */
  package com.gemstone.gemfire.internal.compression;
  
- import org.junit.experimental.categories.Category;
- import org.junit.Test;
- 
- import static org.junit.Assert.*;
- 
- import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
- import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
- import com.gemstone.gemfire.test.junit.categories.DistributedTest;
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
 +
 +import java.util.Properties;
 +
++import org.junit.experimental.categories.Category;
++
  import com.gemstone.gemfire.compression.Compressor;
  import com.gemstone.gemfire.compression.SnappyCompressor;
- import com.gemstone.gemfire.distributed.internal.DistributionConfig;
  import com.gemstone.gemfire.internal.cache.OffHeapTestUtil;
  import com.gemstone.gemfire.test.dunit.Invoke;
  import com.gemstone.gemfire.test.dunit.SerializableRunnable;
++import com.gemstone.gemfire.test.junit.categories.DistributedTest;
  
 -import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
 -import java.util.Properties;
 +@Category(DistributedTest.class)
- public class CompressionRegionOperationsOffHeapDUnitTest extends
-     CompressionRegionOperationsDUnitTest {
++public class CompressionRegionOperationsOffHeapDUnitTest extends CompressionRegionOperationsDUnitTest {
  
-   public CompressionRegionOperationsOffHeapDUnitTest() {
-     super();
 -public class CompressionRegionOperationsOffHeapDUnitTest extends
 -    CompressionRegionOperationsDUnitTest {
 -
 -  public CompressionRegionOperationsOffHeapDUnitTest(String name) {
 -    super(name);
--  }
--  
    @Override
    public final void preTearDownAssertions() throws Exception {
      SerializableRunnable checkOrphans = new SerializableRunnable() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionStatsDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionStatsDUnitTest.java
index 0f7be5e,9f6dbf5..2f99ffd
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionStatsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionStatsDUnitTest.java
@@@ -42,10 -33,9 +42,10 @@@ import com.gemstone.gemfire.test.dunit.
  
  /**
   * Tests compression statistics.
-  * @since 8.0
+  * @since GemFire 8.0
   */
 -public class CompressionStatsDUnitTest extends CacheTestCase {
 +@Category(DistributedTest.class)
 +public class CompressionStatsDUnitTest extends JUnit4CacheTestCase {
    /**
     * The name of our test region.
     */

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/AbstractPoolCacheJUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/AbstractPoolCacheJUnitTest.java
index c6206b6,01343f5..abcca13
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/AbstractPoolCacheJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/AbstractPoolCacheJUnitTest.java
@@@ -22,14 -22,18 +22,15 @@@
   */
  package com.gemstone.gemfire.internal.datasource;
  
+ import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
 +import static org.junit.Assert.*;
  
 -import com.gemstone.gemfire.cache.Cache;
 -import com.gemstone.gemfire.cache.CacheFactory;
 -import com.gemstone.gemfire.distributed.DistributedSystem;
 -import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 -import com.gemstone.gemfire.util.test.TestUtil;
 -import org.junit.After;
 -import org.junit.Before;
 -import org.junit.Test;
 -import org.junit.experimental.categories.Category;
 -
 +import java.sql.Connection;
 +import java.util.ArrayList;
 +import java.util.HashMap;
 +import java.util.List;
 +import java.util.Map;
 +import java.util.Properties;
  import javax.naming.Context;
  import javax.sql.PooledConnection;
  import javax.sql.XAConnection;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/DataSourceFactoryJUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/DataSourceFactoryJUnitTest.java
index 9755e25,8b6243d..768b0c0
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/DataSourceFactoryJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/DataSourceFactoryJUnitTest.java
@@@ -16,12 -16,11 +16,13 @@@
   */
  package com.gemstone.gemfire.internal.datasource;
  
 -import com.gemstone.gemfire.cache.Cache;
 -import com.gemstone.gemfire.cache.CacheFactory;
 -import com.gemstone.gemfire.distributed.DistributedSystem;
 -import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 -import com.gemstone.gemfire.util.test.TestUtil;
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
 +import static org.junit.Assert.*;
 +
 +import java.sql.Connection;
 +import java.util.Properties;
 +import javax.naming.Context;
 +
  import org.junit.After;
  import org.junit.Before;
  import org.junit.Test;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/ExceptionJUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/jta/ExceptionJUnitTest.java
index c73b5e8,c056a5d..216e4b0
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/ExceptionJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/ExceptionJUnitTest.java
@@@ -16,25 -16,16 +16,24 @@@
   */
  package com.gemstone.gemfire.internal.jta;
  
 -import com.gemstone.gemfire.distributed.DistributedSystem;
 -import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 -import org.junit.*;
 -import org.junit.experimental.categories.Category;
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
 +import static org.junit.Assert.*;
  
 -import javax.transaction.*;
  import java.util.Properties;
 +import javax.transaction.NotSupportedException;
 +import javax.transaction.Status;
 +import javax.transaction.SystemException;
 +import javax.transaction.Transaction;
 +import javax.transaction.UserTransaction;
  
- import org.junit.After;
 -import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.MCAST_PORT;
 -import static org.junit.Assert.fail;
 +import org.junit.AfterClass;
 +import org.junit.Before;
 +import org.junit.BeforeClass;
 +import org.junit.Test;
 +import org.junit.experimental.categories.Category;
 +
 +import com.gemstone.gemfire.distributed.DistributedSystem;
- import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 +import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
  
  /**
   * Check if the correct expectations are being thrown when they are supposed to.


Mime
View raw message