geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From upthewatersp...@apache.org
Subject [1/3] incubator-geode git commit: Fixing more compile errors with junit 4 conversion
Date Tue, 24 May 2016 01:08:04 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-837 fe911cc56 -> 54cb7d534


Fixing more compile errors with junit 4 conversion


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/1065776d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/1065776d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/1065776d

Branch: refs/heads/feature/GEODE-837
Commit: 1065776d5a23e8c7ac5edb704dded345d1a30502
Parents: fe911cc
Author: Dan Smith <upthewaterspout@apache.org>
Authored: Mon May 23 17:51:39 2016 -0700
Committer: Dan Smith <upthewaterspout@apache.org>
Committed: Mon May 23 17:51:39 2016 -0700

----------------------------------------------------------------------
 .../web/controllers/RestAPITestBase.java        |  2 +-
 .../RestAPIsAndInterOpsDUnitTest.java           |  2 +-
 .../cache/query/dunit/HelperTestCase.java       | 16 +++++++--
 .../cache/query/cq/dunit/CqDataDUnitTest.java   |  2 +-
 .../cq/dunit/CqDataUsingPoolDUnitTest.java      | 35 +++++++++++++++++---
 .../cache/query/cq/dunit/CqPerfDUnitTest.java   |  2 +-
 .../cq/dunit/CqPerfUsingPoolDUnitTest.java      |  2 +-
 .../cache/query/cq/dunit/CqStatsDUnitTest.java  |  2 +-
 .../cq/dunit/CqStatsUsingPoolDUnitTest.java     |  2 +-
 .../PartitionedRegionCqQueryDUnitTest.java      |  2 +-
 .../query/cq/dunit/PrCqUsingPoolDUnitTest.java  |  4 +--
 .../cache/query/dunit/PdxQueryCQTestBase.java   | 15 +++++++--
 .../dunit/QueryIndexUpdateRIDUnitTest.java      | 16 ++++-----
 .../query/dunit/QueryMonitorDUnitTest.java      |  2 +-
 .../internal/cache/ha/CQListGIIDUnitTest.java   |  3 --
 .../tier/sockets/DurableClientTestCase.java     | 32 ++++++++++++++----
 .../CacheServerManagementDUnitTest.java         |  5 ++-
 .../internal/pulse/TestCQDUnitTest.java         |  3 +-
 .../internal/pulse/TestClientsDUnitTest.java    |  3 +-
 .../internal/pulse/TestServerDUnitTest.java     |  3 +-
 20 files changed, 104 insertions(+), 49 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1065776d/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPITestBase.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPITestBase.java
