You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by kl...@apache.org on 2016/03/11 18:19:36 UTC
[2/7] incubator-geode git commit: Cleaning up dunit
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/internal/JUnit4DistributedTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/internal/JUnit4DistributedTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/internal/JUnit4DistributedTestCase.java
index 01a3f49..be15c9a 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/internal/JUnit4DistributedTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/internal/JUnit4DistributedTestCase.java
@@ -129,6 +129,10 @@ public class JUnit4DistributedTestCase implements DistributedTestFixture, Serial
// methods for tests
//---------------------------------------------------------------------------
+ /**
+ * @deprecated Please override {@link #getDistributedSystemProperties()} instead.
+ */
+ @Deprecated
public final void setSystem(final Properties props, final DistributedSystem ds) { // TODO: override getDistributedSystemProperties and then delete
system = (InternalDistributedSystem)ds;
lastSystemProperties = props;
@@ -136,25 +140,18 @@ public class JUnit4DistributedTestCase implements DistributedTestFixture, Serial
}
/**
- * Returns this VM's connection to the distributed system. If
- * necessary, the connection will be lazily created using the given
- * <code>Properties</code>. Note that this method uses hydra's
- * configuration to determine the location of log files, etc.
- * Note: "final" was removed so that WANTestBase can override this method.
+ * Returns this VM's connection to the distributed system. If necessary, the
+ * connection will be lazily created using the given {@code Properties}.
+ *
+ * <p>Do not override this method. Override {@link #getDistributedSystemProperties()}
+ * instead.
+ *
+ * <p>Note: "final" was removed so that WANTestBase can override this method.
* This was part of the xd offheap merge.
*
- * see hydra.DistributedConnectionMgr#connect
* @since 3.0
*/
- @Override
- public /*final*/ InternalDistributedSystem getSystem(final Properties props) { // TODO: make final and remove from DistributedTestFixture
- if (this.distributedTestFixture != this) {
- return this.distributedTestFixture.getSystem(props);
- }
- return defaultGetSystem(props);
- }
-
- final InternalDistributedSystem defaultGetSystem(final Properties props) {
+ public final InternalDistributedSystem getSystem(final Properties props) {
// Setting the default disk store name is now done in setUp
if (system == null) {
system = InternalDistributedSystem.getAnyInstance();
@@ -214,10 +211,12 @@ public class JUnit4DistributedTestCase implements DistributedTestFixture, Serial
}
/**
- * Returns this VM's connection to the distributed system. If
- * necessary, the connection will be lazily created using the
- * <code>Properties</code> returned by {@link
- * #getDistributedSystemProperties}.
+ * Returns this VM's connection to the distributed system. If necessary, the
+ * connection will be lazily created using the {@code Properties} returned by
+ * {@link #getDistributedSystemProperties()}.
+ *
+ * <p>Do not override this method. Override {@link #getDistributedSystemProperties()}
+ * instead.
*
* @see #getSystem(Properties)
*
@@ -228,7 +227,7 @@ public class JUnit4DistributedTestCase implements DistributedTestFixture, Serial
}
public final InternalDistributedSystem basicGetSystem() {
- return this.system;
+ return system;
}
public final void nullSystem() { // TODO: delete
@@ -240,8 +239,7 @@ public class JUnit4DistributedTestCase implements DistributedTestFixture, Serial
}
/**
- * Returns a loner distributed system that isn't connected to other
- * vms
+ * Returns a loner distributed system that isn't connected to other vms.
*
* @since 6.5
*/
@@ -253,19 +251,16 @@ public class JUnit4DistributedTestCase implements DistributedTestFixture, Serial
}
/**
- * Returns whether or this VM is connected to a {@link
- * DistributedSystem}.
+ * Returns whether or this VM is connected to a {@link DistributedSystem}.
*/
public final boolean isConnectedToDS() {
return system != null && system.isConnected();
}
/**
- * Returns a {@code Properties} object used to configure a
- * connection to a {@link
- * com.gemstone.gemfire.distributed.DistributedSystem}.
- * Unless overridden, this method will return an empty
- * {@code Properties} object.
+ * Returns a {@code Properties} object used to configure a connection to a
+ * {@link DistributedSystem}. Unless overridden, this method will return an
+ * empty {@code Properties} object.
*
* <p>Override this as needed. Default implementation returns empty {@code Properties}.
*
@@ -291,8 +286,8 @@ public class JUnit4DistributedTestCase implements DistributedTestFixture, Serial
/**
* Disconnects this VM from the distributed system
*/
- public static final void disconnectFromDS() { // TODO: this is overridden by CacheTestCase
- setTestMethodName(null);
+ public static final void disconnectFromDS() {
+ //setTestMethodName(null);
GemFireCacheImpl.testCacheXml = null;
if (system != null) {
system.disconnect();
@@ -344,7 +339,7 @@ public class JUnit4DistributedTestCase implements DistributedTestFixture, Serial
/**
* Sets up the DistributedTestCase.
*
- * <p> Do not override this method. Override {@link #preSetUp()} with work that
+ * <p>Do not override this method. Override {@link #preSetUp()} with work that
* needs to occur before setUp() or override {@link #postSetUp()} with work
* that needs to occur after setUp().
*/
@@ -391,7 +386,6 @@ public class JUnit4DistributedTestCase implements DistributedTestFixture, Serial
public void preSetUp() throws Exception {
if (this.distributedTestFixture != this) {
this.distributedTestFixture.preSetUp();
- return;
}
}
@@ -404,7 +398,6 @@ public class JUnit4DistributedTestCase implements DistributedTestFixture, Serial
public void postSetUp() throws Exception {
if (this.distributedTestFixture != this) {
this.distributedTestFixture.postSetUp();
- return;
}
}
@@ -496,7 +489,6 @@ public class JUnit4DistributedTestCase implements DistributedTestFixture, Serial
public void preTearDown() throws Exception {
if (this.distributedTestFixture != this) {
this.distributedTestFixture.preTearDown();
- return;
}
}
@@ -509,11 +501,10 @@ public class JUnit4DistributedTestCase implements DistributedTestFixture, Serial
public void postTearDown() throws Exception {
if (this.distributedTestFixture != this) {
this.distributedTestFixture.postTearDown();
- return;
}
}
- public static final void cleanupAllVms() { // TODO: make private
+ private static final void cleanupAllVms() {
tearDownVM();
Invoke.invokeInEveryVM(()->tearDownVM());
Invoke.invokeInLocator(()->{
@@ -558,7 +549,7 @@ public class JUnit4DistributedTestCase implements DistributedTestFixture, Serial
IgnoredException.removeAllExpectedExceptions();
}
- private static final void closeCache() {
+ private static final void closeCache() { // TODO: this should move to CacheTestCase
GemFireCacheImpl cache = GemFireCacheImpl.getInstance();
if (cache != null && !cache.isClosed()) {
destroyRegions(cache);
@@ -566,7 +557,7 @@ public class JUnit4DistributedTestCase implements DistributedTestFixture, Serial
}
}
- protected static final void destroyRegions(final Cache cache) { // TODO: make private
+ protected static final void destroyRegions(final Cache cache) { // TODO: this should move to CacheTestCase
if (cache != null && !cache.isClosed()) {
// try to destroy the root regions first so that we clean up any persistent files.
for (Iterator itr = cache.rootRegions().iterator(); itr.hasNext();) {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/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 ebc6f53..bd473b3 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
@@ -63,10 +63,9 @@ public class CqDataDUnitTest extends CacheTestCase {
public CqDataDUnitTest(String name) {
super(name);
}
-
- public void setUp() throws Exception {
- super.setUp();
-
+
+ @Override
+ public final void postSetUp() throws Exception {
// avoid IllegalStateException from HandShake by connecting all vms tor
// system before creating ConnectionPools
getSystem();
@@ -75,7 +74,10 @@ public class CqDataDUnitTest extends CacheTestCase {
getSystem();
}
});
-
+ postSetUpCqDataDUnitTest();
+ }
+
+ protected void postSetUpCqDataDUnitTest() throws Exception {
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqDataOptimizedExecuteDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqDataOptimizedExecuteDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqDataOptimizedExecuteDUnitTest.java
index e185af1..89e1554 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqDataOptimizedExecuteDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqDataOptimizedExecuteDUnitTest.java
@@ -26,14 +26,14 @@ import com.gemstone.gemfire.test.dunit.SerializableRunnable;
* Test class for testing {@link CqServiceImpl#EXECUTE_QUERY_DURING_INIT} flag
*
*/
-public class CqDataOptimizedExecuteDUnitTest extends CqDataDUnitTest{
+public class CqDataOptimizedExecuteDUnitTest extends CqDataDUnitTest {
public CqDataOptimizedExecuteDUnitTest(String name) {
super(name);
}
- public void setUp() throws Exception {
- super.setUp();
+ @Override
+ protected final void postSetUpCqDataDUnitTest() throws Exception {
//We're seeing this on the server when the client
//disconnects.
IgnoredException.addIgnoredException("Connection reset");
@@ -45,7 +45,7 @@ public class CqDataOptimizedExecuteDUnitTest extends CqDataDUnitTest{
}
@Override
- protected final void preTearDownCacheTestCase() throws Exception {
+ public final void preTearDownCacheTestCase() throws Exception {
Invoke.invokeInEveryVM(new SerializableRunnable("getSystem") {
public void run() {
CqServiceImpl.EXECUTE_QUERY_DURING_INIT = true;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/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 a329a2b..2efc646 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
@@ -82,9 +82,9 @@ public class CqDataUsingPoolDUnitTest extends CacheTestCase {
public CqDataUsingPoolDUnitTest(String name) {
super(name);
}
-
- public void setUp() throws Exception {
- super.setUp();
+
+ @Override
+ public final void postSetUp() throws Exception {
// avoid IllegalStateException from HandShake by connecting all vms tor
// system before creating ConnectionPools
getSystem();
@@ -93,7 +93,10 @@ public class CqDataUsingPoolDUnitTest extends CacheTestCase {
getSystem();
}
});
-
+ postSetUpCqDataUsingPoolDUnitTest();
+ }
+
+ protected void postSetUpCqDataUsingPoolDUnitTest() throws Exception {
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqDataUsingPoolOptimizedExecuteDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqDataUsingPoolOptimizedExecuteDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqDataUsingPoolOptimizedExecuteDUnitTest.java
index 47b9a89..03bc48b 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqDataUsingPoolOptimizedExecuteDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqDataUsingPoolOptimizedExecuteDUnitTest.java
@@ -26,16 +26,20 @@ import com.gemstone.gemfire.test.dunit.SerializableRunnable;
* Test class for testing {@link CqServiceImpl#EXECUTE_QUERY_DURING_INIT} flag
*
*/
-public class CqDataUsingPoolOptimizedExecuteDUnitTest extends CqDataUsingPoolDUnitTest{
+public class CqDataUsingPoolOptimizedExecuteDUnitTest extends CqDataUsingPoolDUnitTest {
public CqDataUsingPoolOptimizedExecuteDUnitTest(String name) {
super(name);
}
- public void setUp() throws Exception {
+ @Override
+ public final void preSetUp() throws Exception {
IgnoredException.addIgnoredException("Read timed out");
IgnoredException.addIgnoredException("java.net.SocketException");
- super.setUp();
+ }
+
+ @Override
+ protected final void postSetUpCqDataUsingPoolDUnitTest() throws Exception {
Invoke.invokeInEveryVM(new SerializableRunnable("set test hook") {
public void run() {
CqServiceImpl.EXECUTE_QUERY_DURING_INIT = false;
@@ -44,7 +48,7 @@ public class CqDataUsingPoolOptimizedExecuteDUnitTest extends CqDataUsingPoolDUn
}
@Override
- protected final void preTearDownCacheTestCase() throws Exception {
+ public final void preTearDownCacheTestCase() throws Exception {
Invoke.invokeInEveryVM(new SerializableRunnable("getSystem") {
public void run() {
CqServiceImpl.EXECUTE_QUERY_DURING_INIT = true;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/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 97035f0..fc5b09a 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
@@ -57,10 +57,9 @@ public class CqPerfDUnitTest extends CacheTestCase {
public CqPerfDUnitTest(String name) {
super(name);
}
-
- public void setUp() throws Exception {
- super.setUp();
-
+
+ @Override
+ public final void postSetUp() throws Exception {
// avoid IllegalStateException from HandShake by connecting all vms tor
// system before creating connection pools
getSystem();
@@ -69,9 +68,7 @@ public class CqPerfDUnitTest extends CacheTestCase {
getSystem();
}
});
-
}
-
/**
* Tests the cq performance.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/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 e631886..4b8e321 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
@@ -57,10 +57,9 @@ public class CqPerfUsingPoolDUnitTest extends CacheTestCase {
public CqPerfUsingPoolDUnitTest(String name) {
super(name);
}
-
- public void setUp() throws Exception {
- super.setUp();
-
+
+ @Override
+ public final void postSetUp() throws Exception {
// avoid IllegalStateException from HandShake by connecting all vms tor
// system before creating connection pools
getSystem();
@@ -69,9 +68,7 @@ public class CqPerfUsingPoolDUnitTest extends CacheTestCase {
getSystem();
}
});
-
}
-
/**
* Tests the cq performance.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryDUnitTest.java
index 9730395..ff14a7d 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryDUnitTest.java
@@ -171,10 +171,9 @@ public class CqQueryDUnitTest extends CacheTestCase {
public CqQueryDUnitTest(String name) {
super(name);
}
-
- public void setUp() throws Exception {
- super.setUp();
-
+
+ @Override
+ public final void postSetUp() throws Exception {
// avoid IllegalStateException from HandShake by connecting all vms tor
// system before creating connection pools
getSystem();
@@ -183,7 +182,10 @@ public class CqQueryDUnitTest extends CacheTestCase {
getSystem();
}
});
-
+ postSetUpCqQueryDUnitTest();
+ }
+
+ protected void postSetUpCqQueryDUnitTest() throws Exception {
}
/* Returns Cache Server Port */
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryOptimizedExecuteDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryOptimizedExecuteDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryOptimizedExecuteDUnitTest.java
index a3ccf36..eda4d1d 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryOptimizedExecuteDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryOptimizedExecuteDUnitTest.java
@@ -36,14 +36,14 @@ import com.gemstone.gemfire.test.dunit.Wait;
* Test class for testing {@link CqServiceImpl#EXECUTE_QUERY_DURING_INIT} flag
*
*/
-public class CqQueryOptimizedExecuteDUnitTest extends CqQueryDUnitTest{
+public class CqQueryOptimizedExecuteDUnitTest extends CqQueryDUnitTest {
public CqQueryOptimizedExecuteDUnitTest(String name) {
super(name);
}
- public void setUp() throws Exception {
- super.setUp();
+ @Override
+ protected final void postSetUpCqQueryDUnitTest() throws Exception {
Invoke.invokeInEveryVM(new SerializableRunnable("getSystem") {
public void run() {
CqServiceImpl.EXECUTE_QUERY_DURING_INIT = false;
@@ -52,7 +52,7 @@ public class CqQueryOptimizedExecuteDUnitTest extends CqQueryDUnitTest{
}
@Override
- protected final void preTearDownCacheTestCase() throws Exception {
+ public final void preTearDownCacheTestCase() throws Exception {
Invoke.invokeInEveryVM(new SerializableRunnable("getSystem") {
public void run() {
CqServiceImpl.EXECUTE_QUERY_DURING_INIT = true;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryUsingPoolDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryUsingPoolDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryUsingPoolDUnitTest.java
index f333b77..be91665 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryUsingPoolDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryUsingPoolDUnitTest.java
@@ -159,10 +159,9 @@ public class CqQueryUsingPoolDUnitTest extends CacheTestCase {
public CqQueryUsingPoolDUnitTest(String name) {
super(name);
}
-
- public void setUp() throws Exception {
- super.setUp();
-
+
+ @Override
+ public final void postSetUp() throws Exception {
//We're seeing this on the server when the client
//disconnects.
IgnoredException.addIgnoredException("Connection reset");
@@ -178,7 +177,10 @@ public class CqQueryUsingPoolDUnitTest extends CacheTestCase {
getSystem();
}
});
-
+ postSetUpCqQueryUsingPoolDUnitTest();
+ }
+
+ protected void postSetUpCqQueryUsingPoolDUnitTest() throws Exception {
}
/* Returns Cache Server Port */
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryUsingPoolOptimizedExecuteDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryUsingPoolOptimizedExecuteDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryUsingPoolOptimizedExecuteDUnitTest.java
index cf3dc95..993dd42 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryUsingPoolOptimizedExecuteDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryUsingPoolOptimizedExecuteDUnitTest.java
@@ -30,8 +30,8 @@ public class CqQueryUsingPoolOptimizedExecuteDUnitTest extends CqQueryUsingPoolD
super(name);
}
- public void setUp() throws Exception {
- super.setUp();
+ @Override
+ public final void postSetUpCqQueryUsingPoolDUnitTest() throws Exception {
Invoke.invokeInEveryVM(new SerializableRunnable("getSystem") {
public void run() {
CqServiceImpl.EXECUTE_QUERY_DURING_INIT = false;
@@ -40,7 +40,7 @@ public class CqQueryUsingPoolOptimizedExecuteDUnitTest extends CqQueryUsingPoolD
}
@Override
- protected final void preTearDownCacheTestCase() throws Exception {
+ public final void preTearDownCacheTestCase() throws Exception {
Invoke.invokeInEveryVM(new SerializableRunnable("getSystem") {
public void run() {
CqServiceImpl.EXECUTE_QUERY_DURING_INIT = true;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqResultSetUsingPoolDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqResultSetUsingPoolDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqResultSetUsingPoolDUnitTest.java
index 35cef9d..5388f62 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqResultSetUsingPoolDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqResultSetUsingPoolDUnitTest.java
@@ -40,6 +40,7 @@ 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 junit.framework.TestResult;
/**
* This class tests the ContiunousQuery mechanism in GemFire.
@@ -130,10 +131,9 @@ public class CqResultSetUsingPoolDUnitTest extends CacheTestCase {
public CqResultSetUsingPoolDUnitTest(String name) {
super(name);
}
-
- public void setUp() throws Exception {
- super.setUp();
-
+
+ @Override
+ public final void postSetUp() throws Exception {
// avoid IllegalStateException from HandShake by connecting all vms tor
// system before creating ConnectionPools
getSystem();
@@ -142,10 +142,12 @@ public class CqResultSetUsingPoolDUnitTest extends CacheTestCase {
getSystem();
}
});
-
+ postSetUpCqResultSetUsingPoolDUnitTest();
}
-
-
+
+ protected void postSetUpCqResultSetUsingPoolDUnitTest() throws Exception {
+ }
+
/**
* Tests CQ Result Set.
*
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqResultSetUsingPoolOptimizedExecuteDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqResultSetUsingPoolOptimizedExecuteDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqResultSetUsingPoolOptimizedExecuteDUnitTest.java
index 2363d2d..d4e40fa 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqResultSetUsingPoolOptimizedExecuteDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqResultSetUsingPoolOptimizedExecuteDUnitTest.java
@@ -39,14 +39,14 @@ import com.gemstone.gemfire.test.dunit.SerializableRunnable;
import com.gemstone.gemfire.test.dunit.VM;
import com.gemstone.gemfire.test.dunit.Wait;
-public class CqResultSetUsingPoolOptimizedExecuteDUnitTest extends CqResultSetUsingPoolDUnitTest{
+public class CqResultSetUsingPoolOptimizedExecuteDUnitTest extends CqResultSetUsingPoolDUnitTest {
public CqResultSetUsingPoolOptimizedExecuteDUnitTest(String name) {
super(name);
}
- public void setUp() throws Exception {
- super.setUp();
+ @Override
+ protected final void postSetUpCqResultSetUsingPoolDUnitTest() throws Exception {
Invoke.invokeInEveryVM(new SerializableRunnable("getSystem") {
public void run() {
CqServiceImpl.EXECUTE_QUERY_DURING_INIT = false;
@@ -55,7 +55,7 @@ public class CqResultSetUsingPoolOptimizedExecuteDUnitTest extends CqResultSetUs
}
@Override
- protected final void preTearDownCacheTestCase() throws Exception {
+ public final void preTearDownCacheTestCase() throws Exception {
Invoke.invokeInEveryVM(new SerializableRunnable("getSystem") {
public void run() {
CqServiceImpl.EXECUTE_QUERY_DURING_INIT = true;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/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 6afdaec..094fcda 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
@@ -55,10 +55,9 @@ public class CqStatsDUnitTest extends CacheTestCase {
public CqStatsDUnitTest(String name) {
super(name);
}
-
- public void setUp() throws Exception {
- super.setUp();
-
+
+ @Override
+ public final void postSetUp() throws Exception {
// avoid IllegalStateException from HandShake by connecting all vms to
// system before creating pool
getSystem();
@@ -67,7 +66,10 @@ public class CqStatsDUnitTest extends CacheTestCase {
getSystem();
}
});
-
+ postSetUpCqStatsDUnitTest();
+ }
+
+ protected void postSetUpCqStatsDUnitTest() throws Exception {
}
public void validateCQStats(VM vm, final String cqName,
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStatsOptimizedExecuteDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStatsOptimizedExecuteDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStatsOptimizedExecuteDUnitTest.java
index df0b950..7d4a74e 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStatsOptimizedExecuteDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStatsOptimizedExecuteDUnitTest.java
@@ -24,14 +24,14 @@ import com.gemstone.gemfire.test.dunit.SerializableRunnable;
/**
* Test class for testing {@link CqServiceImpl#EXECUTE_QUERY_DURING_INIT} flag
*/
-public class CqStatsOptimizedExecuteDUnitTest extends CqStatsDUnitTest{
+public class CqStatsOptimizedExecuteDUnitTest extends CqStatsDUnitTest {
public CqStatsOptimizedExecuteDUnitTest(String name) {
super(name);
}
- public void setUp() throws Exception {
- super.setUp();
+ @Override
+ protected final void postSetUpCqStatsDUnitTest() throws Exception {
Invoke.invokeInEveryVM(new SerializableRunnable("getSystem") {
public void run() {
CqServiceImpl.EXECUTE_QUERY_DURING_INIT = false;
@@ -40,7 +40,7 @@ public class CqStatsOptimizedExecuteDUnitTest extends CqStatsDUnitTest{
}
@Override
- protected final void preTearDownCacheTestCase() throws Exception {
+ public final void preTearDownCacheTestCase() throws Exception {
Invoke.invokeInEveryVM(new SerializableRunnable("getSystem") {
public void run() {
CqServiceImpl.EXECUTE_QUERY_DURING_INIT = true;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/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 04e9b42..5a75cfb 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
@@ -55,10 +55,9 @@ public class CqStatsUsingPoolDUnitTest extends CacheTestCase {
public CqStatsUsingPoolDUnitTest(String name) {
super(name);
}
-
- public void setUp() throws Exception {
- super.setUp();
-
+
+ @Override
+ public final void postSetUp() throws Exception {
// avoid IllegalStateException from HandShake by connecting all vms to
// system before creating pool
getSystem();
@@ -67,7 +66,10 @@ public class CqStatsUsingPoolDUnitTest extends CacheTestCase {
getSystem();
}
});
-
+ postSetUpCqStatsUsingPoolDUnitTest();
+ }
+
+ protected void postSetUpCqStatsUsingPoolDUnitTest() throws Exception {
}
private void validateCQStats(VM vm, final String cqName,
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStatsUsingPoolOptimizedExecuteDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStatsUsingPoolOptimizedExecuteDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStatsUsingPoolOptimizedExecuteDUnitTest.java
index a959024..5ccb735 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStatsUsingPoolOptimizedExecuteDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStatsUsingPoolOptimizedExecuteDUnitTest.java
@@ -24,14 +24,14 @@ import com.gemstone.gemfire.test.dunit.SerializableRunnable;
/**
* Test class for testing {@link CqServiceImpl#EXECUTE_QUERY_DURING_INIT} flag
*/
-public class CqStatsUsingPoolOptimizedExecuteDUnitTest extends CqStatsUsingPoolDUnitTest{
+public class CqStatsUsingPoolOptimizedExecuteDUnitTest extends CqStatsUsingPoolDUnitTest {
public CqStatsUsingPoolOptimizedExecuteDUnitTest(String name) {
super(name);
}
- public void setUp() throws Exception {
- super.setUp();
+ @Override
+ public final void postSetUpCqStatsUsingPoolDUnitTest() throws Exception {
Invoke.invokeInEveryVM(new SerializableRunnable("getSystem") {
public void run() {
CqServiceImpl.EXECUTE_QUERY_DURING_INIT = false;
@@ -40,7 +40,7 @@ public class CqStatsUsingPoolOptimizedExecuteDUnitTest extends CqStatsUsingPoolD
}
@Override
- protected final void preTearDownCacheTestCase() throws Exception {
+ public final void preTearDownCacheTestCase() throws Exception {
Invoke.invokeInEveryVM(new SerializableRunnable("getSystem") {
public void run() {
CqServiceImpl.EXECUTE_QUERY_DURING_INIT = true;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PartitionedRegionCqQueryOptimizedExecuteDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PartitionedRegionCqQueryOptimizedExecuteDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PartitionedRegionCqQueryOptimizedExecuteDUnitTest.java
index 7989bc0..1913b4d 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PartitionedRegionCqQueryOptimizedExecuteDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PartitionedRegionCqQueryOptimizedExecuteDUnitTest.java
@@ -36,8 +36,8 @@ public class PartitionedRegionCqQueryOptimizedExecuteDUnitTest extends Partition
super(name);
}
- public void setUp() throws Exception {
- super.setUp();
+ @Override
+ public final void postSetUp() throws Exception {
Invoke.invokeInEveryVM(new SerializableRunnable("getSystem") {
public void run() {
CqServiceImpl.EXECUTE_QUERY_DURING_INIT = false;
@@ -46,7 +46,7 @@ public class PartitionedRegionCqQueryOptimizedExecuteDUnitTest extends Partition
}
@Override
- protected final void preTearDownCacheTestCase() throws Exception {
+ public final void preTearDownCacheTestCase() throws Exception {
Invoke.invokeInEveryVM(new SerializableRunnable("getSystem") {
public void run() {
CqServiceImpl.EXECUTE_QUERY_DURING_INIT = true;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PrCqUsingPoolOptimizedExecuteDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PrCqUsingPoolOptimizedExecuteDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PrCqUsingPoolOptimizedExecuteDUnitTest.java
index d71a7be..bc552aa 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PrCqUsingPoolOptimizedExecuteDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PrCqUsingPoolOptimizedExecuteDUnitTest.java
@@ -24,14 +24,14 @@ import com.gemstone.gemfire.test.dunit.SerializableRunnable;
* Test class for testing {@link CqServiceImpl#EXECUTE_QUERY_DURING_INIT} flag
*
*/
-public class PrCqUsingPoolOptimizedExecuteDUnitTest extends PrCqUsingPoolDUnitTest{
+public class PrCqUsingPoolOptimizedExecuteDUnitTest extends PrCqUsingPoolDUnitTest {
public PrCqUsingPoolOptimizedExecuteDUnitTest(String name) {
super(name);
}
- public void setUp() throws Exception {
- super.setUp();
+ @Override
+ public final void postSetUp() throws Exception {
Invoke.invokeInEveryVM(new SerializableRunnable("getSystem") {
public void run() {
CqServiceImpl.EXECUTE_QUERY_DURING_INIT = false;
@@ -40,7 +40,7 @@ public class PrCqUsingPoolOptimizedExecuteDUnitTest extends PrCqUsingPoolDUnitTe
}
@Override
- protected final void preTearDownCacheTestCase() throws Exception {
+ public final void preTearDownCacheTestCase() throws Exception {
Invoke.invokeInEveryVM(new SerializableRunnable("getSystem") {
public void run() {
CqServiceImpl.EXECUTE_QUERY_DURING_INIT = true;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/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 7fa5077..9bcb341 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
@@ -79,7 +79,7 @@ public abstract class PdxQueryCQTestBase extends CacheTestCase {
}
@Override
- protected final void preTearDownCacheTestCase() throws Exception {
+ public final void preTearDownCacheTestCase() throws Exception {
disconnectAllFromDS(); // tests all expect to create a new ds
// Reset the testObject numinstance for the next test.
TestObject.numInstance = 0;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/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 8008c3a..49a0360 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
@@ -172,7 +172,7 @@ public class QueryMonitorDUnitTest extends CacheTestCase {
}
@Override
- protected final void preTearDownCacheTestCase() throws Exception {
+ public final void preTearDownCacheTestCase() throws Exception {
Host host = Host.getHost(0);
disconnectFromDS();
// shut down clients before servers
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-cq/src/test/java/com/gemstone/gemfire/cache/snapshot/ClientSnapshotDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/snapshot/ClientSnapshotDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/cache/snapshot/ClientSnapshotDUnitTest.java
index 540b37b..08ad752 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/snapshot/ClientSnapshotDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/snapshot/ClientSnapshotDUnitTest.java
@@ -232,9 +232,9 @@ public class ClientSnapshotDUnitTest extends CacheTestCase {
assertFalse(region.containsValueForKey(1));
assertNull(region.get(1));
}
-
- public void setUp() throws Exception {
- super.setUp();
+
+ @Override
+ public final void postSetUp() throws Exception {
loadCache();
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/PRDeltaPropagationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/PRDeltaPropagationDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/PRDeltaPropagationDUnitTest.java
index 12fd791..e8816f9 100755
--- a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/PRDeltaPropagationDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/PRDeltaPropagationDUnitTest.java
@@ -126,8 +126,8 @@ public class PRDeltaPropagationDUnitTest extends DistributedTestCase {
super(name);
}
- public void setUp() throws Exception {
- super.setUp();
+ @Override
+ public final void postSetUp() throws Exception {
Host host = Host.getHost(0);
dataStore1 = host.getVM(0);
dataStore2 = host.getVM(1);
@@ -1111,7 +1111,7 @@ public class PRDeltaPropagationDUnitTest extends DistributedTestCase {
}
@Override
- protected final void preTearDown() throws Exception {
+ public final void preTearDown() throws Exception {
closeCache();
client1.invoke(() -> PRDeltaPropagationDUnitTest.closeCache());
dataStore1.invoke(() -> PRDeltaPropagationDUnitTest.closeCache());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/RemoteCQTransactionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/RemoteCQTransactionDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/RemoteCQTransactionDUnitTest.java
index 4bca2c4..386fb63 100755
--- a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/RemoteCQTransactionDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/RemoteCQTransactionDUnitTest.java
@@ -123,7 +123,7 @@ public class RemoteCQTransactionDUnitTest extends CacheTestCase {
}
@Override
- protected final void preTearDownCacheTestCase() throws Exception {
+ public final void preTearDownCacheTestCase() throws Exception {
// try { Thread.sleep(5000); } catch (InterruptedException e) { } // FOR MANUAL TESTING OF STATS - DON"T KEEP THIS
try {
Invoke.invokeInEveryVM(verifyNoTxState);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/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 95d46a4..1656306 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
@@ -158,9 +158,8 @@ public class CQListGIIDUnitTest extends DistributedTestCase {
/**
* Sets up the test.
*/
- public void setUp() throws Exception {
- super.setUp();
-
+ @Override
+ public final void postSetUp() throws Exception {
final Host host = Host.getHost(0);
serverVM0 = host.getVM(0);
serverVM1 = host.getVM(1);
@@ -175,7 +174,7 @@ public class CQListGIIDUnitTest extends DistributedTestCase {
* Tears down the test.
*/
@Override
- protected final void preTearDown() throws Exception {
+ public final void preTearDown() throws Exception {
serverVM0.invoke(() -> ConflationDUnitTest.unsetIsSlowStart());
serverVM1.invoke(() -> ConflationDUnitTest.unsetIsSlowStart());
closeCache();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/ha/HADispatcherDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/ha/HADispatcherDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/ha/HADispatcherDUnitTest.java
index d74f3ff..824fa82 100755
--- a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/ha/HADispatcherDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/ha/HADispatcherDUnitTest.java
@@ -118,9 +118,7 @@ public class HADispatcherDUnitTest extends DistributedTestCase
}
@Override
- public void setUp() throws Exception
- {
- super.setUp();
+ public final void postSetUp() throws Exception {
final Host host = Host.getHost(0);
// Server1 VM
@@ -151,12 +149,10 @@ public class HADispatcherDUnitTest extends DistributedTestCase
NetworkUtils.getServerHostName(host),
new Integer(PORT1), new Integer(PORT2),
new Boolean(true) ));
- //createClientCache(new Integer(PORT1), new Integer(PORT2), new Boolean(true) );
-
}
@Override
- protected final void preTearDown() throws Exception {
+ public final void preTearDown() throws Exception {
client1.invoke(() -> HADispatcherDUnitTest.closeCache());
client2.invoke(() -> HADispatcherDUnitTest.closeCache());
// close server
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientToServerDeltaDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientToServerDeltaDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientToServerDeltaDUnitTest.java
index 0e589e4..6df5965 100755
--- a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientToServerDeltaDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientToServerDeltaDUnitTest.java
@@ -124,7 +124,8 @@ public class ClientToServerDeltaDUnitTest extends DistributedTestCase {
super(name);
}
- public void setUp() throws Exception {
+ @Override
+ public final void postSetUp() throws Exception {
disconnectAllFromDS();
final Host host = Host.getHost(0);
server = host.getVM(0);
@@ -134,7 +135,7 @@ public class ClientToServerDeltaDUnitTest extends DistributedTestCase {
}
@Override
- protected final void preTearDown() throws Exception {
+ public final void preTearDown() throws Exception {
// reset all flags
DeltaTestImpl.resetDeltaInvokationCounters();
server.invoke(() -> DeltaTestImpl.resetDeltaInvokationCounters());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DeltaPropagationWithCQDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DeltaPropagationWithCQDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DeltaPropagationWithCQDUnitTest.java
index 7316e0c..6e5521a 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DeltaPropagationWithCQDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DeltaPropagationWithCQDUnitTest.java
@@ -95,8 +95,8 @@ public class DeltaPropagationWithCQDUnitTest extends DistributedTestCase {
super(name);
}
- public void setUp() throws Exception {
- super.setUp();
+ @Override
+ public final void postSetUp() throws Exception {
Host host = Host.getHost(0);
server1 = host.getVM(0);
server2 = host.getVM(1);
@@ -105,7 +105,7 @@ public class DeltaPropagationWithCQDUnitTest extends DistributedTestCase {
}
@Override
- protected final void preTearDown() throws Exception {
+ public final void preTearDown() throws Exception {
server1.invoke(() -> DeltaPropagationWithCQDUnitTest.close());
server2.invoke(() -> DeltaPropagationWithCQDUnitTest.close());
client1.invoke(() -> DeltaPropagationWithCQDUnitTest.close());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DeltaToRegionRelationCQRegistrationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DeltaToRegionRelationCQRegistrationDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DeltaToRegionRelationCQRegistrationDUnitTest.java
index 824f2e7..579ac29 100755
--- a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DeltaToRegionRelationCQRegistrationDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DeltaToRegionRelationCQRegistrationDUnitTest.java
@@ -114,9 +114,9 @@ public class DeltaToRegionRelationCQRegistrationDUnitTest extends DistributedTes
public DeltaToRegionRelationCQRegistrationDUnitTest(String name) {
super(name);
}
-
- public void setUp() throws Exception
- {
+
+ @Override
+ public final void postSetUp() throws Exception {
disconnectAllFromDS();
Wait.pause(5000);
final Host host = Host.getHost(0);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientCrashDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientCrashDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientCrashDUnitTest.java
index dce35bf..399ecc4 100755
--- a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientCrashDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientCrashDUnitTest.java
@@ -33,8 +33,8 @@ public class DurableClientCrashDUnitTest extends DurableClientTestCase {
super(name);
}
- public void setUp() throws Exception {
- super.setUp();
+ @Override
+ protected final void postSetUpDurableClientTestCase() throws Exception {
configureClientStop1();
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/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 1fc2e9f..fc216d3 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
@@ -92,7 +92,8 @@ public class DurableClientTestCase extends DistributedTestCase {
super(name);
}
- public void setUp() throws Exception {
+ @Override
+ public final void postSetUp() throws Exception {
Host host = Host.getHost(0);
this.server1VM = host.getVM(0);
this.server2VM = host.getVM(1);
@@ -104,10 +105,14 @@ public class DurableClientTestCase extends DistributedTestCase {
setTestMethodName(getName());
assertEquals(getName(), getTestMethodName());
System.out.println("\n\n[setup] START TEST " + getClass().getSimpleName()+"."+ getTestMethodName()+"\n\n");
+ postSetUpDurableClientTestCase();
+ }
+
+ protected void postSetUpDurableClientTestCase() throws Exception {
}
@Override
- protected final void preTearDown() throws Exception {
+ public final void preTearDown() throws Exception {
preTearDownDurableClientTestCase();
this.durableClientVM.invoke(() -> CacheServerTestUtil.closeCache());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/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 64bbe0c..b4006ba 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
@@ -88,9 +88,9 @@ public class CacheServerManagementDUnitTest extends LocatorTestBase {
}
- public void setUp() throws Exception {
+ @Override
+ public final void postSetUp() throws Exception {
disconnectAllFromDS();
- super.setUp();
}
@Override
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ClientCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ClientCommandsDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ClientCommandsDUnitTest.java
index 12b11e3..5e05561 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ClientCommandsDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ClientCommandsDUnitTest.java
@@ -1437,7 +1437,7 @@ private void setUpNonSubscribedClient() throws Exception {
}
@Override
- protected final void postTearDownCacheTestCase() throws Exception {
+ public final void postTearDownCacheTestCase() throws Exception {
Host.getHost(0).getVM(0).invoke(() -> CacheServerTestUtil.closeCache());
Host.getHost(0).getVM(1).invoke(() -> CacheServerTestUtil.closeCache());
Host.getHost(0).getVM(2).invoke(() -> CacheServerTestUtil.closeCache());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DurableClientCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DurableClientCommandsDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DurableClientCommandsDUnitTest.java
index bb97cf3..0a1f433 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DurableClientCommandsDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DurableClientCommandsDUnitTest.java
@@ -428,7 +428,7 @@ public class DurableClientCommandsDUnitTest extends CliCommandTestBase {
}
@Override
- protected final void postTearDownCacheTestCase() throws Exception {
+ public final void postTearDownCacheTestCase() throws Exception {
Host.getHost(0).getVM(0).invoke(() -> CacheServerTestUtil.closeCache());
Host.getHost(0).getVM(1).invoke(() -> CacheServerTestUtil.closeCache());
Host.getHost(0).getVM(2).invoke(() -> CacheServerTestUtil.closeCache());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/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 a8dcf59..a515db9 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
@@ -46,11 +46,6 @@ public class TestCQDUnitTest extends ManagementTestBase {
super(name);
}
- public void setUp() throws Exception {
- super.setUp();
-
- }
-
public static long getNumOfCQ() {
final WaitCriterion waitCriteria = new WaitCriterion() {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/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 5decf7d..55b304c 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
@@ -43,11 +43,6 @@ public class TestClientsDUnitTest extends ManagementTestBase {
super(name);
}
- public void setUp() throws Exception {
- super.setUp();
-
- }
-
public static Integer getNumOfClients() {
final WaitCriterion waitCriteria = new WaitCriterion() {
@Override
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/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 e632993..b37e43b 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
@@ -40,11 +40,6 @@ public class TestServerDUnitTest extends ManagementTestBase {
super(name);
}
- public void setUp() throws Exception {
- super.setUp();
-
- }
-
public static int getNumOfServersFromMBean() {
final WaitCriterion waitCriteria = new WaitCriterion() {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-cq/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTwoDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTwoDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTwoDUnitTest.java
index 9910c8a..f146160 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTwoDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTwoDUnitTest.java
@@ -42,9 +42,7 @@ public class ClientAuthorizationTwoDUnitTest extends
}
@Override
- public void setUp() throws Exception {
-
- super.setUp();
+ public final void postSetUp() throws Exception {
final Host host = Host.getHost(0);
server1 = host.getVM(0);
server2 = host.getVM(1);
@@ -227,7 +225,7 @@ public class ClientAuthorizationTwoDUnitTest extends
// End Region: Tests
@Override
- protected final void preTearDown() throws Exception {
+ public final void preTearDown() throws Exception {
// close the clients first
client1.invoke(() -> SecurityTestUtil.closeCache());
client2.invoke(() -> SecurityTestUtil.closeCache());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-cq/src/test/java/com/gemstone/gemfire/security/ClientAuthzObjectModDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/security/ClientAuthzObjectModDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/security/ClientAuthzObjectModDUnitTest.java
index f415bb0..f2a0795 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/security/ClientAuthzObjectModDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/security/ClientAuthzObjectModDUnitTest.java
@@ -110,9 +110,8 @@ public class ClientAuthzObjectModDUnitTest extends ClientAuthorizationTestBase {
}
}
- public void setUp() throws Exception {
-
- super.setUp();
+ @Override
+ public final void postSetUp() throws Exception {
final Host host = Host.getHost(0);
server1 = host.getVM(0);
server2 = host.getVM(1);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-cq/src/test/java/com/gemstone/gemfire/security/ClientCQPostAuthorizationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/security/ClientCQPostAuthorizationDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/security/ClientCQPostAuthorizationDUnitTest.java
index 0cb125f..b185d7b 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/security/ClientCQPostAuthorizationDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/security/ClientCQPostAuthorizationDUnitTest.java
@@ -70,9 +70,8 @@ public class ClientCQPostAuthorizationDUnitTest extends
super(name);
}
- public void setUp() throws Exception {
-
- super.setUp();
+ @Override
+ public final void postSetUp() throws Exception {
getSystem();
Invoke.invokeInEveryVM(new SerializableRunnable("getSystem") {
public void run() {
@@ -93,7 +92,7 @@ public class ClientCQPostAuthorizationDUnitTest extends
}
@Override
- protected final void preTearDown() throws Exception {
+ public final void preTearDown() throws Exception {
client1.invoke(() -> SecurityTestUtil.closeCache());
client2.invoke(() -> SecurityTestUtil.closeCache());
server1.invoke(() -> SecurityTestUtil.closeCache());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-cq/src/test/java/com/gemstone/gemfire/security/ClientPostAuthorizationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/security/ClientPostAuthorizationDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/security/ClientPostAuthorizationDUnitTest.java
index 62bff2b..6b77396 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/security/ClientPostAuthorizationDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/security/ClientPostAuthorizationDUnitTest.java
@@ -46,9 +46,8 @@ public class ClientPostAuthorizationDUnitTest extends
super(name);
}
- public void setUp() throws Exception {
-
- super.setUp();
+ @Override
+ public final void postSetUp() throws Exception {
final Host host = Host.getHost(0);
server1 = host.getVM(0);
server2 = host.getVM(1);
@@ -378,7 +377,7 @@ public class ClientPostAuthorizationDUnitTest extends
// End Region: Tests
@Override
- protected final void preTearDown() throws Exception {
+ public final void preTearDown() throws Exception {
// close the clients first
client1.invoke(() -> SecurityTestUtil.closeCache());
client2.invoke(() -> SecurityTestUtil.closeCache());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-cq/src/test/java/com/gemstone/gemfire/security/MultiuserAPIDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/security/MultiuserAPIDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/security/MultiuserAPIDUnitTest.java
index 7161830..859d3c8 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/security/MultiuserAPIDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/security/MultiuserAPIDUnitTest.java
@@ -70,8 +70,8 @@ public class MultiuserAPIDUnitTest extends ClientAuthorizationTestBase {
AuthenticationFailedException.class.getName(),
SSLHandshakeException.class.getName()};
- public void setUp() throws Exception {
- super.setUp();
+ @Override
+ public final void postSetUp() throws Exception {
final Host host = Host.getHost(0);
server1 = host.getVM(0);
server2 = host.getVM(1);
@@ -372,7 +372,7 @@ public class MultiuserAPIDUnitTest extends ClientAuthorizationTestBase {
}
@Override
- protected final void preTearDown() throws Exception {
+ public final void preTearDown() throws Exception {
// close the clients first
client1.invoke(() -> SecurityTestUtil.closeCache());
client2.invoke(() -> SecurityTestUtil.closeCache());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-cq/src/test/java/com/gemstone/gemfire/security/MultiuserDurableCQAuthzDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/security/MultiuserDurableCQAuthzDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/security/MultiuserDurableCQAuthzDUnitTest.java
index 9f9d4c0..2491a77 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/security/MultiuserDurableCQAuthzDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/security/MultiuserDurableCQAuthzDUnitTest.java
@@ -61,8 +61,8 @@ public class MultiuserDurableCQAuthzDUnitTest extends
super(name);
}
- public void setUp() throws Exception {
- super.setUp();
+ @Override
+ public final void postSetUp() throws Exception {
getSystem();
Invoke.invokeInEveryVM(new SerializableRunnable("getSystem") {
public void run() {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/LuceneFunctionReadPathDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/LuceneFunctionReadPathDUnitTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/LuceneFunctionReadPathDUnitTest.java
index f24b136..901b363 100644
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/LuceneFunctionReadPathDUnitTest.java
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/LuceneFunctionReadPathDUnitTest.java
@@ -64,8 +64,7 @@ public class LuceneFunctionReadPathDUnitTest extends CacheTestCase {
}
@Override
- public void setUp() throws Exception {
- super.setUp();
+ public final void postSetUp() throws Exception {
Host host = Host.getHost(0);
server1 = host.getVM(0);
server2 = host.getVM(1);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/UpdateVersionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/UpdateVersionDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/UpdateVersionDUnitTest.java
index cae30d2..9ccbd01 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/UpdateVersionDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/UpdateVersionDUnitTest.java
@@ -81,7 +81,7 @@ public class UpdateVersionDUnitTest extends DistributedTestCase {
}
@Override
- protected final void preTearDown() throws Exception {
+ public final void preTearDown() throws Exception {
closeCache();
Invoke.invokeInEveryVM(new SerializableRunnable() { public void run() {
closeCache();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java
index 58292f7..4dc290a 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java
@@ -170,8 +170,9 @@ public class WANTestBase extends DistributedTestCase{
public WANTestBase(String name) {
super(name);
}
-
- public void setUp() throws Exception {
+
+ @Override
+ public final void postSetUp() throws Exception {
final Host host = Host.getHost(0);
vm0 = host.getVM(0);
vm1 = host.getVM(1);
@@ -182,8 +183,8 @@ public class WANTestBase extends DistributedTestCase{
vm6 = host.getVM(6);
vm7 = host.getVM(7);
//Need to set the test name after the VMs are created
- super.setUp();
- //this is done to vary the number of dispatchers for sender
+
+ //this is done to vary the number of dispatchers for sender
//during every test method run
shuffleNumDispatcherThreads();
Invoke.invokeInEveryVM(WANTestBase.class,"setNumDispatcherThreadsForTheRun",
@@ -191,6 +192,10 @@ public class WANTestBase extends DistributedTestCase{
IgnoredException.addIgnoredException("Connection refused");
IgnoredException.addIgnoredException("Software caused connection abort");
IgnoredException.addIgnoredException("Connection reset");
+ postSetUpWANTestBase();
+ }
+
+ protected void postSetUpWANTestBase() throws Exception {
}
public static void shuffleNumDispatcherThreads() {
@@ -5119,7 +5124,7 @@ public class WANTestBase extends DistributedTestCase{
}*/
@Override
- protected final void preTearDown() throws Exception {
+ public final void preTearDown() throws Exception {
cleanupVM();
List<AsyncInvocation> invocations = new ArrayList<AsyncInvocation>();
final Host host = Host.getHost(0);
@@ -5168,14 +5173,15 @@ public class WANTestBase extends DistributedTestCase{
}
@Override
- public InternalDistributedSystem getSystem(Properties props) {
+ public final Properties getDistributedSystemProperties() {
// For now all WANTestBase tests allocate off-heap memory even though
// many of them never use it.
// The problem is that WANTestBase has static methods that create instances
// of WANTestBase (instead of instances of the subclass). So we can't override
// this method so that only the off-heap subclasses allocate off heap memory.
+ Properties props = new Properties();
props.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "300m");
- return super.getSystem(props);
+ return props;
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/concurrent/ConcurrentParallelGatewaySenderDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/concurrent/ConcurrentParallelGatewaySenderDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/concurrent/ConcurrentParallelGatewaySenderDUnitTest.java
index 54b6431..670928f 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/concurrent/ConcurrentParallelGatewaySenderDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/concurrent/ConcurrentParallelGatewaySenderDUnitTest.java
@@ -43,10 +43,6 @@ public class ConcurrentParallelGatewaySenderDUnitTest extends WANTestBase {
super(name);
}
- public void setUp() throws Exception {
- super.setUp();
- }
-
/**
* Normal happy scenario test case.
* checks that all the dispatchers have successfully
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/concurrent/ConcurrentParallelGatewaySenderOperation_1_DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/concurrent/ConcurrentParallelGatewaySenderOperation_1_DUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/concurrent/ConcurrentParallelGatewaySenderOperation_1_DUnitTest.java
index ed48b15..28971ce 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/concurrent/ConcurrentParallelGatewaySenderOperation_1_DUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/concurrent/ConcurrentParallelGatewaySenderOperation_1_DUnitTest.java
@@ -33,9 +33,9 @@ public class ConcurrentParallelGatewaySenderOperation_1_DUnitTest extends WANTes
public ConcurrentParallelGatewaySenderOperation_1_DUnitTest(String name) {
super(name);
}
-
- public void setUp() throws Exception {
- super.setUp();
+
+ @Override
+ protected final void postSetUpWANTestBase() throws Exception {
IgnoredException.addIgnoredException("Broken pipe");
IgnoredException.addIgnoredException("Connection reset");
IgnoredException.addIgnoredException("Unexpected IOException");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/concurrent/ConcurrentParallelGatewaySenderOperation_2_DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/concurrent/ConcurrentParallelGatewaySenderOperation_2_DUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/concurrent/ConcurrentParallelGatewaySenderOperation_2_DUnitTest.java
index a387e29..3348140 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/concurrent/ConcurrentParallelGatewaySenderOperation_2_DUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/concurrent/ConcurrentParallelGatewaySenderOperation_2_DUnitTest.java
@@ -40,9 +40,9 @@ public class ConcurrentParallelGatewaySenderOperation_2_DUnitTest extends WANTes
public ConcurrentParallelGatewaySenderOperation_2_DUnitTest(String name) {
super(name);
}
-
- public void setUp() throws Exception {
- super.setUp();
+
+ @Override
+ protected final void postSetUpWANTestBase() throws Exception {
IgnoredException.addIgnoredException("RegionDestroyedException");
IgnoredException.addIgnoredException("Broken pipe");
IgnoredException.addIgnoredException("Connection reset");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/disttx/DistTXWANDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/disttx/DistTXWANDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/disttx/DistTXWANDUnitTest.java
index 529ad47..cfa2dc0 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/disttx/DistTXWANDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/disttx/DistTXWANDUnitTest.java
@@ -33,9 +33,8 @@ public class DistTXWANDUnitTest extends WANTestBase {
super(name);
}
- public void setUp() throws Exception {
- super.setUp();
-
+ @Override
+ protected final void postSetUpWANTestBase() throws Exception {
Invoke.invokeInEveryVM(new SerializableCallable() {
@Override
public Object call() throws Exception {
@@ -44,7 +43,6 @@ public class DistTXWANDUnitTest extends WANTestBase {
}
});
}
-
/*
* Disabled because it hangs with current implementation of notifying
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/NewWANConcurrencyCheckForDestroyDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/NewWANConcurrencyCheckForDestroyDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/NewWANConcurrencyCheckForDestroyDUnitTest.java
index e0e7836..fce71d3 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/NewWANConcurrencyCheckForDestroyDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/NewWANConcurrencyCheckForDestroyDUnitTest.java
@@ -50,10 +50,6 @@ public class NewWANConcurrencyCheckForDestroyDUnitTest extends WANTestBase {
super(name);
}
- public void setUp() throws Exception {
- super.setUp();
- }
-
public void testVersionTagTimestampForDestroy() {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/PDXNewWanDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/PDXNewWanDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/PDXNewWanDUnitTest.java
index a7e17b6..dd9ab09 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/PDXNewWanDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/PDXNewWanDUnitTest.java
@@ -31,10 +31,6 @@ public class PDXNewWanDUnitTest extends WANTestBase{
super(name);
}
- public void setUp() throws Exception {
- super.setUp();
- }
-
/**
* Test
* 1> Site 1 : 1 locator, 1 member
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/SenderWithTransportFilterDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/SenderWithTransportFilterDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/SenderWithTransportFilterDUnitTest.java
index a019751..10e82e6 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/SenderWithTransportFilterDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/SenderWithTransportFilterDUnitTest.java
@@ -48,10 +48,6 @@ public class SenderWithTransportFilterDUnitTest extends WANTestBase {
super(name);
}
- public void setUp() throws Exception {
- super.setUp();
- }
-
public void testSerialSenderWithTansportFilter() {
Integer lnPort = (Integer)vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId( 1 ));
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/ShutdownAllPersistentGatewaySenderDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/ShutdownAllPersistentGatewaySenderDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/ShutdownAllPersistentGatewaySenderDUnitTest.java
index 9028531..f821ab1 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/ShutdownAllPersistentGatewaySenderDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/ShutdownAllPersistentGatewaySenderDUnitTest.java
@@ -46,8 +46,7 @@ public class ShutdownAllPersistentGatewaySenderDUnitTest extends WANTestBase {
}
@Override
- public void setUp() throws Exception {
- super.setUp();
+ protected final void postSetUpWANTestBase() throws Exception {
IgnoredException.addIgnoredException("Cache is being closed by ShutdownAll");
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WANLocatorServerDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WANLocatorServerDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WANLocatorServerDUnitTest.java
index 54773ad..1f47c05 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WANLocatorServerDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WANLocatorServerDUnitTest.java
@@ -47,10 +47,9 @@ public class WANLocatorServerDUnitTest extends WANTestBase {
super(name);
}
- public void setUp() throws Exception {
- super.setUp();
+ @Override
+ protected final void postSetUpWANTestBase() throws Exception {
final Host host = Host.getHost(0);
-
}
public void test_3Locators_2Servers() {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WANSSLDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WANSSLDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WANSSLDUnitTest.java
index 36f1226..837599d 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WANSSLDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WANSSLDUnitTest.java
@@ -28,10 +28,6 @@ public class WANSSLDUnitTest extends WANTestBase{
super(name);
}
- public void setUp() throws Exception {
- super.setUp();
- }
-
public void testSenderSSLReceiverSSL(){
Integer lnPort = (Integer)vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId( 1 ));
Integer nyPort = (Integer)vm1.invoke(() -> WANTestBase.createFirstRemoteLocator( 2, lnPort ));
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WanAutoDiscoveryDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WanAutoDiscoveryDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WanAutoDiscoveryDUnitTest.java
index 42788d9..73c7e1d 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WanAutoDiscoveryDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WanAutoDiscoveryDUnitTest.java
@@ -39,10 +39,9 @@ public class WanAutoDiscoveryDUnitTest extends WANTestBase {
super(name);
}
- public void setUp() throws Exception {
- super.setUp();
+ @Override
+ protected void postSetUpWANTestBase() throws Exception {
final Host host = Host.getHost(0);
-
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WanValidationsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WanValidationsDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WanValidationsDUnitTest.java
index 3d0c01b..dbe9844 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WanValidationsDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WanValidationsDUnitTest.java
@@ -41,10 +41,6 @@ public class WanValidationsDUnitTest extends WANTestBase {
super(name);
}
- public void setUp() throws Exception {
- super.setUp();
- }
-
/**
* Test to make sure that serial sender Ids configured in Distributed Region
* is same across all DR nodes TODO : Should this validation hold tru now.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
index 9e1b28c..5637fbc 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
@@ -40,9 +40,9 @@ public class ParallelGatewaySenderOperationsDUnitTest extends WANTestBase {
public ParallelGatewaySenderOperationsDUnitTest(String name) {
super(name);
}
-
- public void setUp() throws Exception {
- super.setUp();
+
+ @Override
+ protected final void postSetUpWANTestBase() throws Exception {
IgnoredException.addIgnoredException("Broken pipe||Unexpected IOException");
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderQueueOverflowDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderQueueOverflowDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderQueueOverflowDUnitTest.java
index 5e0142c..84d2cb8 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderQueueOverflowDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderQueueOverflowDUnitTest.java
@@ -57,10 +57,6 @@ public class ParallelGatewaySenderQueueOverflowDUnitTest extends WANTestBase {
super(name);
}
- public void setUp() throws Exception {
- super.setUp();
- }
-
public void testParallelSenderQueueEventsOverflow_NoDiskStoreSpecified() throws Exception {
Integer lnPort = (Integer)vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId( 1 ));
Integer nyPort = (Integer)vm1.invoke(() -> WANTestBase.createFirstRemoteLocator( 2, lnPort ));
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANConflationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANConflationDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANConflationDUnitTest.java
index b3c3445..6454e35 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANConflationDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANConflationDUnitTest.java
@@ -35,8 +35,8 @@ public class ParallelWANConflationDUnitTest extends WANTestBase {
super(name);
}
- public void setUp() throws Exception {
- super.setUp();
+ @Override
+ protected final void postSetUpWANTestBase() throws Exception {
IgnoredException.addIgnoredException("java.net.ConnectException");
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3543e224/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANPersistenceEnabledGatewaySenderDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANPersistenceEnabledGatewaySenderDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANPersistenceEnabledGatewaySenderDUnitTest.java
index a29a210..fd1f0ee 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANPersistenceEnabledGatewaySenderDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANPersistenceEnabledGatewaySenderDUnitTest.java
@@ -40,9 +40,9 @@ public class ParallelWANPersistenceEnabledGatewaySenderDUnitTest extends
public ParallelWANPersistenceEnabledGatewaySenderDUnitTest(String name) {
super(name);
}
-
- public void setUp() throws Exception {
- super.setUp();
+
+ @Override
+ protected final void postSetUpWANTestBase() throws Exception {
//The restart tests log this string
IgnoredException.addIgnoredException("failed accepting client connection");
}