geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [51/62] [abbrv] incubator-geode git commit: Merge remote-tracking branch 'origin/develop' into feature/GEODE-837
Date Tue, 07 Jun 2016 20:55:06 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/FunctionServiceStatsDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/FunctionServiceStatsDUnitTest.java
index 9b4182c,c6af7e6..f0a4604
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/FunctionServiceStatsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/FunctionServiceStatsDUnitTest.java
@@@ -16,40 -16,10 +16,35 @@@
   */
  package com.gemstone.gemfire.internal.cache.execute;
  
- import org.junit.experimental.categories.Category;
- import org.junit.Test;
- 
 -import com.gemstone.gemfire.cache.*;
++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.IOException;
 +import java.util.ArrayList;
- 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 org.junit.Test;
++import org.junit.experimental.categories.Category;
++
 +import com.gemstone.gemfire.cache.AttributesFactory;
 +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.execute.*;
 +import com.gemstone.gemfire.cache.execute.Execution;
 +import com.gemstone.gemfire.cache.execute.Function;
 +import com.gemstone.gemfire.cache.execute.FunctionAdapter;
 +import com.gemstone.gemfire.cache.execute.FunctionContext;
 +import com.gemstone.gemfire.cache.execute.FunctionException;
 +import com.gemstone.gemfire.cache.execute.FunctionService;
 +import com.gemstone.gemfire.cache.execute.ResultCollector;
  import com.gemstone.gemfire.cache.server.CacheServer;
  import com.gemstone.gemfire.distributed.DistributedMember;
  import com.gemstone.gemfire.distributed.DistributedSystem;
@@@ -61,23 -30,22 +55,22 @@@ import com.gemstone.gemfire.internal.ca
  import com.gemstone.gemfire.internal.cache.PartitionedRegionTestHelper;
  import com.gemstone.gemfire.internal.cache.functions.TestFunction;
  import com.gemstone.gemfire.internal.cache.tier.sockets.CacheServerTestUtil;
 -import com.gemstone.gemfire.test.dunit.*;
 -
 -import java.io.IOException;
 -import java.util.*;
 -
 -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.LogWriterUtils;
 +import com.gemstone.gemfire.test.dunit.SerializableCallable;
 +import com.gemstone.gemfire.test.dunit.VM;
 +import com.gemstone.gemfire.test.dunit.Wait;
 +import com.gemstone.gemfire.test.dunit.WaitCriterion;
++import com.gemstone.gemfire.test.junit.categories.DistributedTest;
  
--/*
++/**
   * This is DUnite Test to test the Function Execution stats under various
-- * scenarion like Cliet-Server with Region/without Region, P2P with partitioned
++ * scenarios like Client-Server with Region/without Region, P2P with partitioned
   * Region/Distributed Region,member Execution
-- * 
   */
