You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2023/02/28 04:29:08 UTC
[shardingsphere] branch master updated: Update seata-all to handle cglib breaking unit test execution with GraalVM Tracing Agent (#24177)
This is an automated email from the ASF dual-hosted git repository.
zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new d7ccd64758b Update seata-all to handle cglib breaking unit test execution with GraalVM Tracing Agent (#24177)
d7ccd64758b is described below
commit d7ccd64758b35e82e64e285b13e7e6c47dc1585c
Author: Ling Hengqian <li...@outlook.com>
AuthorDate: Tue Feb 28 12:28:59 2023 +0800
Update seata-all to handle cglib breaking unit test execution with GraalVM Tracing Agent (#24177)
---
examples/pom.xml | 2 +-
kernel/transaction/type/base/seata-at/pom.xml | 8 +++++++-
.../base/seata/at/fixture/MockMessageHandler.java | 15 +++++++++++++++
3 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/examples/pom.xml b/examples/pom.xml
index af10e1d15ab..7f56445f2ed 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -60,7 +60,7 @@
<jboss-logging.version>3.2.1.Final</jboss-logging.version>
<btm.version>2.1.3</btm.version>
- <seata.version>1.4.2</seata.version>
+ <seata.version>1.6.1</seata.version>
<junit4.version>4.13.2</junit4.version>
<hamcrest.version>1.3</hamcrest.version>
diff --git a/kernel/transaction/type/base/seata-at/pom.xml b/kernel/transaction/type/base/seata-at/pom.xml
index 897e77130d4..79f10a03bd1 100644
--- a/kernel/transaction/type/base/seata-at/pom.xml
+++ b/kernel/transaction/type/base/seata-at/pom.xml
@@ -28,7 +28,7 @@
<name>${project.artifactId}</name>
<properties>
- <seata.version>1.4.2</seata.version>
+ <seata.version>1.6.1</seata.version>
</properties>
<dependencies>
@@ -51,5 +51,11 @@
<version>${seata.version}</version>
<scope>provided</scope>
</dependency>
+
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project>
diff --git a/kernel/transaction/type/base/seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/fixture/MockMessageHandler.java b/kernel/transaction/type/base/seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/fixture/MockMessageHandler.java
index 7e8fe3576cd..e1baff18706 100644
--- a/kernel/transaction/type/base/seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/fixture/MockMessageHandler.java
+++ b/kernel/transaction/type/base/seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/fixture/MockMessageHandler.java
@@ -88,6 +88,21 @@ public final class MockMessageHandler extends ChannelDuplexHandler {
response.setBody(HeartbeatMessage.PONG);
} else if (requestBody instanceof MergedWarpMessage) {
setMergeResultMessage(request, response);
+ } else if (requestBody instanceof GlobalBeginRequest) {
+ GlobalBeginResponse globalBeginResponse = new GlobalBeginResponse();
+ globalBeginResponse.setXid(XID.generateXID(id.incrementAndGet()));
+ globalBeginResponse.setResultCode(ResultCode.Success);
+ response.setBody(globalBeginResponse);
+ } else if (requestBody instanceof GlobalCommitRequest) {
+ GlobalCommitResponse globalCommitResponse = new GlobalCommitResponse();
+ globalCommitResponse.setResultCode(ResultCode.Success);
+ globalCommitResponse.setGlobalStatus(GlobalStatus.Committing);
+ response.setBody(globalCommitResponse);
+ } else if (requestBody instanceof GlobalRollbackRequest) {
+ GlobalRollbackResponse globalRollbackResponse = new GlobalRollbackResponse();
+ globalRollbackResponse.setResultCode(ResultCode.Success);
+ globalRollbackResponse.setGlobalStatus(GlobalStatus.Rollbacked);
+ response.setBody(globalRollbackResponse);
}
if (requestBody != HeartbeatMessage.PING) {
requestQueue.offer(requestBody);