You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by up...@apache.org on 2015/10/23 20:04:34 UTC

[2/2] incubator-geode git commit: GEODE-392: Using CacheTestCase.cache in DistTXDebugDUnitTest

GEODE-392: Using CacheTestCase.cache in DistTXDebugDUnitTest

This test was was extending CacheTestCase, but it had it's own static
cache. That means that in certain cases CacheTestCase's code to close
the cache nicely before removing the disk stores files wasn't being
invoked, if CacheTestCase had a static reference to a closed cache from
a previous test.


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

Branch: refs/heads/feature/GEODE-409
Commit: ca4991d89296db3bbba2adcfede517311971cd6e
Parents: 20c39d7
Author: Dan Smith <up...@apache.org>
Authored: Fri Oct 23 10:52:13 2015 -0700
Committer: Dan Smith <up...@apache.org>
Committed: Fri Oct 23 11:01:51 2015 -0700

----------------------------------------------------------------------
 .../gemfire/disttx/DistTXDebugDUnitTest.java    | 13 +------------
 .../disttx/DistTXPersistentDebugDUnitTest.java  | 20 ++++++++++++++++++++
 2 files changed, 21 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ca4991d8/gemfire-core/src/test/java/com/gemstone/gemfire/disttx/DistTXDebugDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/disttx/DistTXDebugDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/disttx/DistTXDebugDUnitTest.java
index 668f1e6..84dd2dc 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/disttx/DistTXDebugDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/disttx/DistTXDebugDUnitTest.java
@@ -37,7 +37,6 @@ public class DistTXDebugDUnitTest extends CacheTestCase {
   VM dataStore1 = null;
   VM dataStore2 = null;
   VM dataStore3 = null;
-  protected static Cache cache = null;
 
   public DistTXDebugDUnitTest(String name) {
     super(name);
@@ -62,20 +61,10 @@ public class DistTXDebugDUnitTest extends CacheTestCase {
       }
     });
     InternalResourceManager.setResourceObserver(null);
-    if (cache != null) {
-      cache.close();
-    }
   }
 
   public static void createCacheInVm() {
-    Properties props = new Properties();
-//    props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
-    // CacheFactory cf = new CacheFactory(props);
-    // new TxDUnit("temp").getCache(cf);
-    // new TxDUnit("temp").getCache();
-
-    InternalDistributedSystem ds = new DistTXDebugDUnitTest("temp").getSystem(props);
-    cache = CacheFactory.create(ds);
+    new DistTXDebugDUnitTest("temp").getCache();
   }
 
   protected void createCacheInAllVms() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ca4991d8/gemfire-core/src/test/java/com/gemstone/gemfire/disttx/DistTXPersistentDebugDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/disttx/DistTXPersistentDebugDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/disttx/DistTXPersistentDebugDUnitTest.java
index 48f933c..1824caa 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/disttx/DistTXPersistentDebugDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/disttx/DistTXPersistentDebugDUnitTest.java
@@ -8,11 +8,31 @@ import com.gemstone.gemfire.cache.DiskStore;
 import com.gemstone.gemfire.cache.PartitionAttributesFactory;
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.RegionAttributes;
+import com.gemstone.gemfire.distributed.DistributedMemberDUnitTest;
+import com.gemstone.gemfire.distributed.DistributedSystemDUnitTest;
+import com.gemstone.gemfire.distributed.LocatorDUnitTest;
+import com.gemstone.gemfire.distributed.RoleDUnitTest;
+import com.gemstone.gemfire.distributed.SystemAdminDUnitTest;
+import com.gemstone.gemfire.distributed.internal.Bug40751DUnitTest;
+import com.gemstone.gemfire.distributed.internal.ConsoleDistributionManagerDUnitTest;
+import com.gemstone.gemfire.distributed.internal.DistributionAdvisorDUnitTest;
+import com.gemstone.gemfire.distributed.internal.DistributionManagerDUnitTest;
+import com.gemstone.gemfire.distributed.internal.GemFireTimeSyncServiceDUnitTest;
+import com.gemstone.gemfire.distributed.internal.ProductUseLogDUnitTest;
+import com.gemstone.gemfire.distributed.internal.deadlock.GemFireDeadlockDetectorDUnitTest;
+import com.gemstone.gemfire.distributed.internal.streaming.StreamingOperationManyDUnitTest;
+import com.gemstone.gemfire.distributed.internal.streaming.StreamingOperationOneDUnitTest;
 import com.gemstone.gemfire.internal.cache.TXManagerImpl;
 import com.gemstone.gemfire.internal.cache.execute.data.CustId;
 import com.gemstone.gemfire.internal.cache.execute.data.Customer;
+import com.gemstone.gemfire.pdx.DistributedSystemIdDUnitTest;
+import com.gemstone.gemfire.pdx.JSONPdxClientServerDUnitTest;
+import com.gemstone.gemfire.pdx.PdxDeserializationDUnitTest;
+import com.gemstone.gemfire.pdx.PdxSerializableDUnitTest;
 
 import dunit.SerializableCallable;
+import junit.framework.Test;
+import junit.framework.TestSuite;
 
 public class DistTXPersistentDebugDUnitTest extends DistTXDebugDUnitTest {