--
 -public class FunctionServiceStatsDUnitTest extends PRClientServerTestBase{
 +@Category(DistributedTest.class)
- public class FunctionServiceStatsDUnitTest extends PRClientServerTestBase{
++public class FunctionServiceStatsDUnitTest extends PRClientServerTestBase {
    
    static Boolean isByName = null;
    
@@@ -118,16 -86,16 +111,6 @@@
    static int resultReceived_TestFunctionException  = 0;
    static int noOfExecutionExceptions_TestFunctionException  = 0;
    
--//  static Object[] VM0Stats;
--//  static Object[] VM1Stats;
--//  static Object[] VM2Stats;
--//  static Object[] VM3tats;
--  
--  
-   public FunctionServiceStatsDUnitTest() {
-     super();
 -  public FunctionServiceStatsDUnitTest(String name) {
 -    super(name);
--  }
--
    @Override
    protected final void postSetUpPRClientServerTestBase() throws Exception {
      //Make sure stats to linger from a previous test
@@@ -195,7 -163,7 +178,7 @@@
      }
    }
  
--  /*
++  /**
     * 1-client 3-Servers 
     * Function : TEST_FUNCTION2 
     * Function : TEST_FUNCTION3
@@@ -365,7 -332,7 +348,7 @@@
      server3.invoke(checkStatsOnServer);
    }
  
--  /*
++  /**
     * 1-client 3-Servers
     * server1 : Replicate
     * server2 : Replicate
@@@ -574,9 -540,9 +557,8 @@@
      };
      client.invoke(checkStatsOnClient);
    }
--  
--  
--  /*
++
++  /**
     * Execution of the function on server using the name of the function
     * TEST_FUNCTION1
     * TEST_FUNCTION5
@@@ -768,17 -732,16 +750,15 @@@
      datastore0.invoke(closeDistributedSystem);
      datastore1.invoke(closeDistributedSystem);
      datastore2.invoke(closeDistributedSystem);
--}
++  }
  
--  
    /**
     * Ensure that the execution is happening all the PR as a whole
     * 
     * Function Execution will not take place on accessor, accessor will onlu receive the resultsReceived.
     * On datastore, no of function execution calls should be equal to the no of function execution calls from the accessor.
--   * @throws Exception
     */
 +  @Test
    public void testP2PPartitionedRegionsFunctionExecutionStats()
        throws Exception {
      final String rName = getUniqueName();
@@@ -969,8 -932,7 +949,7 @@@
     * Test the function execution statistics in case of the distributed Region P2P
     * DataStore0 is with Empty datapolicy 
     */
--  
 +  @Test
    public void testP2PDistributedRegionFunctionExecutionStats() {
      final String rName = getUniqueName();
      Host host = Host.getHost(0);
@@@ -1085,11 -1047,10 +1064,8 @@@
     * Execution should happen on all other members too. so the no of function
     * execution calls and no of function executions completed should be equal tio
     * the no of functions from member 1
--   * 
--   * @throws Exception
     */
--  
 +  @Test
    public void testP2PMembersFunctionExecutionStats()
        throws Exception {
      Host host = Host.getHost(0);
@@@ -1243,10 -1204,9 +1219,8 @@@
     * 
     * Function throws the Exception,
     * The check is added to for the no of function execution execption in datatostore1
--   *  
--   * @throws Exception
     */
 +  @Test
    public void testFunctionExecutionExceptionStatsOnAllNodesPRegion()
        throws Exception {
      final String rName = getUniqueName();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/MemberFunctionExecutionDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/MemberFunctionExecutionDUnitTest.java
index 6900cf7,f8d4937..6b35900
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/MemberFunctionExecutionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/MemberFunctionExecutionDUnitTest.java
@@@ -16,37 -16,9 +16,32 @@@
   */
  package com.gemstone.gemfire.internal.cache.execute;
  
- 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.lang.reflect.Constructor;
 +import java.util.ArrayList;
 +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.concurrent.TimeUnit;
 +
- import com.gemstone.gemfire.cache.CacheClosedException;
++import org.junit.Test;
++import org.junit.experimental.categories.Category;
++
  import com.gemstone.gemfire.cache.CacheFactory;
 -import com.gemstone.gemfire.cache.execute.*;
 -import com.gemstone.gemfire.cache30.CacheTestCase;
 +import com.gemstone.gemfire.cache.execute.Execution;
 +import com.gemstone.gemfire.cache.execute.Function;
 +import com.gemstone.gemfire.cache.execute.FunctionAdapter;
 +import com.gemstone.gemfire.cache.execute.FunctionContext;
 +import com.gemstone.gemfire.cache.execute.FunctionException;
 +import com.gemstone.gemfire.cache.execute.FunctionInvocationTargetException;
 +import com.gemstone.gemfire.cache.execute.FunctionService;
 +import com.gemstone.gemfire.cache.execute.ResultCollector;
- import com.gemstone.gemfire.cache30.CacheTestCase;
  import com.gemstone.gemfire.distributed.DistributedMember;
  import com.gemstone.gemfire.distributed.DistributedSystem;
  import com.gemstone.gemfire.distributed.internal.DM;
@@@ -57,15 -29,15 +52,18 @@@ import com.gemstone.gemfire.i18n.LogWri
  import com.gemstone.gemfire.internal.ClassBuilder;
  import com.gemstone.gemfire.internal.cache.functions.TestFunction;
  import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 -import com.gemstone.gemfire.test.dunit.*;
 +import com.gemstone.gemfire.test.dunit.Assert;
 +import com.gemstone.gemfire.test.dunit.Host;
 +import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 +import com.gemstone.gemfire.test.dunit.SerializableCallable;
 +import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 +import com.gemstone.gemfire.test.dunit.VM;
++import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
++import com.gemstone.gemfire.test.junit.categories.DistributedTest;
  
 -import java.lang.reflect.Constructor;
 -import java.util.*;
 -import java.util.concurrent.TimeUnit;
 -
 -import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.MCAST_PORT;
 +@Category(DistributedTest.class)
 +public class MemberFunctionExecutionDUnitTest extends JUnit4CacheTestCase {
+ 
 -public class MemberFunctionExecutionDUnitTest extends CacheTestCase {
    private static final String TEST_FUNCTION6 = TestFunction.TEST_FUNCTION6;
    private static final String TEST_FUNCTION5 = TestFunction.TEST_FUNCTION5;
  
@@@ -78,10 -50,10 +76,6 @@@
    
    static InternalDistributedSystem ds = null;
  
-   public MemberFunctionExecutionDUnitTest() {
-     super();
 -  public MemberFunctionExecutionDUnitTest(String name) {
 -    super(name);
--  }
--  
    @Override
    public final void postSetUp() throws Exception {
      Host host = Host.getHost(0);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/OnGroupsFunctionExecutionDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/OnGroupsFunctionExecutionDUnitTest.java
index c8d3e5e,b2821cd..b84f55f
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/OnGroupsFunctionExecutionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/OnGroupsFunctionExecutionDUnitTest.java
@@@ -16,14 -16,7 +16,15 @@@
   */
  package com.gemstone.gemfire.internal.cache.execute;
  
+ import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
 +import static org.junit.Assert.*;
 +
 +import java.util.ArrayList;
 +import java.util.Collections;
 +import java.util.Properties;
 +
 +import org.junit.Test;
 +import org.junit.experimental.categories.Category;
  
  import com.gemstone.gemfire.cache.Cache;
  import com.gemstone.gemfire.cache.CacheClosedException;
@@@ -178,8 -167,8 +179,7 @@@ public class OnGroupsFunctionExecutionD
          int count = 0;
          synchronized (OnGroupsFunction.class) {
          	count = f.invocationCount;
--        //    f.invocationCount = 0;
--		}
++		    }
          
          return count;
        }
@@@ -193,7 -182,7 +193,7 @@@
          OnGroupsFunction f = (OnGroupsFunction) FunctionService.getFunction(OnGroupsFunction.Id);
          synchronized (OnGroupsFunction.class) {
          	f.invocationCount = 0;
--		}
++		    }
          return null;
        }
      });

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionDUnitTest.java
index eb8e505,4da6fbd..569fec7
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionDUnitTest.java
@@@ -16,22 -16,13 +16,12 @@@
   */
  package com.gemstone.gemfire.internal.cache.execute;
  
- 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.io.DataInput;
  import java.io.DataOutput;
--import java.io.EOFException;
  import java.io.IOException;
  import java.io.Serializable;
--import java.net.SocketException;
--import java.net.SocketTimeoutException;
  import java.rmi.ServerException;
  import java.util.ArrayList;
  import java.util.Collections;
@@@ -41,6 -32,6 +31,9 @@@ import java.util.Iterator
  import java.util.List;
  import java.util.Set;
  
++import org.junit.Test;
++import org.junit.experimental.categories.Category;
++
  import com.gemstone.gemfire.DataSerializable;
  import com.gemstone.gemfire.cache.AttributesFactory;
  import com.gemstone.gemfire.cache.CacheClosedException;
@@@ -66,15 -57,14 +59,16 @@@ import com.gemstone.gemfire.internal.ca
  import com.gemstone.gemfire.internal.cache.tier.sockets.CacheServerTestUtil;
  import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
  import com.gemstone.gemfire.test.dunit.Assert;
--import com.gemstone.gemfire.test.dunit.AsyncInvocation;
  import com.gemstone.gemfire.test.dunit.IgnoredException;
  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;
++import com.gemstone.gemfire.test.junit.categories.DistributedTest;
  
 +@Category(DistributedTest.class)
  public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServerTestBase {
++
    private static final String TEST_FUNCTION7 = TestFunction.TEST_FUNCTION7;
  
    private static final String TEST_FUNCTION2 = TestFunction.TEST_FUNCTION2;
@@@ -87,11 -77,10 +81,7 @@@
  
    static final String retryRegionName = "RetryDataRegion";
    
-   public PRClientServerRegionFunctionExecutionDUnitTest() {
-     super();
 -  public PRClientServerRegionFunctionExecutionDUnitTest(String name) {
 -    super(name);
--  }
--
 +  @Test
    public void test_Bug_43126_Function_Not_Registered()
        throws InterruptedException {
      createScenario();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionFailoverDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionFailoverDUnitTest.java
index 4584ecb,df7e9ae..f490e63
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionFailoverDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionFailoverDUnitTest.java
@@@ -16,27 -16,7 +16,24 @@@
   */
  package com.gemstone.gemfire.internal.cache.execute;
  
- import org.junit.experimental.categories.Category;
- import org.junit.Test;
- 
 -import com.gemstone.gemfire.cache.*;
++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.util.ArrayList;
 +import java.util.List;
 +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.CacheFactory;
 +import com.gemstone.gemfire.cache.DataPolicy;
 +import com.gemstone.gemfire.cache.PartitionAttributesFactory;
 +import com.gemstone.gemfire.cache.Region;
 +import com.gemstone.gemfire.cache.RegionAttributes;
  import com.gemstone.gemfire.cache.client.Pool;
  import com.gemstone.gemfire.cache.client.PoolManager;
  import com.gemstone.gemfire.cache.execute.Execution;
@@@ -53,29 -32,27 +49,25 @@@ import com.gemstone.gemfire.internal.ca
  import com.gemstone.gemfire.internal.cache.LocalRegion;
  import com.gemstone.gemfire.internal.cache.functions.TestFunction;
  import com.gemstone.gemfire.internal.cache.tier.sockets.CacheServerTestUtil;
 -import com.gemstone.gemfire.test.dunit.*;
 -
 -import java.io.File;
 -import java.io.IOException;
 -import java.util.ArrayList;
 -import java.util.List;
 -import java.util.Properties;
 -
 -import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
 -
 -public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
 -    PRClientServerTestBase {
 +import com.gemstone.gemfire.test.dunit.Assert;
 +import com.gemstone.gemfire.test.dunit.AsyncInvocation;
 +import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
 +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.NetworkUtils;
 +import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 +import com.gemstone.gemfire.test.dunit.ThreadUtils;
 +import com.gemstone.gemfire.test.dunit.VM;
++import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 +
 +@Category(DistributedTest.class)
- public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
-     PRClientServerTestBase {
++public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends PRClientServerTestBase {
  
    private static Locator locator = null;
    
    private static Region region = null;
    
-   public PRClientServerRegionFunctionExecutionFailoverDUnitTest() {
-     super();
 -  public PRClientServerRegionFunctionExecutionFailoverDUnitTest(String name) {
 -    super(name);
--  }
--
    @Override
    protected void postSetUpPRClientServerTestBase() throws Exception {
      IgnoredException.addIgnoredException("Connection reset");
@@@ -414,11 -381,13 +406,11 @@@
      locator.stop();
    }
    
 -  public static int createServerWithLocator(String locator, boolean isAccessor, ArrayList commonAttrs) {
 -    CacheTestCase test = new PRClientServerRegionFunctionExecutionFailoverDUnitTest(
 -    "PRClientServerRegionFunctionExecutionFailoverDUnitTest");
 +  public int createServerWithLocator(String locator, boolean isAccessor, ArrayList commonAttrs) {
      Properties props = new Properties();
      props = new Properties();
-     props.setProperty("locators", locator);
+     props.setProperty(LOCATORS, locator);
 -    DistributedSystem ds = test.getSystem(props);
 +    DistributedSystem ds = getSystem(props);
      cache = new CacheFactory(props).create(ds);
      
      CacheServer server = cache.addCacheServer();
@@@ -448,12 -417,14 +440,12 @@@
      return port;
    }
    
 -  public static void createClientWithLocator(String host, int port0) {
 +  public void createClientWithLocator(String host, int port0) {
      Properties props = new Properties();
      props = new Properties();
-     props.setProperty("mcast-port", "0");
-     props.setProperty("locators", "");
+     props.setProperty(MCAST_PORT, "0");
+     props.setProperty(LOCATORS, "");
 -    CacheTestCase test = new PRClientServerRegionFunctionExecutionFailoverDUnitTest(
 -        "PRClientServerRegionFunctionExecutionFailoverDUnitTest");
 -    DistributedSystem ds = test.getSystem(props);
 +    DistributedSystem ds = getSystem(props);
      cache = CacheFactory.create(ds);
      assertNotNull(cache);
      CacheServerTestUtil.disableShufflingOfEndpoints();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerTestBase.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerTestBase.java
index 1725e98,c6164de..ce7ab16
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerTestBase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerTestBase.java
@@@ -16,36 -16,7 +16,30 @@@
   */
  package com.gemstone.gemfire.internal.cache.execute;
  
- import org.junit.experimental.categories.Category;
- import org.junit.Test;
- 
 -import com.gemstone.gemfire.cache.*;
++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.IOException;
 +import java.io.Serializable;
 +import java.util.ArrayList;
 +import java.util.Collection;
 +import java.util.HashSet;
 +import java.util.Iterator;
 +import java.util.List;
 +import java.util.Properties;
 +import java.util.Set;
 +
 +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.EntryOperation;
 +import com.gemstone.gemfire.cache.PartitionAttributes;
 +import com.gemstone.gemfire.cache.PartitionAttributesFactory;
 +import com.gemstone.gemfire.cache.PartitionResolver;
 +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.PoolImpl;
@@@ -54,23 -24,21 +47,21 @@@ import com.gemstone.gemfire.cache.execu
  import com.gemstone.gemfire.cache.execute.FunctionService;
  import com.gemstone.gemfire.cache.execute.ResultCollector;
  import com.gemstone.gemfire.cache.server.CacheServer;
- import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
--import com.gemstone.gemfire.cache30.CacheTestCase;
  import com.gemstone.gemfire.distributed.DistributedSystem;
  import com.gemstone.gemfire.internal.AvailablePort;
  import com.gemstone.gemfire.internal.cache.functions.TestFunction;
  import com.gemstone.gemfire.internal.cache.tier.sockets.CacheServerTestUtil;
 -import com.gemstone.gemfire.test.dunit.*;
 -
 -import java.io.IOException;
 -import java.io.Serializable;
 -import java.util.*;
 -
 -import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.LOCATORS;
 -import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.MCAST_PORT;
 -
 -public class PRClientServerTestBase extends CacheTestCase {
 +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.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.test.dunit.cache.internal.JUnit4CacheTestCase;
 +
- @Category(DistributedTest.class)
 +public class PRClientServerTestBase extends JUnit4CacheTestCase {
  
    protected VM server1 = null;
  

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRCustomPartitioningDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRCustomPartitioningDUnitTest.java
index 1d9962b,9462fab..3450e2b
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRCustomPartitioningDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRCustomPartitioningDUnitTest.java
@@@ -60,13 -31,14 +40,15 @@@ import com.gemstone.gemfire.internal.ca
  import com.gemstone.gemfire.internal.cache.PartitionedRegionDUnitTestCase;
  import com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore.BucketVisitor;
  import com.gemstone.gemfire.internal.cache.xmlcache.Declarable2;
- 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.SerializableRunnable;
- import com.gemstone.gemfire.test.dunit.VM;
+ import com.gemstone.gemfire.test.dunit.*;
+ 
+ import java.io.DataInput;
+ import java.io.DataOutput;
+ import java.io.IOException;
+ import java.io.Serializable;
+ import java.util.*;
  
 +@Category(DistributedTest.class)
  public class PRCustomPartitioningDUnitTest extends
      PartitionedRegionDUnitTestCase {
  
@@@ -96,9 -68,9 +78,9 @@@
  
    public static void createCacheInVm() throws Exception{
      Properties props = new Properties();
-     //props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+     //props.setProperty(DistributionConfig.SystemConfigurationProperties.MCAST_PORT, "0");
      //props.setProperty(DistributionConfig.LOCATORS_NAME, "");
 -    new PRCustomPartitioningDUnitTest("temp").createCache(props);
 +    new PRCustomPartitioningDUnitTest().createCache(props);
    }
    
    private void createCache(Properties props) throws Exception

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionDUnitTest.java
index 2906c22,00f66f4..1223690
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionDUnitTest.java
@@@ -16,47 -16,9 +16,44 @@@
   */
  package com.gemstone.gemfire.internal.cache.execute;
  
- import org.junit.experimental.categories.Category;
- import org.junit.Test;
- 
 -import com.gemstone.gemfire.cache.*;
++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.ArrayList;
 +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.concurrent.TimeUnit;
 +
++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.EntryOperation;
 +import com.gemstone.gemfire.cache.PartitionAttributes;
 +import com.gemstone.gemfire.cache.PartitionAttributesFactory;
 +import com.gemstone.gemfire.cache.PartitionResolver;
 +import com.gemstone.gemfire.cache.Region;
- import com.gemstone.gemfire.cache.RegionAttributes;
  import com.gemstone.gemfire.cache.Region.Entry;
 -import com.gemstone.gemfire.cache.execute.*;
++import com.gemstone.gemfire.cache.RegionAttributes;
 +import com.gemstone.gemfire.cache.execute.Execution;
 +import com.gemstone.gemfire.cache.execute.Function;
 +import com.gemstone.gemfire.cache.execute.FunctionAdapter;
 +import com.gemstone.gemfire.cache.execute.FunctionContext;
 +import com.gemstone.gemfire.cache.execute.FunctionException;
 +import com.gemstone.gemfire.cache.execute.FunctionService;
 +import com.gemstone.gemfire.cache.execute.RegionFunctionContext;
 +import com.gemstone.gemfire.cache.execute.ResultCollector;
  import com.gemstone.gemfire.cache.partition.PartitionRegionHelper;
  import com.gemstone.gemfire.distributed.DistributedSystem;
  import com.gemstone.gemfire.distributed.internal.DM;
@@@ -75,36 -31,31 +72,38 @@@ import com.gemstone.gemfire.internal.ca
  import com.gemstone.gemfire.internal.cache.execute.data.OrderId;
  import com.gemstone.gemfire.internal.cache.functions.TestFunction;
  import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 -import com.gemstone.gemfire.test.dunit.*;
 -
 -import java.io.Serializable;
 -import java.util.*;
 -import java.util.concurrent.TimeUnit;
 -
 -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.AsyncInvocation;
 +import com.gemstone.gemfire.test.dunit.Host;
 +import com.gemstone.gemfire.test.dunit.IgnoredException;
 +import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 +import com.gemstone.gemfire.test.dunit.SerializableCallable;
 +import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 +import com.gemstone.gemfire.test.dunit.ThreadUtils;
 +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.junit.categories.DistributedTest;
 +
 +@Category(DistributedTest.class)
- public class PRFunctionExecutionDUnitTest extends
-     PartitionedRegionDUnitTestCase {
++public class PRFunctionExecutionDUnitTest extends PartitionedRegionDUnitTestCase {
+ 
 -public class PRFunctionExecutionDUnitTest extends
 -    PartitionedRegionDUnitTestCase {
    private static final String TEST_FUNCTION7 = TestFunction.TEST_FUNCTION7;
    private static final String TEST_FUNCTION2 = TestFunction.TEST_FUNCTION2;
++
    static Cache cache = null;
    static String regionName = null;
--  private static final long serialVersionUID = 1L;
  
-   public PRFunctionExecutionDUnitTest() {
-     super();
 -  public PRFunctionExecutionDUnitTest(String name) {
 -    super(name);
++  @Override
++  public final void postTearDown() throws Exception {
++    cache = null;
++    regionName = null;
    }
  
    /**
     * Test to validate that the function execution is successful on PR with Loner Distributed System
--   * @throws Exception
     */
 +  @Test
    public void testFunctionExecution() throws Exception {
      final String rName = getUniqueName();
      Host host = Host.getHost(0);
@@@ -206,10 -156,9 +205,8 @@@
    /**
     * Test remote execution by a pure accessor which doesn't have the function
     * factory present.
--   *
--   * @throws Exception
     */
 +  @Test
    public void testRemoteSingleKeyExecution_byName() throws Exception {
      final String rName = getUniqueName();
      Host host = Host.getHost(0);
@@@ -295,12 -244,11 +292,9 @@@
     * FunctionInvocationTargetException. As this is the case of HA then system
     * should retry the function execution. After 5th attempt function will send
     * Boolean as last result. factory present.
--   *
--   * @throws Exception
     */
 -  public void testLocalSingleKeyExecution_byName_FunctionInvocationTargetException()
 -      throws Exception {
 +  @Test
-   public void testLocalSingleKeyExecution_byName_FunctionInvocationTargetException()
-       throws Exception {
++  public void testLocalSingleKeyExecution_byName_FunctionInvocationTargetException() throws Exception {
      final String rName = getUniqueName();
      Host host = Host.getHost(0);
      final VM datastore = host.getVM(3);
@@@ -341,19 -289,18 +335,15 @@@
            }
          });
    }
-- 
-- 
++
    /**
     * Test remote execution by a pure accessor which doesn't have the function
     * factory present.Function throws the FunctionInvocationTargetException. As
     * this is the case of HA then system should retry the function execution.
     * After 5th attempt function will send Boolean as last result.
--   *
--   * @throws Exception
     */
 -  public void testRemoteSingleKeyExecution_byName_FunctionInvocationTargetException()
 -      throws Exception {
 +  @Test
-   public void testRemoteSingleKeyExecution_byName_FunctionInvocationTargetException()
-       throws Exception {
++  public void testRemoteSingleKeyExecution_byName_FunctionInvocationTargetException() throws Exception {
      final String rName = getUniqueName();
      Host host = Host.getHost(0);
      final VM accessor = host.getVM(2);
@@@ -420,10 -367,9 +410,8 @@@
    /**
     * Test remote execution by a pure accessor which doesn't have the function
     * factory present.
--   *
--   * @throws Exception
     */
 +  @Test
    public void testRemoteSingleKeyExecution_byInstance() throws Exception {
      final String rName = getUniqueName();
      Host host = Host.getHost(0);
@@@ -508,10 -454,9 +496,8 @@@
  
    /**
     * Test remote execution of inline function by a pure accessor
--   *
--   * @throws Exception
     */
 +  @Test
    public void testRemoteSingleKeyExecution_byInlineFunction() throws Exception {
      final String rName = getUniqueName();
      Host host = Host.getHost(0);
@@@ -589,10 -534,9 +575,8 @@@
     * function factory present.
     * ResultCollector = DefaultResultCollector
     * haveResults = true;
--   *
--   * @throws Exception
     */
 +  @Test
    public void testRemoteMultiKeyExecution_byName() throws Exception {
      final String rName = getUniqueName();
      Host host = Host.getHost(0);
@@@ -689,8 -633,7 +673,7 @@@
      assertEquals(Boolean.TRUE, o);
    }
  
--  
 +  @Test
    public void testRemoteMultiKeyExecution_BucketMoved() throws Exception {
      final String rName = getUniqueName();
      Host host = Host.getHost(0);
@@@ -839,20 -781,19 +822,15 @@@
      assertEquals(2, l.size());
      
    }
--  
--  
--  
++
    /**
     * Test remote execution by a pure accessor which doesn't have the function
     * factory present.Function throws the FunctionInvocationTargetException. As
     * this is the case of HA then system should retry the function execution.
     * After 5th attempt function will send Boolean as last result.
--   *
--   * @throws Exception
     */
 -  public void testRemoteMultipleKeyExecution_byName_FunctionInvocationTargetException()
 -      throws Exception {
 +  @Test
-   public void testRemoteMultipleKeyExecution_byName_FunctionInvocationTargetException()
-       throws Exception {
++  public void testRemoteMultipleKeyExecution_byName_FunctionInvocationTargetException() throws Exception {
      final String rName = getUniqueName();
      Host host = Host.getHost(0);
      final VM accessor = host.getVM(3);
@@@ -1142,10 -1081,9 +1120,8 @@@
     * Test multi-key remote execution of inline function by a pure accessor
     * ResultCollector = DefaultResultCollector
     * haveResults = true;
--   *
--   * @throws Exception
     */
 +  @Test
    public void testRemoteMultiKeyExecution_byInlineFunction() throws Exception {
      final String rName = getUniqueName();
      Host host = Host.getHost(0);
@@@ -1230,15 -1168,14 +1206,14 @@@
      });
      assertEquals(Boolean.TRUE, o);
    }
++
    /**
     * Test multi-key remote execution by a pure accessor which doesn't have the
     * function factory present.
     * ResultCollector = CustomResultCollector
     * haveResults = true;
--   *
--   * @throws Exception
     */
 +  @Test
    public void testRemoteMultiKeyExecutionWithCollector_byName() throws Exception {
      final String rName = getUniqueName();
      Host host = Host.getHost(0);
@@@ -1313,9 -1250,8 +1288,8 @@@
     * function factory present.
     * ResultCollector = DefaultResultCollector
     * haveResults = false;
--   * @throws Exception
     */
 +  @Test
    public void testRemoteMultiKeyExecutionNoResult_byName() throws Exception {
      final String rName = getUniqueName();
      Host host = Host.getHost(0);
@@@ -1397,9 -1333,8 +1371,8 @@@
     * haveResults = true;
     * result Timeout = 10 milliseconds
     * expected result to be 0.(as the execution gets the timeout)
--   * @throws Exception
     */
 +  @Test
    public void testRemoteMultiKeyExecution_timeout() throws Exception {
      final String rName = getUniqueName();
      Host host = Host.getHost(0);
@@@ -1477,9 -1412,8 +1450,8 @@@
     * function factory present.
     * ResultCollector = CustomResultCollector
     * haveResults = false;
--   * @throws Exception
     */
 +  @Test
    public void testRemoteMultiKeyExecutionWithCollectorNoResult_byName() throws Exception {
      final String rName = getUniqueName();
      Host host = Host.getHost(0);
@@@ -1553,13 -1487,12 +1525,12 @@@
      });
      assertEquals(Boolean.TRUE, o);
    }
++
    /**
     * Test multi-key remote execution by a pure accessor which doesn't have the
     * function factory present.
--   *
--   * @throws Exception
     */
 +  @Test
    public void testRemoteMultiKeyExecution_byInstance() throws Exception {
      final String rName = getUniqueName();
      Host host = Host.getHost(0);
@@@ -1663,13 -1596,12 +1634,10 @@@
      assertEquals(Boolean.TRUE, o);
    }
  
--  
    /**
     * Test bucketFilter functionality
--   *
--   * @throws Exception
     */
 +  @Test
    public void testBucketFilter_1() throws Exception {
      final String rName = getUniqueName();
      Host host = Host.getHost(0);
@@@ -1882,15 -1813,14 +1850,13 @@@
     
      
    }
--  
--  
++
    /**
     * Test ability to execute a multi-key function by a local data store
     * ResultCollector = DefaultResultCollector
     * haveResult = true
--   * @throws Exception
     */
 +  @Test
    public void testLocalMultiKeyExecution_byName() throws Exception {
      final String rName = getUniqueName();
      Host host = Host.getHost(0);
@@@ -1969,10 -1899,9 +1935,8 @@@
  
    /**
     * Test ability to execute a multi-key function by a local data store
--   *
--   * @throws Exception
     */
 +  @Test
    public void testLocalMultiKeyExecution_byInstance() throws Exception {
      final String rName = getUniqueName();
      Host host = Host.getHost(0);
@@@ -2054,10 -1983,9 +2018,8 @@@
     * Ensure that the execution is limited to a single bucket put another way,
     * that the routing logic works correctly such that there is not extra
     * execution
--   *
--   * @throws Exception
     */
 +  @Test
    public void testMultiKeyExecutionOnASingleBucket_byName() throws Exception {
      final String rName = getUniqueName();
      Host host = Host.getHost(0);
@@@ -2138,12 -2066,11 +2100,9 @@@
     * Ensure that the execution is limited to a single bucket put another way,
     * that the routing logic works correctly such that there is not extra
     * execution
--   *
--   * @throws Exception
     */
 -  public void testMultiKeyExecutionOnASingleBucket_byInstance()
 -      throws Exception {
 +  @Test
-   public void testMultiKeyExecutionOnASingleBucket_byInstance()
-       throws Exception {
++  public void testMultiKeyExecutionOnASingleBucket_byInstance() throws Exception {
      final String rName = getUniqueName();
      Host host = Host.getHost(0);
      final VM datastore0 = host.getVM(0);
@@@ -2221,12 -2148,11 +2180,9 @@@
  
    /**
     * Ensure that the execution is happening all the PR as a whole
--   *
--   * @throws Exception
     */
 -  public void testExecutionOnAllNodes_byName()
 -      throws Exception {
 +  @Test
-   public void testExecutionOnAllNodes_byName()
-       throws Exception {
++  public void testExecutionOnAllNodes_byName() throws Exception {
      final String rName = getUniqueName();
      Host host = Host.getHost(0);
      final VM datastore0 = host.getVM(0);
@@@ -2290,13 -2216,13 +2246,6 @@@
            assertEquals(Boolean.TRUE, l.iterator().next());
          }
          return Boolean.TRUE;
--//        for (int i=0; i<4; i++) {
--//          List l = ((List)rc1.getResult());
--//          assertIndexDetailsEquals(4, l.size());
--//          assertIndexDetailsEquals(Boolean.TRUE, l.iterator().next());
--//        }
--//
--//        return Boolean.TRUE;
        }
      });
      assertEquals(Boolean.TRUE, o);
@@@ -2304,12 -2230,11 +2253,9 @@@
   
    /**
     * Ensure that the execution is happening all the PR as a whole
--   *
--   * @throws Exception
     */
 -  public void testExecutionOnAllNodes_byInstance()
 -      throws Exception {
 +  @Test
-   public void testExecutionOnAllNodes_byInstance()
-       throws Exception {
++  public void testExecutionOnAllNodes_byInstance() throws Exception {
      final String rName = getUniqueName();
      Host host = Host.getHost(0);
      final VM datastore0 = host.getVM(0);
@@@ -2394,12 -2319,11 +2340,9 @@@
   
    /**
     * Ensure that the execution of inline function is happening all the PR as a whole
--   *
--   * @throws Exception
     */
 -  public void testExecutionOnAllNodes_byInlineFunction()
 -      throws Exception {
 +  @Test
-   public void testExecutionOnAllNodes_byInlineFunction()
-       throws Exception {
++  public void testExecutionOnAllNodes_byInlineFunction() throws Exception {
      final String rName = getUniqueName();
      Host host = Host.getHost(0);
      final VM datastore0 = host.getVM(0);
@@@ -2591,12 -2514,11 +2534,9 @@@
    /**
     * Ensure that the execution is happening on all the PR as a whole
     * with LocalReadPR as LocalDataSet
--   *
--   * @throws Exception
     */
 -  public void testExecutionOnAllNodes_LocalReadPR()
 -      throws Exception {
 +  @Test
-   public void testExecutionOnAllNodes_LocalReadPR()
-       throws Exception {
++  public void testExecutionOnAllNodes_LocalReadPR() throws Exception {
      final String rName = getUniqueName();
      Host host = Host.getHost(0);
      final VM datastore0 = host.getVM(0);
@@@ -2676,12 -2598,11 +2616,9 @@@
    /**
     * Ensure that the execution is happening on all the PR as a whole
     * with LocalReadPR as LocalDataSet
--   *
--   * @throws Exception
     */
 -  public void testExecutionOnMultiNodes_LocalReadPR()
 -      throws Exception {
 +  @Test
-   public void testExecutionOnMultiNodes_LocalReadPR()
-       throws Exception {
++  public void testExecutionOnMultiNodes_LocalReadPR() throws Exception {
      //final String rName = getUniqueName();
      final String rName1 = "CustomerPartitionedRegionName";
      final String rName2 = "OrderPartitionedRegionName";
@@@ -2810,9 -2731,8 +2747,8 @@@
    /**
     * Assert the {@link RegionFunctionContext} yields the proper objects.
     */
 -  public void testLocalDataContext() throws Exception
 -  {
 +  @Test
-   public void testLocalDataContext() throws Exception
-   {
++  public void testLocalDataContext() throws Exception {
      final String rName = getUniqueName();
      Host host = Host.getHost(0);
      final VM accessor = host.getVM(1);
@@@ -2886,9 -2806,8 +2822,8 @@@
    /**
     * Assert the {@link RegionFunctionContext} yields the proper objects.
     */
 -  public void testLocalDataContextWithColocation() throws Exception
 -  {
 +  @Test
-   public void testLocalDataContextWithColocation() throws Exception
-   {
++  public void testLocalDataContextWithColocation() throws Exception {
      String rName = getUniqueName();
      Host host = Host.getHost(0);
      final VM accessor = host.getVM(1);
@@@ -3031,8 -2950,7 +2966,7 @@@
     * This tests make sure that, in case of LonerDistributedSystem we dont get ClassCast Exception.
     * Just making sure that the function executed on lonerDistribuedSystem
     */
-- 
 +  @Test
    public void testBug41118() {
      Host host = Host.getHost(0);
      final VM lonerVM = host.getVM(1);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PerformanceTestFunction.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/BlockingHARegionJUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/BlockingHARegionJUnitTest.java
index 465770a,502fa1d..a18ec3e
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/BlockingHARegionJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/BlockingHARegionJUnitTest.java
@@@ -16,15 -16,6 +16,16 @@@
   */
  package com.gemstone.gemfire.internal.cache.ha;
  
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
 +import static org.junit.Assert.*;
 +
 +import java.util.Properties;
 +
 +import org.junit.Before;
 +import org.junit.Ignore;
 +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.distributed.DistributedSystem;
@@@ -33,23 -24,25 +34,23 @@@ import com.gemstone.gemfire.test.dunit.
  import com.gemstone.gemfire.test.dunit.Wait;
  import com.gemstone.gemfire.test.dunit.WaitCriterion;
  import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 -import org.junit.Before;
 -import org.junit.Test;
 -import org.junit.experimental.categories.Category;
  
 -import java.util.Properties;
 +@Category(IntegrationTest.class)
 +public class BlockingHARegionJUnitTest {
  
 -import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.MCAST_PORT;
 -import static org.junit.Assert.*;
 +  private static Cache cache = null;
  
 -@Category(IntegrationTest.class)
 -public class BlockingHARegionJUnitTest
 -{
 -  static Cache cache = null;
 +  /** boolean to record an exception occurence in another thread**/
 +  private static volatile boolean exceptionOccured = false;
 +  /** StringBuffer to store the exception**/
 +  private static StringBuffer exceptionString = new StringBuffer();
 +  /** boolen to quit the for loop**/
 +  private static volatile boolean quitForLoop = false;
  
    @Before
 -  public void setUp() throws Exception
 -  {
 +  public void setUp() throws Exception {
      Properties props = new Properties();
-     props.setProperty("mcast-port", "0");
+     props.setProperty(MCAST_PORT, "0");
      if (cache != null) {
        cache.close(); // fault tolerance
      }
@@@ -57,41 -50,43 +58,34 @@@
        .connect(props));
    }
  
 -/**
 - * This test has a scenario where the HAReqionQueue capacity is just 1. There will
 - * be two thread. One doing a 1000 puts and the other doing a 1000 takes. The validation
 - * for this test is that it should not encounter any exceptions
 - *
 - */
 +  /**
 +   * This test has a scenario where the HAReqionQueue capacity is just 1. There will
 +   * be two thread. One doing a 1000 puts and the other doing a 1000 takes. The validation
 +   * for this test is that it should not encounter any exceptions
 +   */
    @Test
 -  public void testBoundedPuts()
 -  {
 -    try {
 -      exceptionOccured = false;
 -      HARegionQueueAttributes harqa = new HARegionQueueAttributes();
 -      harqa.setBlockingQueueCapacity(1);
 -      HARegionQueue hrq = HARegionQueue.getHARegionQueueInstance(
 -          "BlockingHARegionJUnitTest_Region", cache, harqa,
 -          HARegionQueue.BLOCKING_HA_QUEUE, false);
 -      hrq.setPrimary(true);//fix for 40314 - capacity constraint is checked for primary only.
 -      Thread thread1 = new DoPuts(hrq,1000);
 -      Thread thread2 = new DoTake(hrq,1000);
 -
 -      thread1.start();
 -      thread2.start();
 +  public void testBoundedPuts() throws Exception {
-     try {
-       exceptionOccured = false;
-       HARegionQueueAttributes harqa = new HARegionQueueAttributes();
-       harqa.setBlockingQueueCapacity(1);
-       HARegionQueue hrq = HARegionQueue.getHARegionQueueInstance(
-           "BlockingHARegionJUnitTest_Region", cache, harqa,
-           HARegionQueue.BLOCKING_HA_QUEUE, false);
-       hrq.setPrimary(true);//fix for 40314 - capacity constraint is checked for primary only.
-       Thread thread1 = new DoPuts(hrq,1000);
-       Thread thread2 = new DoTake(hrq,1000);
- 
-       thread1.start();
-       thread2.start();
++    exceptionOccured = false;
++    HARegionQueueAttributes harqa = new HARegionQueueAttributes();
++    harqa.setBlockingQueueCapacity(1);
++    HARegionQueue hrq = HARegionQueue.getHARegionQueueInstance(
++        "BlockingHARegionJUnitTest_Region", cache, harqa,
++        HARegionQueue.BLOCKING_HA_QUEUE, false);
++    hrq.setPrimary(true);//fix for 40314 - capacity constraint is checked for primary only.
++    Thread thread1 = new DoPuts(hrq,1000);
++    Thread thread2 = new DoTake(hrq,1000);
  
--      ThreadUtils.join(thread1, 30 * 1000);
--      ThreadUtils.join(thread2, 30 * 1000);
++    thread1.start();
++    thread2.start();
  
--      if (exceptionOccured) {
--        fail(" Test failed due to " + exceptionString);
--      }
--      
--      cache.close();
++    ThreadUtils.join(thread1, 30 * 1000);
++    ThreadUtils.join(thread2, 30 * 1000);
  
--    }
--    catch (Exception e) {
--      fail(" Test encountered an exception "+e);
++    if (exceptionOccured) {
++      fail(" Test failed due to " + exceptionString);
      }
  
++    cache.close();
    }
  
    /**
@@@ -102,66 -97,67 +96,60 @@@
     * is started. This will cause the region size to come down by one and the put thread waiting
     * will go ahead and do the put. The thread should then die and the region size should be validated
     * to reflect that.
--   *
     */
    @Test
 -  public void testPutBeingBlocked()
 -  {
 -    try {
 -      exceptionOccured = false;
 -      quitForLoop = false;
 -      HARegionQueueAttributes harqa = new HARegionQueueAttributes();
 -      harqa.setBlockingQueueCapacity(1);
 -      final HARegionQueue hrq = HARegionQueue.getHARegionQueueInstance(
 -          "BlockingHARegionJUnitTest_Region", cache, harqa,
 -          HARegionQueue.BLOCKING_HA_QUEUE, false);
 -      hrq.setPrimary(true);//fix for 40314 - capacity constraint is checked for primary only.
 -      final Thread thread1 = new DoPuts(hrq,2);
 -      thread1.start();
 -      WaitCriterion ev = new WaitCriterion() {
 -        public boolean done() {
 -          return hrq.region.size() == 2;
 -        }
 -        public String description() {
 -          return null;
 -        }
 -      };
 -      Wait.waitForCriterion(ev, 1000, 200, true);
 -      assertTrue(thread1.isAlive()); //thread should still be alive (in wait state)
 -      
 -      Thread thread2 = new DoTake(hrq,1);
 -      thread2.start(); //start take thread
 -      ev = new WaitCriterion() {
 -        public boolean done() {
 -          return hrq.region.size() == 3;
 -        }
 -        public String description() {
 -          return null;
 -        }
 -      };
 -      //sleep. take will proceed and so will sleeping put
 -      Wait.waitForCriterion(ev, 3 * 1000, 200, true);
 +  public void testPutBeingBlocked() throws Exception {
-     try {
-       exceptionOccured = false;
-       quitForLoop = false;
-       HARegionQueueAttributes harqa = new HARegionQueueAttributes();
-       harqa.setBlockingQueueCapacity(1);
-       final HARegionQueue hrq = HARegionQueue.getHARegionQueueInstance(
-           "BlockingHARegionJUnitTest_Region", cache, harqa,
-           HARegionQueue.BLOCKING_HA_QUEUE, false);
-       hrq.setPrimary(true);//fix for 40314 - capacity constraint is checked for primary only.
-       final Thread thread1 = new DoPuts(hrq,2);
-       thread1.start();
-       WaitCriterion ev = new WaitCriterion() {
-         public boolean done() {
-           return hrq.region.size() == 2;
-         }
-         public String description() {
-           return null;
-         }
-       };
-       Wait.waitForCriterion(ev, 1000, 200, true);
-       assertTrue(thread1.isAlive()); //thread should still be alive (in wait state)
-       
-       Thread thread2 = new DoTake(hrq,1);
-       thread2.start(); //start take thread
-       ev = new WaitCriterion() {
-         public boolean done() {
-           return hrq.region.size() == 3;
-         }
-         public String description() {
-           return null;
-         }
-       };
-       //sleep. take will proceed and so will sleeping put
-       Wait.waitForCriterion(ev, 3 * 1000, 200, true);
++    exceptionOccured = false;
++    quitForLoop = false;
++    HARegionQueueAttributes harqa = new HARegionQueueAttributes();
++    harqa.setBlockingQueueCapacity(1);
++    final HARegionQueue hrq = HARegionQueue.getHARegionQueueInstance(
++        "BlockingHARegionJUnitTest_Region", cache, harqa,
++        HARegionQueue.BLOCKING_HA_QUEUE, false);
++    hrq.setPrimary(true);//fix for 40314 - capacity constraint is checked for primary only.
++    final Thread thread1 = new DoPuts(hrq,2);
++    thread1.start();
++    WaitCriterion ev = new WaitCriterion() {
++      public boolean done() {
++        return hrq.region.size() == 2;
++      }
++      public String description() {
++        return null;
++      }
++    };
++    Wait.waitForCriterion(ev, 1000, 200, true);
++    assertTrue(thread1.isAlive()); //thread should still be alive (in wait state)
  
--      // thread should have died since put should have proceeded
--      ev = new WaitCriterion() {
--        public boolean done() {
--          return !thread1.isAlive();
--        }
--        public String description() {
--          return "thread1 still alive";
--        }
--      };
--      Wait.waitForCriterion(ev, 30 * 1000, 1000, true);
--      
--      ThreadUtils.join(thread1, 30 * 1000); // for completeness
--      ThreadUtils.join(thread2, 30 * 1000);
--      if (exceptionOccured) {
--        fail(" Test failed due to " + exceptionString);
++    Thread thread2 = new DoTake(hrq,1);
++    thread2.start(); //start take thread
++    ev = new WaitCriterion() {
++      public boolean done() {
++        return hrq.region.size() == 3;
        }
--      cache.close();
--    }
--    catch (Exception e) {
--      fail(" Test encountered an exception "+e);
++      public String description() {
++        return null;
++      }
++    };
++    //sleep. take will proceed and so will sleeping put
++    Wait.waitForCriterion(ev, 3 * 1000, 200, true);
++
++    // thread should have died since put should have proceeded
++    ev = new WaitCriterion() {
++      public boolean done() {
++        return !thread1.isAlive();
++      }
++      public String description() {
++        return "thread1 still alive";
++      }
++    };
++    Wait.waitForCriterion(ev, 30 * 1000, 1000, true);
++
++    ThreadUtils.join(thread1, 30 * 1000); // for completeness
++    ThreadUtils.join(thread2, 30 * 1000);
++    if (exceptionOccured) {
++      fail(" Test failed due to " + exceptionString);
      }
++    cache.close();
    }
  
    
@@@ -171,71 -167,72 +159,65 @@@
     * put simultaneously. They will reach a state where the queue is full and they will all
     * go in a wait state. the region size would be verified to be 20000 (10000 puts and 10000 DACE objects).
     * then the threads are interrupted and made to quit the loop
--   *
     */
    @Test
 -  public void testConcurrentPutsNotExceedingLimit()
 -  {
 -    try {
 -      exceptionOccured = false;
 -      quitForLoop = false;
 -      HARegionQueueAttributes harqa = new HARegionQueueAttributes();
 -      harqa.setBlockingQueueCapacity(10000);
 -      final HARegionQueue hrq = HARegionQueue.getHARegionQueueInstance(
 -          "BlockingHARegionJUnitTest_Region", cache, harqa,
 -          HARegionQueue.BLOCKING_HA_QUEUE, false);      
 -      hrq.setPrimary(true);//fix for 40314 - capacity constraint is checked for primary only.
 -      Thread thread1 = new DoPuts(hrq,20000,1);
 -      Thread thread2 = new DoPuts(hrq,20000,2);
 -      Thread thread3 = new DoPuts(hrq,20000,3);
 -      Thread thread4 = new DoPuts(hrq,20000,4);
 -      Thread thread5 = new DoPuts(hrq,20000,5);
 -      
 -      thread1.start();
 -      thread2.start();
 -      thread3.start();
 -      thread4.start();
 -      thread5.start();
 -      
 -      WaitCriterion ev = new WaitCriterion() {
 -        public boolean done() {
 -          return hrq.region.size() == 20000;
 -        }
 -        public String description() {
 -          return null;
 -        }
 -      };
 -      Wait.waitForCriterion(ev, 30 * 1000, 200, true);
 -      
 -      assertTrue(thread1.isAlive());
 -      assertTrue(thread2.isAlive());
 -      assertTrue(thread3.isAlive());
 -      assertTrue(thread4.isAlive());
 -      assertTrue(thread5.isAlive());
 -      
 -      assertTrue(hrq.region.size()==20000);
 -      
 -      quitForLoop = true;
 -      Thread.sleep(20000);
 -      
 -      thread1.interrupt();
 -      thread2.interrupt();
 -      thread3.interrupt();
 -      thread4.interrupt();
 -      thread5.interrupt();
 -      
 -      Thread.sleep(2000);
 -      
 -      ThreadUtils.join(thread1, 5 * 60 * 1000);
 -      ThreadUtils.join(thread2, 5 * 60 * 1000);
 -      ThreadUtils.join(thread3, 5 * 60 * 1000);
 -      ThreadUtils.join(thread4, 5 * 60 * 1000);
 -      ThreadUtils.join(thread5, 5 * 60 * 1000);
 -      
 -      cache.close();
 -    }
 -    catch (Exception e) {
 -      fail(" Test encountered an exception "+e);
 -    }
 +  public void testConcurrentPutsNotExceedingLimit() throws Exception {
-     try {
-       exceptionOccured = false;
-       quitForLoop = false;
-       HARegionQueueAttributes harqa = new HARegionQueueAttributes();
-       harqa.setBlockingQueueCapacity(10000);
-       final HARegionQueue hrq = HARegionQueue.getHARegionQueueInstance(
-           "BlockingHARegionJUnitTest_Region", cache, harqa,
-           HARegionQueue.BLOCKING_HA_QUEUE, false);      
-       hrq.setPrimary(true);//fix for 40314 - capacity constraint is checked for primary only.
-       Thread thread1 = new DoPuts(hrq,20000,1);
-       Thread thread2 = new DoPuts(hrq,20000,2);
-       Thread thread3 = new DoPuts(hrq,20000,3);
-       Thread thread4 = new DoPuts(hrq,20000,4);
-       Thread thread5 = new DoPuts(hrq,20000,5);
-       
-       thread1.start();
-       thread2.start();
-       thread3.start();
-       thread4.start();
-       thread5.start();
-       
-       WaitCriterion ev = new WaitCriterion() {
-         public boolean done() {
-           return hrq.region.size() == 20000;
-         }
-         public String description() {
-           return null;
-         }
-       };
-       Wait.waitForCriterion(ev, 30 * 1000, 200, true);
-       
-       assertTrue(thread1.isAlive());
-       assertTrue(thread2.isAlive());
-       assertTrue(thread3.isAlive());
-       assertTrue(thread4.isAlive());
-       assertTrue(thread5.isAlive());
-       
-       assertTrue(hrq.region.size()==20000);
-       
-       quitForLoop = true;
-       Thread.sleep(20000);
-       
-       thread1.interrupt();
-       thread2.interrupt();
-       thread3.interrupt();
-       thread4.interrupt();
-       thread5.interrupt();
-       
-       Thread.sleep(2000);
-       
-       ThreadUtils.join(thread1, 5 * 60 * 1000);
-       ThreadUtils.join(thread2, 5 * 60 * 1000);
-       ThreadUtils.join(thread3, 5 * 60 * 1000);
-       ThreadUtils.join(thread4, 5 * 60 * 1000);
-       ThreadUtils.join(thread5, 5 * 60 * 1000);
-       
-       cache.close();
-     }
-     catch (Exception e) {
-       fail(" Test encountered an exception "+e);
-     }
++    exceptionOccured = false;
++    quitForLoop = false;
++    HARegionQueueAttributes harqa = new HARegionQueueAttributes();
++    harqa.setBlockingQueueCapacity(10000);
++    final HARegionQueue hrq = HARegionQueue.getHARegionQueueInstance(
++        "BlockingHARegionJUnitTest_Region", cache, harqa,
++        HARegionQueue.BLOCKING_HA_QUEUE, false);
++    hrq.setPrimary(true);//fix for 40314 - capacity constraint is checked for primary only.
++    Thread thread1 = new DoPuts(hrq,20000,1);
++    Thread thread2 = new DoPuts(hrq,20000,2);
++    Thread thread3 = new DoPuts(hrq,20000,3);
++    Thread thread4 = new DoPuts(hrq,20000,4);
++    Thread thread5 = new DoPuts(hrq,20000,5);
++
++    thread1.start();
++    thread2.start();
++    thread3.start();
++    thread4.start();
++    thread5.start();
++
++    WaitCriterion ev = new WaitCriterion() {
++      public boolean done() {
++        return hrq.region.size() == 20000;
++      }
++      public String description() {
++        return null;
++      }
++    };
++    Wait.waitForCriterion(ev, 30 * 1000, 200, true);
++
++    assertTrue(thread1.isAlive());
++    assertTrue(thread2.isAlive());
++    assertTrue(thread3.isAlive());
++    assertTrue(thread4.isAlive());
++    assertTrue(thread5.isAlive());
++
++    assertTrue(hrq.region.size()==20000);
++
++    quitForLoop = true;
++    Thread.sleep(20000);
++
++    thread1.interrupt();
++    thread2.interrupt();
++    thread3.interrupt();
++    thread4.interrupt();
++    thread5.interrupt();
++
++    Thread.sleep(2000);
++
++    ThreadUtils.join(thread1, 5 * 60 * 1000);
++    ThreadUtils.join(thread2, 5 * 60 * 1000);
++    ThreadUtils.join(thread3, 5 * 60 * 1000);
++    ThreadUtils.join(thread4, 5 * 60 * 1000);
++    ThreadUtils.join(thread5, 5 * 60 * 1000);
++
++    cache.close();
    }
    
    /**
@@@ -377,17 -387,26 +359,16 @@@
          cache.close();
        }
      }
--
    }
    
 -  
 -
 -  /** boolean to record an exception occurence in another thread**/
 -  static volatile boolean exceptionOccured = false;
 -/** StringBuffer to store the exception**/
 -  static StringBuffer exceptionString = new StringBuffer();
 -  /** boolen to quit the for loop**/
 -  static volatile boolean quitForLoop = false;
 -
    /**
     * class which does specified number of puts on the queue
 -   *
     */
 -  static class DoPuts extends Thread
 -  {
 +  private static class DoPuts extends Thread {
 +
      HARegionQueue regionQueue = null;
      final int numberOfPuts;
 +
      DoPuts(HARegionQueue haRegionQueue, int numberOfPuts) {
        this.regionQueue = haRegionQueue;
        this.numberOfPuts = numberOfPuts;
@@@ -428,10 -445,10 +409,9 @@@
  
    /**
     * class which does a specified number of takes
--   *
     */
 -  static class DoTake extends Thread
 -  {
 +  private static class DoTake extends Thread {
 +
      final HARegionQueue regionQueue;
      final int numberOfTakes;
  

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug36853EventsExpiryDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug36853EventsExpiryDUnitTest.java
index d30420a,a48b949..4f76c7a
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug36853EventsExpiryDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug36853EventsExpiryDUnitTest.java
@@@ -16,21 -16,7 +16,22 @@@
   */
  package com.gemstone.gemfire.internal.cache.ha;
  
 -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.EntryEvent;
 +import com.gemstone.gemfire.cache.Region;
 +import com.gemstone.gemfire.cache.RegionAttributes;
 +import com.gemstone.gemfire.cache.Scope;
  import com.gemstone.gemfire.cache.server.CacheServer;
  import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
  import com.gemstone.gemfire.cache30.CacheTestCase;
@@@ -58,27 -44,29 +59,27 @@@ import com.gemstone.gemfire.test.junit.
   * is set for delayed start. This will make some of the events in the queue
   * expire before dispatcher can start picking them up for delivery to the
   * client.
 - * 
 - * 
   */
 -public class Bug36853EventsExpiryDUnitTest extends CacheTestCase
 -{
 +@Category(DistributedTest.class)
 +public class Bug36853EventsExpiryDUnitTest extends JUnit4CacheTestCase {
  
    /** Cache-server */
 -  VM server = null;
 +  private VM server = null;
  
    /** Client , connected to Cache-server */
 -  VM client = null;
 +  private VM client = null;
  
    /** Name of the test region */
--  private static final String REGION_NAME = "Bug36853EventsExpiryDUnitTest_region";
++  private static final String REGION_NAME = Bug36853EventsExpiryDUnitTest.class.getSimpleName() + "_region";
  
    /** The cache instance for test cases */
 -  protected static Cache cache = null;
 +  private static Cache cache = null;
  
    /** Boolean to indicate the client to proceed for validation */
 -  protected static volatile boolean proceedForValidation = false;
 +  private static volatile boolean proceedForValidation = false;
  
    /** Counter to indicate number of puts recieved by client */
 -  protected static volatile int putsRecievedByClient;
 +  private static volatile int putsRecievedByClient;
  
    /** The last key for operations, to notify for proceeding to validation */
    private static final String LAST_KEY = "LAST_KEY";
@@@ -153,12 -156,12 +154,12 @@@
     * @throws Exception -
     *           thrown if any problem occurs in setting up the client
     */
 -  public static void createClientCache(String hostName, Integer port)
 +  private static void createClientCache(String hostName, Integer port)
      throws Exception {
      Properties props = new Properties();
-     props.setProperty("mcast-port", "0");
-     props.setProperty("locators", "");
+     props.setProperty(MCAST_PORT, "0");
+     props.setProperty(LOCATORS, "");
 -    new Bug36853EventsExpiryDUnitTest("temp").createCache(props);
 +    new Bug36853EventsExpiryDUnitTest().createCache(props);
      AttributesFactory factory = new AttributesFactory();
      factory.setScope(Scope.DISTRIBUTED_ACK);
      ClientServerTestCase.configureConnectionPool(factory, hostName, port.intValue(),-1, true, -1, 2, null);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug48571DUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug48571DUnitTest.java
index fa761cf,15094bb..70bd8b4
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug48571DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug48571DUnitTest.java
@@@ -16,20 -16,9 +16,21 @@@
   */
  package com.gemstone.gemfire.internal.cache.ha;
  
+ import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
 +import static org.junit.Assert.*;
  
 -import com.gemstone.gemfire.cache.*;
 +import java.util.Collection;
 +import java.util.Iterator;
 +import java.util.Properties;
 +
 +import org.junit.Test;
 +import org.junit.experimental.categories.Category;
 +
 +import com.gemstone.gemfire.cache.CacheFactory;
 +import com.gemstone.gemfire.cache.EntryEvent;
 +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;
@@@ -58,16 -45,16 +58,12 @@@ public class Bug48571DUnitTest extends 
    private VM client = null;
    private static GemFireCacheImpl cache = null;
    
--  private static final String region = "Bug48571DUnitTest_region";
++  private static final String region = Bug48571DUnitTest.class.getSimpleName() + "_region";
    private static int numOfCreates = 0;
    private static int numOfUpdates = 0;
    private static int numOfInvalidates = 0;
    private static boolean lastKeyReceived = false;
  
-   public Bug48571DUnitTest() {
-     super();
 -  public Bug48571DUnitTest(String name) {
 -    super(name);
--  }
--
    @Override
    public final void postSetUp() throws Exception {
      final Host host = Host.getHost(0);
@@@ -112,7 -99,7 +108,6 @@@
        }
        @Override
        public String description() {
--        // TODO Auto-generated method stub
          return "Proxy has not paused yet";
        }
      };
@@@ -142,18 -128,18 +137,17 @@@
      server.invoke(() -> Bug48571DUnitTest.verifyStats());
    }
  
--
    public static int createServerCache() throws Exception {
      Properties props = new Properties();
-     props.setProperty("locators", "localhost["+DistributedTestUtils.getDUnitLocatorPort()+"]");
-     props.setProperty("log-file", "server_" + OSProcess.getId() + ".log");
-     props.setProperty("log-level", "info");
-     props.setProperty("statistic-archive-file", "server_" + OSProcess.getId()
+     props.setProperty(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
+     props.setProperty(LOG_FILE, "server_" + OSProcess.getId() + ".log");
+     props.setProperty(LOG_LEVEL, "info");
+     props.setProperty(STATISTIC_ARCHIVE_FILE, "server_" + OSProcess.getId()
          + ".gfs");
-     props.setProperty("statistic-sampling-enabled", "true");
+     props.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
      CacheFactory cf = new CacheFactory(props);
  
 -    DistributedSystem ds = new Bug48571DUnitTest("Bug48571DUnitTest").getSystem(props);
 +    DistributedSystem ds = new Bug48571DUnitTest().getSystem(props);
      ds.disconnect();
  
      cache = (GemFireCacheImpl)cf.create();
@@@ -281,7 -267,7 +275,6 @@@
      Wait.waitForCriterion(wc, 60*1000, 500, true);
    }
  
--
    public static void verifyStats() throws Exception {
      CacheClientNotifier ccn = CacheClientNotifier.getInstance();
      CacheClientProxy ccp = ccn.getClientProxies().iterator().next();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug48879DUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug48879DUnitTest.java
index a893832,c26cc59..2e5feec
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug48879DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug48879DUnitTest.java
@@@ -16,12 -16,7 +16,13 @@@
   */
  package com.gemstone.gemfire.internal.cache.ha;
  
+ 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.CacheFactory;
  import com.gemstone.gemfire.cache.Region;
@@@ -89,10 -85,10 +91,9 @@@ public class Bug48879DUnitTest extends 
    }
  
    @SuppressWarnings({ "unused", "deprecation" })
--  public static Integer createCacheServer()
--      throws Exception {
 -    Bug48879DUnitTest test = new Bug48879DUnitTest("Bug48879DUnitTest");
++  public static Integer createCacheServer() throws Exception {
 +    Bug48879DUnitTest test = new Bug48879DUnitTest();
-     System.setProperty("gemfire.MessageTimeToLive", "30");
+     System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "MessageTimeToLive", "30");
      cache = (GemFireCacheImpl)CacheFactory.create(test.getSystem());
      HARegionQueue.threadIdExpiryTime = (SLEEP_TIME/1000) - 10;
      cache.setMessageSyncInterval(SLEEP_TIME/500);
@@@ -113,11 -109,11 +114,11 @@@
        throws Exception {
  
      Properties props = new Properties();
-     props.setProperty("statistic-archive-file", "client_" + OSProcess.getId()
+     props.setProperty(STATISTIC_ARCHIVE_FILE, "client_" + OSProcess.getId()
          + ".gfs");
-     props.setProperty("statistic-sampling-enabled", "true");
+     props.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
  
 -    DistributedSystem ds = new Bug48879DUnitTest("Bug48879DUnitTest").getSystem(props);
 +    DistributedSystem ds = new Bug48879DUnitTest().getSystem(props);
      ds.disconnect();
      ClientCacheFactory ccf = new ClientCacheFactory(props);
      ccf.setPoolSubscriptionEnabled(doRI);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/EventIdOptimizationDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/EventIdOptimizationDUnitTest.java
index e76560d,00c488a..9eb0982
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/EventIdOptimizationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/EventIdOptimizationDUnitTest.java
@@@ -16,27 -16,7 +16,28 @@@
   */
  package com.gemstone.gemfire.internal.cache.ha;
  
 +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.AttributesMutator;
 +import com.gemstone.gemfire.cache.Cache;
 +import com.gemstone.gemfire.cache.CacheFactory;
 +import com.gemstone.gemfire.cache.EntryEvent;
 +import com.gemstone.gemfire.cache.MirrorType;
 +import com.gemstone.gemfire.cache.Operation;
 +import com.gemstone.gemfire.cache.Region;
 +import com.gemstone.gemfire.cache.RegionAttributes;
 +import com.gemstone.gemfire.cache.RegionDestroyedException;
 +import com.gemstone.gemfire.cache.RegionEvent;
 +import com.gemstone.gemfire.cache.Scope;
+ import com.gemstone.gemfire.cache.*;
  import com.gemstone.gemfire.cache.client.PoolManager;
  import com.gemstone.gemfire.cache.client.internal.Connection;
  import com.gemstone.gemfire.cache.client.internal.PoolImpl;
@@@ -49,12 -29,14 +50,20 @@@ import com.gemstone.gemfire.distributed
  import com.gemstone.gemfire.internal.AvailablePort;
  import com.gemstone.gemfire.internal.cache.EventID;
  import com.gemstone.gemfire.internal.cache.EventIDHolder;
 +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.internal.JUnit4DistributedTestCase;
 +import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+ import com.gemstone.gemfire.test.dunit.*;
+ 
+ import java.util.Iterator;
+ import java.util.Map;
+ import java.util.Properties;
+ 
+ import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.LOCATORS;
+ import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.MCAST_PORT;
  
  /**
   * This test verifies that eventId, while being sent across the network ( client
@@@ -151,17 -135,17 +160,6 @@@ public class EventIdOptimizationDUnitTe
        new EventID(new byte[] { 1, 1 }, ID_VALUE_LONG, ID_VALUE_INT),
        new EventID(new byte[] { 1, 1 }, ID_VALUE_LONG, ID_VALUE_LONG) };
  
--  /** Constructor */
-   public EventIdOptimizationDUnitTest() {
-     super();
 -  public EventIdOptimizationDUnitTest(String name) {
 -    super(name);
--  }
--
--  /**
--   * Sets up the cache-servers and clients for the test
--   * 
--   * @throws Exception -
--   *           thrown in any problem occurs in setUp
--   */
    @Override
    public final void postSetUp() throws Exception  {
      disconnectAllFromDS();
@@@ -229,9 -213,9 +227,9 @@@
    public static void createClientCache1(String hostName, Integer port) throws Exception
    {
      Properties props = new Properties();
-     props.setProperty("mcast-port", "0");
-     props.setProperty("locators", "");
+     props.setProperty(MCAST_PORT, "0");
+     props.setProperty(LOCATORS, "");
 -    new EventIdOptimizationDUnitTest("temp").createCache(props);
 +    new EventIdOptimizationDUnitTest().createCache(props);
  
      AttributesFactory factory = new AttributesFactory();
      ClientServerTestCase.configureConnectionPool(factory, hostName, port.intValue(),-1, true, -1, 2, null);
@@@ -252,9 -236,9 +250,9 @@@
    public static void createClientCache2(String hostName, Integer port) throws Exception
    {
      Properties props = new Properties();
-     props.setProperty("mcast-port", "0");
-     props.setProperty("locators", "");
+     props.setProperty(MCAST_PORT, "0");
+     props.setProperty(LOCATORS, "");
 -    new EventIdOptimizationDUnitTest("temp").createCache(props);
 +    new EventIdOptimizationDUnitTest().createCache(props);
      AttributesFactory factory = new AttributesFactory();
      ClientServerTestCase.configureConnectionPool(factory, hostName, port.intValue(),-1, true, -1, 2, null);
      

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/FailoverDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/FailoverDUnitTest.java
index afc016c,300ad4b..9e59ba7
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/FailoverDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/FailoverDUnitTest.java
@@@ -16,22 -16,7 +16,23 @@@
   */
  package com.gemstone.gemfire.internal.cache.ha;
  
- 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.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.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.PoolManager;
  import com.gemstone.gemfire.cache.client.internal.PoolImpl;
  import com.gemstone.gemfire.cache.server.CacheServer;
@@@ -72,11 -57,11 +72,6 @@@ public class FailoverDUnitTest extends 
  
    private static final String regionName = "interestRegion";
  
--  /** constructor */
-   public FailoverDUnitTest() {
-     super();
 -  public FailoverDUnitTest(String name) {
 -    super(name);
--  }
--
    @Override
    public final void postSetUp() throws Exception {
      final Host host = Host.getHost(0);
@@@ -131,21 -115,21 +126,10 @@@
      PORT1 = port1.intValue();
      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 FailoverDUnitTest("temp").createCache(props);
 -
 -    /*props.setProperty("retryAttempts", "5");
 -    props.setProperty("endpoints", "ep1=" + hostName + ":"+PORT1+",ep2="
 -        + hostName + ":"+PORT2);
 -    props.setProperty("redundancyLevel", "-1");
 -    props.setProperty("establishCallbackConnection", "true");
 -    props.setProperty("LBPolicy", "RoundRobin");
 -    props.setProperty("readTimeout", "250");
 -    props.setProperty("socketBufferSize", "32768");
 -    props.setProperty("retryInterval", "1000");
 -    props.setProperty("connectionsPerServer", "2");
 -*/
 +    new FailoverDUnitTest().createCache(props);
 +
-     /*props.setProperty("retryAttempts", "5");
-     props.setProperty("endpoints", "ep1=" + hostName + ":"+PORT1+",ep2="
-         + hostName + ":"+PORT2);
-     props.setProperty("redundancyLevel", "-1");
-     props.setProperty("establishCallbackConnection", "true");
-     props.setProperty("LBPolicy", "RoundRobin");
-     props.setProperty("readTimeout", "250");
-     props.setProperty("socketBufferSize", "32768");
-     props.setProperty("retryInterval", "1000");
-     props.setProperty("connectionsPerServer", "2");
- */
      AttributesFactory factory = new AttributesFactory();
      factory.setScope(Scope.DISTRIBUTED_ACK);
      ClientServerTestCase.configureConnectionPoolWithName(factory, hostName, new int[] {PORT1,PORT2}, true, -1, 2, null, "FailoverPool");
@@@ -233,7 -217,7 +217,6 @@@
      }
    }
  
--
    public static void stopServer()
    {
      try {
@@@ -244,7 -228,7 +227,7 @@@
        }
      }
      catch (Exception e) {
--      fail("failed while stopServer()" + e);
++      fail("failed while stopServer()", e);
      }
    }
  
@@@ -291,7 -275,7 +274,7 @@@
            PoolImpl.BEFORE_PRIMARY_IDENTIFICATION_FROM_BACKUP_CALLBACK_FLAG = false;
          }
      });
--}
++  }
  
    public static void putDuringFailover()
    {
@@@ -324,7 -308,7 +307,6 @@@
      assertEquals("value-4", r.getEntry("key-4").getValue());
    }
  
--
    @Override
    public final void preTearDown() throws Exception {
      // close the clients first

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HABugInPutDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HABugInPutDUnitTest.java
index fce0915,ecce913..c16d7a0
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HABugInPutDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HABugInPutDUnitTest.java
@@@ -16,27 -16,13 +16,27 @@@
   */
  package com.gemstone.gemfire.internal.cache.ha;
  
 -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.CacheException;
 +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.cache30.CacheSerializableRunnable;
  import com.gemstone.gemfire.cache30.ClientServerTestCase;
  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.DistributedTestCase;
  import com.gemstone.gemfire.test.dunit.Host;
  import com.gemstone.gemfire.test.dunit.NetworkUtils;
  import com.gemstone.gemfire.test.dunit.VM;
@@@ -46,31 -35,33 +46,23 @@@ import com.gemstone.gemfire.test.junit.
  /**
   * This Dunit test is to verify the bug in put() operation. When the put is invoked on the server
   * and NotifyBySubscription is false then it follows normal path and then again calls put of region
-- * on which regionqueue is based. so recurssion is happening.
 - *
++ * on which region queue is based. so recurssion is happening.
   */
 +@Category(DistributedTest.class)
 +public class HABugInPutDUnitTest extends JUnit4DistributedTestCase {
  
 -public class HABugInPutDUnitTest extends DistributedTestCase
 -{
 -
--  VM server1 = null;
++  private static final String REGION_NAME = HABugInPutDUnitTest.class.getSimpleName() + "_region";
  
--  VM server2 = null;
--
--  VM client1 = null;
--
--  VM client2 = null;
--
--  private static final String REGION_NAME = "HABugInPutDUnitTest_region";
++  private VM server1 = null;
++  private VM server2 = null;
++  private VM client1 = null;
++  private VM client2 = null;
  
    final static String KEY1 = "KEY1";
--
    final static String VALUE1 = "VALUE1";
  
    protected static Cache cache = null;
  
-   public HABugInPutDUnitTest() {
-     super();
 -  public HABugInPutDUnitTest(String name) {
 -    super(name);
--  }
--
    @Override
    public final void postSetUp() throws Exception {
  	  final Host host = Host.getHost(0);
@@@ -148,9 -139,9 +140,9 @@@
      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 HABugInPutDUnitTest("temp").createCache(props);
 +    new HABugInPutDUnitTest().createCache(props);
      AttributesFactory factory = new AttributesFactory();
      factory.setScope(Scope.DISTRIBUTED_ACK);
      ClientServerTestCase.configureConnectionPool(factory, hostName, new int[] {PORT1,PORT2}, true, -1, 2, null);
@@@ -159,10 -150,9 +151,9 @@@
      Region region = cache.getRegion(Region.SEPARATOR + REGION_NAME);
      assertNotNull(region);
      region.registerInterest(KEY1);
--
    }
  
 +  @Test
    public void testBugInPut() throws Exception
    {
      client1.invoke(new CacheSerializableRunnable("putFromClient1") {


Mime
View raw message