This is an automated email from the ASF dual-hosted git repository.
jimin pushed a commit to branch 2.x
in repository https://gitbox.apache.org/repos/asf/incubator-seata.git
The following commit(s) were added to refs/heads/2.x by this push:
new f226c66ed7 test: optimize 1.2.12 test-druid CI (#7526)
f226c66ed7 is described below
commit f226c66ed76ec8def5823bf4e9b704645e963efe
Author: Jingliu <[email protected]>
AuthorDate: Sat Jul 12 20:51:27 2025 +0800
test: optimize 1.2.12 test-druid CI (#7526)
---
.github/workflows/test-druid.yml | 3 +++
changes/en-us/2.x.md | 3 ++-
changes/zh-cn/2.x.md | 4 ++--
.../seata/server/session/db/DataBaseSessionManagerTest.java | 11 +++++++++++
4 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/test-druid.yml b/.github/workflows/test-druid.yml
index b2285f344d..70d29b10f7 100644
--- a/.github/workflows/test-druid.yml
+++ b/.github/workflows/test-druid.yml
@@ -87,6 +87,9 @@ jobs:
# step 4
- name: "Test with Maven and Druid ${{ matrix.druid }}"
run: |
+ if [ "${{ matrix.druid }}" = "1.2.12" ]; then
+ export skip.druid.tests=false;
+ fi
./mvnw -T 4C clean test \
-Ddruid.version=${{ matrix.druid }} \
-e -B
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn;
diff --git a/changes/en-us/2.x.md b/changes/en-us/2.x.md
index cf2d1e2beb..ff94142587 100644
--- a/changes/en-us/2.x.md
+++ b/changes/en-us/2.x.md
@@ -73,6 +73,7 @@ Add changes here for all PR submitted to the 2.x branch.
- [[#7483](https://github.com/apache/incubator-seata/pull/7483)] change the
value of retryDeadThreshold to 70 seconds
- [[#7488](https://github.com/apache/incubator-seata/pull/7488)] upgrade
tomcat to 9.0.106
- [[#7518](https://github.com/apache/incubator-seata/pull/7518)] avoid using
unstable API in ChannelEventHandlerIntegrationTest
+- [[#7526](https://github.com/apache/incubator-seata/pull/7518)] optimze:
optimize 1.2.12 test-druid ci
### security:
@@ -148,7 +149,7 @@ Thanks to these contributors for their code commits. Please
report an unintended
- [diguage](https://github.com/diguage)
- [GoodBoyCoder](https://github.com/GoodBoyCoder)
- [xxsc0529](https://github.com/xxsc0529)
-
+- [xjlgod](https://github.com/xjlgod)
Also, we receive many valuable issues, questions and advices from our
community. Thanks for you all.
diff --git a/changes/zh-cn/2.x.md b/changes/zh-cn/2.x.md
index e197306f3f..721d3870a9 100644
--- a/changes/zh-cn/2.x.md
+++ b/changes/zh-cn/2.x.md
@@ -71,7 +71,7 @@
- [[#7478](https://github.com/apache/incubator-seata/pull/7478)] 增加处于重试状态的数据采集
- [[#7483](https://github.com/apache/incubator-seata/pull/7483)]
将retryDeadThreshold改为70秒
- [[#7518](https://github.com/apache/incubator-seata/pull/7518)] 避免在
ChannelEventHandlerIntegrationTest 中使用不稳定的 API
-
+- [[#7526](https://github.com/apache/incubator-seata/pull/7518)] 优化druid
1.2.12 ci
### security:
@@ -149,6 +149,6 @@
- [diguage](https://github.com/diguage)
- [GoodBoyCoder](https://github.com/GoodBoyCoder)
- [xxsc0529](https://github.com/xxsc0529)
-
+- [xjlgod](https://github.com/xjlgod)
同时,我们收到了社区反馈的很多有价值的issue和建议,非常感谢大家。
diff --git
a/server/src/test/java/org/apache/seata/server/session/db/DataBaseSessionManagerTest.java
b/server/src/test/java/org/apache/seata/server/session/db/DataBaseSessionManagerTest.java
index 2a32601f8c..34284bcfbf 100644
---
a/server/src/test/java/org/apache/seata/server/session/db/DataBaseSessionManagerTest.java
+++
b/server/src/test/java/org/apache/seata/server/session/db/DataBaseSessionManagerTest.java
@@ -36,6 +36,7 @@ import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.EnabledIf;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Import;
@@ -55,6 +56,9 @@ import static
org.apache.seata.common.DefaultValues.DEFAULT_TX_GROUP;
*/
@SpringBootTest
@Import(DynamicPortTestConfig.class)
+@EnabledIf(
+ value =
"org.apache.seata.server.session.db.DataBaseSessionManagerTest#isEnableDruidTest",
+ disabledReason = "druid test is skipped")
public class DataBaseSessionManagerTest {
static SessionManager sessionManager = null;
@@ -63,8 +67,15 @@ public class DataBaseSessionManagerTest {
static BasicDataSource dataSource = null;
+ public static boolean isEnableDruidTest() {
+ // Unit test triggered a bug in Druid, see the issue
https://github.com/alibaba/druid/issues/4936
+ String skipTests = System.getProperty("skip.druid.tests", "true");
+ return Boolean.parseBoolean(skipTests);
+ }
+
@BeforeAll
public static void start(ApplicationContext context) throws Exception {
+ // Unit test triggered a bug in Druid, see the issue
https://github.com/alibaba/druid/issues/4936
DataBaseSessionManager tempSessionManager = new
DataBaseSessionManager();
DataBaseTransactionStoreManager transactionStoreManager =
DataBaseTransactionStoreManager.getInstance();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]