b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPITestBase.java
index 76f654e..db5393e 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPITestBase.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPITestBase.java
@@ -113,7 +113,7 @@ public class RestAPITestBase extends JUnit4DistributedTestCase {
   }
 
   public String createCacheWithGroups(final String hostName, final String groups) {
-    RestAPITestBase test = new RestAPITestBase(getTestMethodName());
+    RestAPITestBase test = new RestAPITestBase();
 
     final int servicePort = AvailablePortHelper.getRandomAvailableTCPPort();
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1065776d/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsAndInterOpsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsAndInterOpsDUnitTest.java
b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsAndInterOpsDUnitTest.java
index 42fa1f8..7718cbd 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsAndInterOpsDUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsAndInterOpsDUnitTest.java
@@ -158,7 +158,7 @@ public class RestAPIsAndInterOpsDUnitTest extends LocatorTestBase {
 
   public RestAPIsAndInterOpsDUnitTest() {
     super();
-    this.helper = new ManagementTestBase(name);
+    this.helper = new ManagementTestBase() {{}};
 
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1065776d/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/HelperTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/HelperTestCase.java
b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/HelperTestCase.java
index f4132da..70d7e5d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/HelperTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/HelperTestCase.java
@@ -16,6 +16,15 @@
  */
 package com.gemstone.gemfire.cache.query.dunit;
 
+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.Iterator;
 import java.util.Properties;
 
@@ -51,10 +60,11 @@ import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
 
-public class HelperTestCase extends CacheTestCase {
+@Category(DistributedTest.class)
+public class HelperTestCase extends JUnit4CacheTestCase {
 
-  public HelperTestCase(String name) {
-    super(name);
+  public HelperTestCase() {
+    super();
   }
   
   protected void createPartitionRegion(VM vm, final String regionName, final Class valueConstraint)
{

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1065776d/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqDataDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqDataDUnitTest.java
b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqDataDUnitTest.java
index d422599..d0fb8cb 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqDataDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqDataDUnitTest.java
@@ -67,7 +67,7 @@ import com.gemstone.gemfire.test.dunit.Wait;
 @Category(DistributedTest.class)
 public class CqDataDUnitTest extends JUnit4CacheTestCase {
 
-  protected CqQueryDUnitTest cqDUnitTest = new CqQueryDUnitTest("CqDataDUnitTest");
+  protected CqQueryDUnitTest cqDUnitTest = new CqQueryDUnitTest();
   
   public CqDataDUnitTest() {
     super();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1065776d/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqDataUsingPoolDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqDataUsingPoolDUnitTest.java
b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqDataUsingPoolDUnitTest.java
index 09047d6..613648e 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqDataUsingPoolDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqDataUsingPoolDUnitTest.java
@@ -16,6 +16,15 @@
  */
 package com.gemstone.gemfire.cache.query.cq.dunit;
 
+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.HashSet;
 import java.util.List;
 import java.util.Properties;
@@ -72,12 +81,13 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
  * This includes the test with different data activities.
  *
  */
-public class CqDataUsingPoolDUnitTest extends CacheTestCase {
+@Category(DistributedTest.class)
+public class CqDataUsingPoolDUnitTest extends JUnit4CacheTestCase {
 
-  protected CqQueryUsingPoolDUnitTest cqDUnitTest = new CqQueryUsingPoolDUnitTest("CqDataUsingPoolDUnitTest");
+  protected CqQueryUsingPoolDUnitTest cqDUnitTest = new CqQueryUsingPoolDUnitTest();
   
-  public CqDataUsingPoolDUnitTest(String name) {
-    super(name);
+  public CqDataUsingPoolDUnitTest() {
+    super();
   }
 
   @Override
@@ -104,6 +114,7 @@ public class CqDataUsingPoolDUnitTest extends CacheTestCase {
    * 
    * @throws Exception
    */
+  @Test
   public void testClientWithFeederAndCQ() throws Exception
   {
     final Host host = Host.getHost(0);
@@ -149,6 +160,7 @@ public class CqDataUsingPoolDUnitTest extends CacheTestCase {
    * Test for CQ Fail over/HA with redundancy level set.
    * @throws Exception
    */
+  @Test
   public void testCQHAWithState() throws Exception {
     final Host host = Host.getHost(0);
     VM server1 = host.getVM(0);
@@ -270,6 +282,7 @@ public class CqDataUsingPoolDUnitTest extends CacheTestCase {
    * 
    * @throws Exception
    */
+  @Test
   public void testCQWithDestroysAndInvalidates() throws Exception
   {
     final Host host = Host.getHost(0);
@@ -345,6 +358,7 @@ public class CqDataUsingPoolDUnitTest extends CacheTestCase {
    * bug 37295.
    * 
    */
+  @Test
   public void testCQWithMultipleClients() throws Exception {
     
     final Host host = Host.getHost(0);
@@ -421,6 +435,7 @@ public class CqDataUsingPoolDUnitTest extends CacheTestCase {
    * Test for CQ when region is populated with net load.
    * @throws Exception
    */
+  @Test
   public void testCQWithLoad() throws Exception {
     final Host host = Host.getHost(0);
     VM server1 = host.getVM(0);
@@ -475,6 +490,7 @@ public class CqDataUsingPoolDUnitTest extends CacheTestCase {
    * Test for CQ when entries are evicted from region.
    * @throws Exception
    */
+  @Test
   public void testCQWithEviction() throws Exception {
     final Host host = Host.getHost(0);
     VM server1 = host.getVM(0);
@@ -587,6 +603,7 @@ public class CqDataUsingPoolDUnitTest extends CacheTestCase {
    * Test for CQ with establishCallBackConnection.
    * @throws Exception
    */
+  @Test
   public void testCQWithEstablishCallBackConnection() throws Exception {
     final Host host = Host.getHost(0);
     VM server1 = host.getVM(0);
@@ -637,6 +654,7 @@ public class CqDataUsingPoolDUnitTest extends CacheTestCase {
    * Region invalidate triggers cqEvent with query op region invalidate.
    * @throws Exception
    */
+  @Test
   public void testRegionEvents() throws Exception {
     
     final Host host = Host.getHost(0);
@@ -720,6 +738,7 @@ public class CqDataUsingPoolDUnitTest extends CacheTestCase {
    * thus making the query data and region data inconsistent.
    * @throws Exception
    */
+  @Test
   public void testEventsDuringQueryExecution() throws Exception {
     
     final Host host = Host.getHost(0);
@@ -854,6 +873,7 @@ public class CqDataUsingPoolDUnitTest extends CacheTestCase {
 
   }
 
+  @Test
   public void testCqStatInitializationTimingIssue() {
     disconnectAllFromDS();
 
@@ -929,6 +949,7 @@ public class CqDataUsingPoolDUnitTest extends CacheTestCase {
     server.invoke(() -> CacheServerTestUtil.closeCache());
   }
   
+  @Test
   public void testGetDurableCQsFromPoolOnly() throws Exception {
     final String regionName = "regionA";
     final Host host = Host.getHost(0);
@@ -1070,6 +1091,7 @@ public class CqDataUsingPoolDUnitTest extends CacheTestCase {
     cqDUnitTest.closeServer(server);
   }
   
+  @Test
   public void testGetDurableCQsFromServerWithEmptyList() throws Exception {
     final Host host = Host.getHost(0);
     VM server = host.getVM(0);
@@ -1111,6 +1133,7 @@ public class CqDataUsingPoolDUnitTest extends CacheTestCase {
     cqDUnitTest.closeServer(server);
   }
   
+  @Test
   public void testGetDurableCqsFromServer() {
     disconnectAllFromDS();
 
@@ -1173,6 +1196,7 @@ public class CqDataUsingPoolDUnitTest extends CacheTestCase {
     server.invoke(() -> CacheServerTestUtil.closeCache());
   }
   
+  @Test
   public void testGetDurableCqsFromServerCycleClients() {
     disconnectAllFromDS();
 
@@ -1237,6 +1261,7 @@ public class CqDataUsingPoolDUnitTest extends CacheTestCase {
     server.invoke(() -> CacheServerTestUtil.closeCache());
   }
   
+  @Test
   public void testGetDurableCqsFromServerCycleClientsAndMoreCqs() {
     final String regionName = "testGetAllDurableCqsFromServerCycleClients";
     final Host host = Host.getHost(0);
@@ -1531,7 +1556,7 @@ public class CqDataUsingPoolDUnitTest extends CacheTestCase {
             try {
               cache.getLogger().fine("CqQueryTestHook: Going to wait on latch until ready
is called.");
               if (!latch.await(10, TimeUnit.SECONDS)) {
-                throw new TestException("query was never unlatched");
+                fail("query was never unlatched");
               }
             } catch (Exception e) {
               e.printStackTrace();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1065776d/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqPerfDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqPerfDUnitTest.java
b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqPerfDUnitTest.java
index 21bbe16..20b2a52 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqPerfDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqPerfDUnitTest.java
@@ -63,7 +63,7 @@ import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 @Category(DistributedTest.class)
 public class CqPerfDUnitTest extends JUnit4CacheTestCase {
 
-  protected CqQueryDUnitTest cqDUnitTest = new CqQueryDUnitTest("CqPerfDUnitTest");
+  protected CqQueryDUnitTest cqDUnitTest = new CqQueryDUnitTest();
   
   public CqPerfDUnitTest() {
     super();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1065776d/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqPerfUsingPoolDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqPerfUsingPoolDUnitTest.java
b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqPerfUsingPoolDUnitTest.java
index 011b5ae..0168419 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqPerfUsingPoolDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqPerfUsingPoolDUnitTest.java
@@ -63,7 +63,7 @@ import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 @Category(DistributedTest.class)
 public class CqPerfUsingPoolDUnitTest extends JUnit4CacheTestCase {
 
-  protected CqQueryUsingPoolDUnitTest cqDUnitTest = new CqQueryUsingPoolDUnitTest("CqPerfUsingPoolDUnitTest");
// TODO: get rid of this!
+  protected CqQueryUsingPoolDUnitTest cqDUnitTest = new CqQueryUsingPoolDUnitTest(); // TODO:
get rid of this!
   
   public CqPerfUsingPoolDUnitTest() {
     super();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1065776d/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStatsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStatsDUnitTest.java
b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStatsDUnitTest.java
index a726021..a42a61b 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStatsDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStatsDUnitTest.java
@@ -59,7 +59,7 @@ import com.gemstone.gemfire.test.dunit.Wait;
 @Category(DistributedTest.class)
 public class CqStatsDUnitTest extends JUnit4CacheTestCase {
 
-  private CqQueryDUnitTest cqDUnitTest = new CqQueryDUnitTest("CqStatsDUnitTest");
+  private CqQueryDUnitTest cqDUnitTest = new CqQueryDUnitTest();
   
   public CqStatsDUnitTest() {
     super();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1065776d/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStatsUsingPoolDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStatsUsingPoolDUnitTest.java
b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStatsUsingPoolDUnitTest.java
index 4d7bf1d..ddec1ba 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStatsUsingPoolDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStatsUsingPoolDUnitTest.java
@@ -59,7 +59,7 @@ import com.gemstone.gemfire.test.dunit.Wait;
 @Category(DistributedTest.class)
 public class CqStatsUsingPoolDUnitTest extends JUnit4CacheTestCase {
 
-  private CqQueryUsingPoolDUnitTest cqDUnitTest = new CqQueryUsingPoolDUnitTest("CqStatsUsingPoolDUnitTest");
+  private CqQueryUsingPoolDUnitTest cqDUnitTest = new CqQueryUsingPoolDUnitTest();
   
   public CqStatsUsingPoolDUnitTest() {
     super();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1065776d/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PartitionedRegionCqQueryDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PartitionedRegionCqQueryDUnitTest.java
b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PartitionedRegionCqQueryDUnitTest.java
index 70a72f8..89211a6 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PartitionedRegionCqQueryDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PartitionedRegionCqQueryDUnitTest.java
@@ -82,7 +82,7 @@ public class PartitionedRegionCqQueryDUnitTest extends JUnit4CacheTestCase
{
   
   static public final String KEY = "key-";
   
-  protected final CqQueryDUnitTest cqHelper = new CqQueryDUnitTest("HelperPartitonedRegionCqTest");
+  protected final CqQueryDUnitTest cqHelper = new CqQueryDUnitTest();
   
   public final String[] cqs = new String [] {
       //0 - Test for ">" 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1065776d/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PrCqUsingPoolDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PrCqUsingPoolDUnitTest.java
b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PrCqUsingPoolDUnitTest.java
index 30ae41e..b615156 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PrCqUsingPoolDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PrCqUsingPoolDUnitTest.java
@@ -81,9 +81,9 @@ public class PrCqUsingPoolDUnitTest extends JUnit4CacheTestCase {
   
   static public final String KEY = "key-";
   
-  private final CqQueryUsingPoolDUnitTest cqHelper = new CqQueryUsingPoolDUnitTest("HelperPartitonedRegionCqTest");
+  private final CqQueryUsingPoolDUnitTest cqHelper = new CqQueryUsingPoolDUnitTest();
   
-  private final CqStatsDUnitTest cqStatsHelper = new CqStatsDUnitTest("HelperPrCqUsingPool");
+  private final CqStatsDUnitTest cqStatsHelper = new CqStatsDUnitTest();
 
   public final String[] cqs = new String [] {
       //0 - Test for ">" 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1065776d/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/dunit/PdxQueryCQTestBase.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/dunit/PdxQueryCQTestBase.java
b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/dunit/PdxQueryCQTestBase.java
index 9bcb341..b80dde5 100755
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/dunit/PdxQueryCQTestBase.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/dunit/PdxQueryCQTestBase.java
@@ -16,6 +16,15 @@
  */
 package com.gemstone.gemfire.cache.query.dunit;
 
+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.IOException;
 import java.util.Comparator;
 import java.util.HashMap;
@@ -56,7 +65,7 @@ import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
 
-public abstract class PdxQueryCQTestBase extends CacheTestCase {
+public abstract class PdxQueryCQTestBase extends JUnit4CacheTestCase {
 
   /** The port on which the bridge server was started in this VM */
   private static int bridgeServerPort;
@@ -489,8 +498,8 @@ public abstract class PdxQueryCQTestBase extends CacheTestCase {
         bridgeServerPort = bridge.getPort();
       }
 
-  public PdxQueryCQTestBase(String name) {
-    super(name);
+  public PdxQueryCQTestBase() {
+    super();
   }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1065776d/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryIndexUpdateRIDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryIndexUpdateRIDUnitTest.java
b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryIndexUpdateRIDUnitTest.java
index a8ce07b..90153cf 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryIndexUpdateRIDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryIndexUpdateRIDUnitTest.java
@@ -98,7 +98,7 @@ public class QueryIndexUpdateRIDUnitTest extends JUnit4CacheTestCase{
   @Test
   public void testClientIndexUpdateWithRIOnKeys() throws Exception{
     
-    CqQueryUsingPoolDUnitTest cqDUnitTest = new CqQueryUsingPoolDUnitTest("CqRegisterInterestIndexUpdateDunitTest");
+    CqQueryUsingPoolDUnitTest cqDUnitTest = new CqQueryUsingPoolDUnitTest();
     
     final Host host = Host.getHost(0);
     VM server = host.getVM(0);
@@ -144,7 +144,7 @@ public class QueryIndexUpdateRIDUnitTest extends JUnit4CacheTestCase{
   @Test
   public void testClientIndexUpdateWithRIOnOverlapKeys() throws Exception{
     
-    CqQueryUsingPoolDUnitTest cqDUnitTest = new CqQueryUsingPoolDUnitTest("CqRegisterInterestIndexUpdateDunitTest");
+    CqQueryUsingPoolDUnitTest cqDUnitTest = new CqQueryUsingPoolDUnitTest();
     
     final Host host = Host.getHost(0);
     VM server = host.getVM(0);
@@ -195,7 +195,7 @@ public class QueryIndexUpdateRIDUnitTest extends JUnit4CacheTestCase{
   @Test
   public void testClientIndexUpdateWithRIOnRegion() throws Exception{
     
-    CqQueryUsingPoolDUnitTest cqDUnitTest = new CqQueryUsingPoolDUnitTest("CqRegisterInterestIndexUpdateDunitTest");
+    CqQueryUsingPoolDUnitTest cqDUnitTest = new CqQueryUsingPoolDUnitTest();
     
     final Host host = Host.getHost(0);
     VM server = host.getVM(0);
@@ -236,7 +236,7 @@ public class QueryIndexUpdateRIDUnitTest extends JUnit4CacheTestCase{
   @Test
   public void testClientIndexUpdateWithRIOnRegEx() throws Exception{
     
-    CqQueryUsingPoolDUnitTest cqDUnitTest = new CqQueryUsingPoolDUnitTest("QueryIndexUpdateRIDunitTest");
+    CqQueryUsingPoolDUnitTest cqDUnitTest = new CqQueryUsingPoolDUnitTest();
     
     final Host host = Host.getHost(0);
     VM server = host.getVM(0);
@@ -283,7 +283,7 @@ public class QueryIndexUpdateRIDUnitTest extends JUnit4CacheTestCase{
   @Test
   public void testClientIndexUpdateWithRIOnClearedRegion() throws Exception{
     
-    CqQueryUsingPoolDUnitTest cqDUnitTest = new CqQueryUsingPoolDUnitTest("QueryIndexUpdateRIDunitTest");
+    CqQueryUsingPoolDUnitTest cqDUnitTest = new CqQueryUsingPoolDUnitTest();
     
     final Host host = Host.getHost(0);
     VM server = host.getVM(0);
@@ -340,7 +340,7 @@ public class QueryIndexUpdateRIDUnitTest extends JUnit4CacheTestCase{
   @Test
   public void testClientIndexUpdateWithRIOnPRRegion() throws Exception{
     
-    CqQueryUsingPoolDUnitTest cqDUnitTest = new CqQueryUsingPoolDUnitTest("QueryIndexUpdateRIDunitTest");
+    CqQueryUsingPoolDUnitTest cqDUnitTest = new CqQueryUsingPoolDUnitTest();
     
     final Host host = Host.getHost(0);
     VM server = host.getVM(0);
@@ -381,7 +381,7 @@ public class QueryIndexUpdateRIDUnitTest extends JUnit4CacheTestCase{
   @Test
   public void testClientIndexUpdateWithRIOnPRKeys() throws Exception{
     
-    CqQueryUsingPoolDUnitTest cqDUnitTest = new CqQueryUsingPoolDUnitTest("QueryIndexUpdateRIDunitTest");
+    CqQueryUsingPoolDUnitTest cqDUnitTest = new CqQueryUsingPoolDUnitTest();
     
     final Host host = Host.getHost(0);
     VM server = host.getVM(0);
@@ -422,7 +422,7 @@ public class QueryIndexUpdateRIDUnitTest extends JUnit4CacheTestCase{
   @Test
   public void testClientIndexUpdateWithRIOnPRRegEx() throws Exception{
     
-    CqQueryUsingPoolDUnitTest cqDUnitTest = new CqQueryUsingPoolDUnitTest("QueryIndexUpdateRIDunitTest");
+    CqQueryUsingPoolDUnitTest cqDUnitTest = new CqQueryUsingPoolDUnitTest();
     
     final Host host = Host.getHost(0);
     VM server = host.getVM(0);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1065776d/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryMonitorDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryMonitorDUnitTest.java
b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryMonitorDUnitTest.java
index 0af3b74..cf42aa8 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryMonitorDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryMonitorDUnitTest.java
@@ -1021,7 +1021,7 @@ public class QueryMonitorDUnitTest extends JUnit4CacheTestCase {
   }
   
   
-  protected CqQueryDUnitTest cqDUnitTest = new CqQueryDUnitTest("CqDataDUnitTest");
+  protected CqQueryDUnitTest cqDUnitTest = new CqQueryDUnitTest();
 
   /**
    * The following CQ test is added to make sure TEST_MAX_QUERY_EXECUTION_TIME is reset

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1065776d/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/ha/CQListGIIDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/ha/CQListGIIDUnitTest.java
b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/ha/CQListGIIDUnitTest.java
index d1c14aa..98ad134 100755
--- a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/ha/CQListGIIDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/ha/CQListGIIDUnitTest.java
@@ -72,9 +72,6 @@ import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.NetworkUtils;
 import com.gemstone.gemfire.test.dunit.VM;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
 /**
  *
  *

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1065776d/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientTestCase.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientTestCase.java
b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientTestCase.java
index 1bc69b1..a0c50ec 100755
--- a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientTestCase.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientTestCase.java
@@ -16,6 +16,15 @@
  */
 package com.gemstone.gemfire.internal.cache.tier.sockets;
 
+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.Arrays;
 import java.util.Iterator;
 import java.util.List;
@@ -72,7 +81,8 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
  * 
  * @since 5.2
  */ 
-public class DurableClientTestCase extends DistributedTestCase {
+@Category(DistributedTest.class)
+public class DurableClientTestCase extends JUnit4DistributedTestCase {
 
   protected VM server1VM;
   protected VM server2VM;
@@ -82,8 +92,8 @@ public class DurableClientTestCase extends DistributedTestCase {
   
   protected static volatile boolean isPrimaryRecovered = false;
 
-  public DurableClientTestCase(String name) {
-    super(name);
+  public DurableClientTestCase() {
+    super();
   }
 
   @Override
@@ -119,6 +129,7 @@ public class DurableClientTestCase extends DistributedTestCase {
   /**
    * Test that starting a durable client is correctly processed by the server.
    */
+  @Test
   public void testSimpleDurableClient() {    
     // Start a server
     int serverPort = ((Integer) this.server1VM.invoke(() -> CacheServerTestUtil.createCacheServer(regionName,
new Boolean(true))))
@@ -170,6 +181,7 @@ public class DurableClientTestCase extends DistributedTestCase {
    * In this test we will set gemfire.SPECIAL_DURABLE property to true and will
    * see durableID appended by poolname or not
    */
+  @Test
   public void testSimpleDurableClient2() {
     final Properties jp = new Properties();
     jp.setProperty("gemfire.SPECIAL_DURABLE", "true");
@@ -303,6 +315,7 @@ public class DurableClientTestCase extends DistributedTestCase {
    * Test that starting, stopping then restarting a durable client is correctly
    * processed by the server.
    */
+  @Test
   public void testStartStopStartDurableClient() {
     // Start a server
     int serverPort = ((Integer) this.server1VM.invoke(() -> CacheServerTestUtil.createCacheServer(regionName,
new Boolean(true))))
@@ -384,6 +397,7 @@ public class DurableClientTestCase extends DistributedTestCase {
    * processed by the server.
    * This is a test of bug 39630
    */
+  @Test
   public void test39630() {
     // Start a server
     int serverPort = ((Integer) this.server1VM.invoke(() -> CacheServerTestUtil.createCacheServer(regionName,
new Boolean(true))))
@@ -471,6 +485,7 @@ public class DurableClientTestCase extends DistributedTestCase {
    * Test that disconnecting a durable client for longer than the timeout
    * period is correctly processed by the server.
    */
+  @Test
   public void testStartStopTimeoutDurableClient() {
     // Start a server
     int serverPort = ((Integer) this.server1VM.invoke(() -> CacheServerTestUtil.createCacheServer(regionName,
new Boolean(true))))
@@ -552,6 +567,7 @@ public class DurableClientTestCase extends DistributedTestCase {
   /**
    * Test that a durable client correctly receives updates after it reconnects.
    */
+  @Test
   public void testDurableClientPrimaryUpdate() {
     // Start a server
     int serverPort = ((Integer) this.server1VM.invoke(() -> CacheServerTestUtil.createCacheServer(regionName,
new Boolean(true))))
@@ -720,6 +736,7 @@ public class DurableClientTestCase extends DistributedTestCase {
   /**
    * Test that a durable client correctly receives updates after it reconnects.
    */
+  @Test
   public void testStartStopStartDurableClientUpdate() {
     // Start a server
     int serverPort = ((Integer) this.server1VM.invoke(() -> CacheServerTestUtil.createCacheServer(regionName,
new Boolean(true))))
@@ -933,6 +950,7 @@ public class DurableClientTestCase extends DistributedTestCase {
    * Test whether a durable client reconnects properly to a server that is
    * stopped and restarted.
    */
+  @Test
   public void testDurableClientConnectServerStopStart() {
     // Start a server
     // Start server 1
@@ -1473,7 +1491,7 @@ public class DurableClientTestCase extends DistributedTestCase {
         try {
           if (spot.equals("CLIENT_PRE_RECONNECT")) {
             if (!reconnectLatch.await(60, TimeUnit.SECONDS)) {
-              throw new TestException("reonnect latch was never released.");
+              fail("reonnect latch was never released.");
             }
           }
           else if (spot.equals("DRAIN_IN_PROGRESS_BEFORE_DRAIN_LOCK_CHECK")) {
@@ -1481,7 +1499,7 @@ public class DurableClientTestCase extends DistributedTestCase {
             reconnectLatch.countDown();
             //we wait until the client is rejected
             if (!continueDrain.await(120, TimeUnit.SECONDS)) {
-              throw new TestException("Latch was never released.");
+              fail("Latch was never released.");
             }
           }
           else if (spot.equals("CLIENT_REJECTED_DUE_TO_CQ_BEING_DRAINED")) {
@@ -1522,7 +1540,7 @@ public class DurableClientTestCase extends DistributedTestCase {
             unblockClient.countDown();
             //Wait until client is reconnecting
             if (!unblockDrain.await(120, TimeUnit.SECONDS)) {
-              throw new TestException("client never got far enough reconnected to unlatch
lock.");
+              fail("client never got far enough reconnected to unlatch lock.");
             }
           }
           catch (InterruptedException e) {
@@ -1537,7 +1555,7 @@ public class DurableClientTestCase extends DistributedTestCase {
           //wait until the server has finished attempting to close the cq
           try {
             if (!finish.await(30, TimeUnit.SECONDS) ) {
-              throw new TestException("Test did not complete, server never finished attempting
to close cq");
+              fail("Test did not complete, server never finished attempting to close cq");
             }
           }
           catch (InterruptedException e) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1065776d/geode-cq/src/test/java/com/gemstone/gemfire/management/CacheServerManagementDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/management/CacheServerManagementDUnitTest.java
b/geode-cq/src/test/java/com/gemstone/gemfire/management/CacheServerManagementDUnitTest.java
index 29eccd2..5a96532 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/management/CacheServerManagementDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/management/CacheServerManagementDUnitTest.java
@@ -68,12 +68,11 @@ public class CacheServerManagementDUnitTest extends LocatorTestBase {
 
   private static MBeanServer mbeanServer = MBeanJMXAdapter.mbeanServer;
 
-  protected CqQueryDUnitTest cqDUnitTest = new CqQueryDUnitTest(
-      "CqDataDUnitTest");
+  protected CqQueryDUnitTest cqDUnitTest = new CqQueryDUnitTest();
 
   public CacheServerManagementDUnitTest() {
     super();
-    this.helper = new ManagementTestBase(name);
+    this.helper = new ManagementTestBase() {{}};
 
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1065776d/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestCQDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestCQDUnitTest.java
b/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestCQDUnitTest.java
index d101423..8ef2ad1 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestCQDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestCQDUnitTest.java
@@ -48,8 +48,7 @@ public class TestCQDUnitTest extends ManagementTestBase {
   private static final String queryName = "testClientWithFeederAndCQ_0";
   private static final String queryName2 = "testClientWithFeederAndCQ_3";
 
-  protected CqQueryDUnitTest cqDUnitTest = new CqQueryDUnitTest(
-      "CqDataDUnitTest");
+  protected CqQueryDUnitTest cqDUnitTest = new CqQueryDUnitTest();
 
   public TestCQDUnitTest() {
     super();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1065776d/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestClientsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestClientsDUnitTest.java
b/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestClientsDUnitTest.java
index c327b05..e290829 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestClientsDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestClientsDUnitTest.java
@@ -80,8 +80,7 @@ public class TestClientsDUnitTest extends ManagementTestBase {
     return Integer.valueOf(bean.getNumClients());
   }
 
-  protected CqQueryDUnitTest cqDUnitTest = new CqQueryDUnitTest(
-      "CqDataDUnitTest");
+  protected CqQueryDUnitTest cqDUnitTest = new CqQueryDUnitTest();
 
   @Test
   public void testNumOfClients() throws Exception {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1065776d/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestServerDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestServerDUnitTest.java
b/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestServerDUnitTest.java
index eb3a468..5e18f67 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestServerDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestServerDUnitTest.java
@@ -76,8 +76,7 @@ public class TestServerDUnitTest extends ManagementTestBase {
    
   }
 
-  protected CqQueryDUnitTest cqDUnitTest = new CqQueryDUnitTest(
-      "CqDataDUnitTest");
+  protected CqQueryDUnitTest cqDUnitTest = new CqQueryDUnitTest();
 
   @Test
   public void testNumOfServersDUnitTest() throws Exception {



Mime
View raw message