[ 
https://issues.apache.org/jira/browse/GEODE-8907?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17294828#comment-17294828
 ] 

ASF GitHub Bot commented on GEODE-8907:
---------------------------------------

pivotal-eshu commented on a change in pull request #6054:
URL: https://github.com/apache/geode/pull/6054#discussion_r586752182



##########
File path: 
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/ClientServerTransactionDUnitTest.java
##########
@@ -2076,10 +2078,11 @@ public Object call() throws Exception {
       }
     });
 
-    client.invoke(new SerializableCallable() {
+    TXId txid2 = (TXId) client.invoke(new SerializableCallable() {

Review comment:
       There is no need to have a new txId here, unless you want to assert this 
is the same as txId. There is only one transaction. Probably just ignore the 
return value here. And later resume the original txId instead of txid2.

##########
File path: 
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/RemoteTransactionDUnitTest.java
##########
@@ -3010,50 +3024,82 @@ public Object call() throws Exception {
       }
     });
 
-    SerializableCallable testFnOnDs = new SerializableCallable() {
-      @Override
-      public Object call() throws Exception {
-        TXManagerImpl mgr = getGemfireCache().getTXMgr();
-        PartitionedRegion pr = (PartitionedRegion) 
getGemfireCache().getRegion(CUSTOMER);
-        CustId keyOnDs = getKeyOnMember(pr.getMyId(), pr);
-        mgr.begin();
-        pr.get(keyOnDs);
-        Set filter = new HashSet();
-        filter.add(keyOnDs);
-        
FunctionService.onRegion(pr).withFilter(filter).execute(TXFunction.id).getResult();
-        assertEquals(expectedCustomer, pr.get(expectedCustId));
-        TXStateProxy tx = mgr.pauseTransaction();
-        assertNull(pr.get(expectedCustId));
-        mgr.unpauseTransaction(tx);
-        return null;
-      }
-    };
-    SerializableCallable closeTx = new SerializableCallable() {
-      @Override
-      public Object call() throws Exception {
-        Region custRegion = getGemfireCache().getRegion(CUSTOMER);
-        CacheTransactionManager mgr = getGemfireCache().getTXMgr();
-        mgr.commit();
-        assertEquals(expectedCustomer, custRegion.get(expectedCustId));
-        custRegion.destroy(expectedCustId);
-        return null;
-      }
-    };
-
     if (owner.equals(ds1)) {
-      datastore1.invoke(testFnOnDs);
+      TXId dsTxId = (TXId) datastore1.invoke(

Review comment:
       Should not duplicate the code here, should reuse the existing callables.
   
   To pass in different txIds in the callable, you can see how DoOpsInTX is 
implemented.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


> CI Failure: ClientServerTransactionCCEDUnitTest.testTxRemoveAll
> ---------------------------------------------------------------
>
>                 Key: GEODE-8907
>                 URL: https://issues.apache.org/jira/browse/GEODE-8907
>             Project: Geode
>          Issue Type: Bug
>          Components: tests
>    Affects Versions: 1.14.0
>            Reporter: Mark Hanson
>            Assignee: Louis R. Jacome
>            Priority: Major
>              Labels: pull-request-available
>
> [https://concourse.apachegeode-ci.info/teams/main/pipelines/apache-develop-main/jobs/DistributedTestOpenJDK8/builds/794]
>  reported a test failure 
>  
> {noformat}
> org.apache.geode.internal.cache.ClientServerTransactionCCEDUnitTest > 
> testTxRemoveAll FAILED
>     org.apache.geode.test.dunit.RMIException: While invoking 
> org.apache.geode.internal.cache.RemoteTransactionDUnitTest$34.call in VM 2 
> running on Host c44a375b0bbd with 4 VMs
>         Caused by:
>         java.lang.IllegalStateException: Thread does not have an active 
> transaction
>     org.apache.geode.test.dunit.RMIException: While invoking 
> org.apache.geode.internal.cache.RemoteTransactionDUnitTest$2.call in VM 0 
> running on Host c44a375b0bbd with 4 VMs
>         Caused by:
>         java.lang.AssertionError: Event never occurred after 30000 ms:  
> {noformat}
>  
> Logs available at
> {noformat}
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=  Test Results URI 
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> http://files.apachegeode-ci.info/builds/apache-develop-main/1.14.0-build.0655/test-results/distributedTest/1612232803/
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Test report artifacts from this job are available at:
> http://files.apachegeode-ci.info/builds/apache-develop-main/1.14.0-build.0655/test-artifacts/1612232803/distributedtestfiles-OpenJDK8-1.14.0-build.0655.tgz
>  {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to