geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [14/26] incubator-geode git commit: GEODE-1099: NPE thrown from TXManagerImpl.isDistributed()
Date Thu, 17 Mar 2016 21:14:12 GMT
GEODE-1099: NPE thrown from TXManagerImpl.isDistributed()

fixing the DistTXManagerImplJUnitTest that was overriding the test added
in the last commit for this issue.


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

Branch: refs/heads/feature/GEODE-949-2
Commit: 79d2990eb2be920e93a5bb413830db0c8458fb91
Parents: 82faa8a
Author: Swapnil Bawaskar <sbawaskar@pivotal.io>
Authored: Wed Mar 16 10:28:11 2016 -0700
Committer: Swapnil Bawaskar <sbawaskar@pivotal.io>
Committed: Wed Mar 16 12:40:31 2016 -0700

----------------------------------------------------------------------
 .../gemstone/gemfire/disttx/DistTXManagerImplJUnitTest.java    | 6 ++++++
 .../gemfire/internal/cache/TXManagerImplJUnitTest.java         | 4 ++++
 2 files changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/79d2990e/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXManagerImplJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXManagerImplJUnitTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXManagerImplJUnitTest.java
index 1df2c45..e4db285 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXManagerImplJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXManagerImplJUnitTest.java
@@ -18,6 +18,7 @@ package com.gemstone.gemfire.disttx;
 
 import java.util.Properties;
 
+import com.gemstone.gemfire.internal.cache.TXManagerImpl;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.cache.CacheFactory;
@@ -27,6 +28,7 @@ import com.gemstone.gemfire.internal.cache.TXManagerImplJUnitTest;
 import com.gemstone.gemfire.test.junit.categories.DistributedTransactionsTest;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
+import static junit.framework.TestCase.assertTrue;
 
 /**
  * Same tests as that of {@link TXManagerImplJUnitTest} after setting
@@ -51,4 +53,8 @@ public class DistTXManagerImplJUnitTest extends TXManagerImplJUnitTest {
     assert(txmgr.isDistributed());
   }
 
+  @Override
+  protected void callIsDistributed(TXManagerImpl txMgr) {
+    assertTrue(txMgr.isDistributed());
+  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/79d2990e/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TXManagerImplJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TXManagerImplJUnitTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TXManagerImplJUnitTest.java
index 0467f4f..fa4c640 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TXManagerImplJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TXManagerImplJUnitTest.java
@@ -336,6 +336,10 @@ public class TXManagerImplJUnitTest {
   public void testIsDistributedDoesNotThrowNPE() {
     TXManagerImpl txMgr = (TXManagerImpl) cache.getCacheTransactionManager();
     cache.getDistributedSystem().disconnect();
+    callIsDistributed(txMgr);
+  }
+
+  protected void callIsDistributed(TXManagerImpl txMgr) {
     assertFalse(txMgr.isDistributed());
   }
 }


Mime
View raw message