You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@seata.apache.org by "wt-better (via GitHub)" <gi...@apache.org> on 2024/11/16 13:27:56 UTC

[PR] feature: add saga anno test [incubator-seata-samples]

wt-better opened a new pull request, #701:
URL: https://github.com/apache/incubator-seata-samples/pull/701

   add saga anno test


-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@seata.apache.org
For additional commands, e-mail: dev-help@seata.apache.org


Re: [PR] feature: add saga anno test [incubator-seata-samples]

Posted by "slievrly (via GitHub)" <gi...@apache.org>.
slievrly commented on code in PR #701:
URL: https://github.com/apache/incubator-seata-samples/pull/701#discussion_r1864950795


##########
saga-sample/spring-seata-dubbo-saga/spring-seata-dubbo-saga-provider/src/main/java/org/apache/seata/provider/action/impl/SagaActionOneImpl.java:
##########
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.seata.provider.action.impl;
+
+import org.apache.seata.provider.action.SagaActionOne;
+import org.apache.seata.rm.tcc.api.BusinessActionContext;
+import org.apache.seata.rm.tcc.api.BusinessActionContextParameter;
+import org.apache.seata.saga.rm.api.CompensationBusinessAction;
+import org.springframework.util.Assert;
+import seata.util.ResultHolder;
+
+/**
+ * SagaActionOneImpl
+ */
+public class SagaActionOneImpl implements SagaActionOne {
+
+    @Override
+    @CompensationBusinessAction(name = "DubboSagaActionOne", compensationMethod = "compensation")
+    public boolean prepare(BusinessActionContext actionContext, @BusinessActionContextParameter(paramName = "a") int a) {
+        String xid = actionContext.getXid();
+        System.out.println("TccActionOne prepare, xid:" + xid + ", a:" + a);
+        ResultHolder.setActionOneResult(xid, "T");

Review Comment:
   ResultHolder was not found and should not cross package.



-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@seata.apache.org
For additional commands, e-mail: dev-help@seata.apache.org


Re: [PR] feature: add saga anno test [incubator-seata-samples]

Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #701:
URL: https://github.com/apache/incubator-seata-samples/pull/701#issuecomment-2480560977

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_incubator-seata-samples&pullRequest=701) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [16 New issues](https://sonarcloud.io/project/issues?id=apache_incubator-seata-samples&pullRequest=701&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_incubator-seata-samples&pullRequest=701&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-seata-samples&pullRequest=701&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_incubator-seata-samples&pullRequest=701&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [3.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_incubator-seata-samples&pullRequest=701&metric=new_duplicated_lines_density&view=list)  
     
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_incubator-seata-samples&pullRequest=701)
   
   


-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@seata.apache.org
For additional commands, e-mail: dev-help@seata.apache.org


Re: [PR] feature: add saga anno test [incubator-seata-samples]

Posted by "funky-eyes (via GitHub)" <gi...@apache.org>.
funky-eyes closed pull request #701: feature: add saga anno test
URL: https://github.com/apache/incubator-seata-samples/pull/701


-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@seata.apache.org
For additional commands, e-mail: dev-help@seata.apache.org