You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by bs...@apache.org on 2016/02/03 17:53:07 UTC

incubator-geode git commit: GEODE-560: ClientServerTransactionCCEDUnitTest.testEventTracker

Repository: incubator-geode
Updated Branches:
  refs/heads/develop f70954086 -> 43a2f41f4


GEODE-560: ClientServerTransactionCCEDUnitTest.testEventTracker

This test hasn't failed since a private build on 6 nov 2015 but I have
modified the test to find and install the transaction context in the test's
thread if it finds that the verification task is running in a different
RMI thread.

I've left an error message in that code so that we can tell that the fix
worked - it should fail with a suspect string but otherwise pass.  If this
happens the error message can be removed from the 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/43a2f41f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/43a2f41f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/43a2f41f

Branch: refs/heads/develop
Commit: 43a2f41f4340d4be38b79fc826a8393ab5c2245c
Parents: f709540
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Wed Feb 3 08:40:43 2016 -0800
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Wed Feb 3 08:44:59 2016 -0800

----------------------------------------------------------------------
 .../internal/cache/ClientServerTransactionDUnitTest.java    | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/43a2f41f/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerTransactionDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerTransactionDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerTransactionDUnitTest.java
index c19b7b6..b5a475e 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerTransactionDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerTransactionDUnitTest.java
@@ -2966,7 +2966,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
       }
     });
   }
-
+  
   /**
    * test that re-tried operations from client do not result in multiple ops in tx
    */
@@ -3053,6 +3053,13 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
       @Override
       public Object call() throws Exception {
         TXManagerImpl mgr = getGemfireCache().getTxManager();
+        if (mgr.getTXState() == null) {
+          // oops - different RMI thread this time.  Spit out a suspect string
+          // so that we can remove this log statement & know that the fix of
+          // setting the TXState works
+          getLogWriter().error("no tx state found for this thread");
+          mgr.setTXState(mgr.getHostedTXState(txid));
+        }
         mgr.commit();
         Region<CustId, Customer> pr = getGemfireCache().getRegion(CUSTOMER);
         CacheListener<CustId, Customer>[] clarray = pr.getAttributes().getCacheListeners();