Skip to content

Commit 14802ba

Browse files
authored
optimize: optimize druid 1.2.12 ci (#7536)
* opt: optimize druid 1.2.12 ci * opt: optimize druid 1.2.12 ci * opt: optimize druid 1.2.12 ci * opt: optimize druid 1.2.12 ci
1 parent 104b856 commit 14802ba

File tree

4 files changed

+5
-14
lines changed

4 files changed

+5
-14
lines changed

.github/workflows/test-druid.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,6 @@ jobs:
8787
# step 4
8888
- name: "Test with Maven and Druid ${{ matrix.druid }}"
8989
run: |
90-
if [ "${{ matrix.druid }}" = "1.2.12" ]; then
91-
export skip_druid_tests=false;
92-
fi
9390
./mvnw -T 4C clean test \
9491
-Ddruid.version=${{ matrix.druid }} \
9592
-e -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn;

changes/en-us/2.5.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ Add changes here for all PR submitted to the 2.x branch.
7777
- [[#7391](https://github.com/apache/incubator-seata/pull/7530)] optimize: upgrade tomcat to 9.0.105
7878
- [[#7390](https://github.com/apache/incubator-seata/pull/7530)] optimize: optimize license header check
7979
- [[#7389](https://github.com/apache/incubator-seata/pull/7530)] optimize: fix some js resource missing license header
80+
- [[#7536](https://github.com/apache/incubator-seata/pull/7536)] optimize: optimize druid 1.2.12 ci
8081

8182
### test:
8283

changes/zh-cn/2.5.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
- [[#7391](https://github.com/apache/incubator-seata/pull/7530)] 优化tomcat的9.0.105
7676
- [[#7390](https://github.com/apache/incubator-seata/pull/7530)] 优化license header checker
7777
- [[#7389](https://github.com/apache/incubator-seata/pull/7530)] 修复 js resource missing license header
78+
- [[#7536](https://github.com/apache/incubator-seata/pull/7536)] 优化druid 1.2.12 ci流水
7879

7980
### test:
8081

server/src/test/java/org/apache/seata/server/session/db/DataBaseSessionManagerTest.java

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
import org.junit.jupiter.api.Assertions;
3737
import org.junit.jupiter.api.BeforeAll;
3838
import org.junit.jupiter.api.Test;
39-
import org.junit.jupiter.api.condition.EnabledIf;
39+
import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
4040
import org.springframework.boot.test.context.SpringBootTest;
4141
import org.springframework.context.ApplicationContext;
4242
import org.springframework.context.annotation.Import;
@@ -56,9 +56,8 @@
5656
*/
5757
@SpringBootTest
5858
@Import(DynamicPortTestConfig.class)
59-
@EnabledIf(
60-
value = "org.apache.seata.server.session.db.DataBaseSessionManagerTest#isEnableDruidTest",
61-
disabledReason = "druid test is skipped")
59+
// Unit test triggered a bug in Druid, see the issue https://github.com/alibaba/druid/issues/4936
60+
@DisabledIfSystemProperty(named = "druid.version", matches = "1.2.12")
6261
public class DataBaseSessionManagerTest {
6362

6463
static SessionManager sessionManager = null;
@@ -67,15 +66,8 @@ public class DataBaseSessionManagerTest {
6766

6867
static BasicDataSource dataSource = null;
6968

70-
public static boolean isEnableDruidTest() {
71-
// Unit test triggered a bug in Druid, see the issue https://github.com/alibaba/druid/issues/4936
72-
String skipTests = System.getProperty("skip_druid_tests", "true");
73-
return Boolean.parseBoolean(skipTests);
74-
}
75-
7669
@BeforeAll
7770
public static void start(ApplicationContext context) throws Exception {
78-
// Unit test triggered a bug in Druid, see the issue https://github.com/alibaba/druid/issues/4936
7971
DataBaseSessionManager tempSessionManager = new DataBaseSessionManager();
8072
DataBaseTransactionStoreManager transactionStoreManager = DataBaseTransactionStoreManager.getInstance();
8173

0 commit comments

Comments
 (0)