This is an automated email from the ASF dual-hosted git repository. jianbin pushed a commit to branch 2.4.0 in repository https://gitbox.apache.org/repos/asf/incubator-seata.git
The following commit(s) were added to refs/heads/2.4.0 by this push: new 961ac2fa46 test: fix spring boot 3.2.0 test failed (#7302) 961ac2fa46 is described below commit 961ac2fa468fd563d067be5a97ed8bc71858b268 Author: jsbxyyx <jsbx...@163.com> AuthorDate: Fri Apr 18 16:43:04 2025 +0800 test: fix spring boot 3.2.0 test failed (#7302) --- .github/workflows/test-ubuntu.yml | 19 ++++++++++--------- .github/workflows/test.yml | 29 +++++++++++++++-------------- dependencies/pom.xml | 9 ++++++++- 3 files changed, 33 insertions(+), 24 deletions(-) diff --git a/.github/workflows/test-ubuntu.yml b/.github/workflows/test-ubuntu.yml index afd2ec3140..8f9b76fc79 100644 --- a/.github/workflows/test-ubuntu.yml +++ b/.github/workflows/test-ubuntu.yml @@ -37,14 +37,14 @@ jobs: MODE: standalone SPRING_SECURITY_ENABLED: false options: --health-cmd="curl -f http://localhost:8848/nacos" --health-interval=10s --health-timeout=5s --health-retries=3 --health-start-period=30s - runs-on: "${{ matrix.os }}-latest" + runs-on: "${{ matrix.os }}" strategy: max-parallel: 3 fail-fast: false matrix: java: [ 8, 11, 17, 21 ] os: [ - ubuntu, + ubuntu-24.04, ] springboot: [ 2.7.18 -D spring-framework.version=5.3.31, @@ -94,18 +94,19 @@ jobs: MODE: standalone SPRING_SECURITY_ENABLED: false options: --health-cmd="curl -f http://localhost:8848/nacos" --health-interval=10s --health-timeout=5s --health-retries=3 --health-start-period=30s - runs-on: "${{ matrix.os }}-latest" + runs-on: "${{ matrix.os }}" strategy: max-parallel: 3 fail-fast: false matrix: java: [ 17, 21 ] os: [ - ubuntu, + ubuntu-24.04, ] springboot: [ - 3.2.0 -D spring-framework.version=6.1.1, - 3.1.6 -D spring-framework.version=6.0.14, + 3.3.0 -D spring-framework.version=6.1.18 -D mockito.version=5.11.0 -D junit-jupiter.version=5.10.2, + 3.2.0 -D spring-framework.version=6.1.1 -D mockito.version=5.7.0 -D junit-jupiter.version=5.10.1, + 3.1.6 -D spring-framework.version=6.0.14 -D mockito.version=5.3.1 -D junit-jupiter.version=5.9.3, 3.0.13 -D spring-framework.version=6.0.14, ] steps: @@ -126,12 +127,12 @@ jobs: # step 4 ## step 4.1: for Ubuntu and MacOS - name: "Test with Maven on '${{ matrix.os }}' OS" - if: matrix.os != 'windows' + if: ${{ ! startsWith(matrix.os, 'windows') }} run: | ./mvnw -T 4C clean test -P args-for-client-test -Dspring-boot.version=${{ matrix.springboot }} -e -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn; ## step 4.2: for Windows - name: "Build with Maven on 'windows' OS (Skip tests)" - if: matrix.os == 'windows' + if: ${{ startsWith(matrix.os, 'windows') }} run: | # Skip tests, because too many errors in unit-test. ./mvnw.cmd -version; ./mvnw.cmd clean install -P args-for-client-test -DskipTests -D spring-boot.version=${{ matrix.springboot }} -e -B -D org.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn; @@ -139,7 +140,7 @@ jobs: # job 3 test-arm64: name: "test-arm64" - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 strategy: fail-fast: false matrix: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 18c9903b80..46479e7c1e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,15 +23,15 @@ jobs: # job 1 test: name: "test" - runs-on: "${{ matrix.os }}-latest" + runs-on: "${{ matrix.os }}" strategy: max-parallel: 3 fail-fast: false matrix: java: [ 8, 11, 17, 21 ] os: [ - macos, - windows, # Skip tests, because too many errors in unit-test. + macos-14, + windows-2022, # Skip tests, because too many errors in unit-test. ] springboot: [ 2.7.18 -D spring-framework.version=5.3.31, @@ -61,9 +61,9 @@ jobs: # step 4 ## step 4.1: for Ubuntu and MacOS - name: "Test with Maven on '${{ matrix.os }}' OS" - if: matrix.os != 'windows' + if: ${{ ! startsWith(matrix.os, 'windows') }} run: | - if [ "${{ matrix.os }}" == "macos" ]; then + if [[ "${{ matrix.os }}" =~ "macos" ]]; then python3 -m ensurepip --upgrade; python3 -m pip install --upgrade pip setuptools; if ! python3 -c "import distutils" &>/dev/null; then @@ -75,7 +75,7 @@ jobs: fi ## step 4.2: for Windows - name: "Build with Maven on 'windows' OS (Skip tests)" - if: matrix.os == 'windows' + if: ${{ startsWith(matrix.os, 'windows') }} run: | # Skip tests, because too many errors in unit-test. ./mvnw.cmd -version; ./mvnw.cmd clean install -P args-for-client-test -DskipTests -D spring-boot.version=${{ matrix.springboot }} -e -B -D org.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn; @@ -83,19 +83,20 @@ jobs: # job 2 test-springboot3x: name: "test-springboot3.x" - runs-on: "${{ matrix.os }}-latest" + runs-on: "${{ matrix.os }}" strategy: max-parallel: 3 fail-fast: false matrix: java: [ 17, 21 ] os: [ - macos, - windows, # Skip tests, because too many errors in unit-test. + macos-14, + windows-2022, # Skip tests, because too many errors in unit-test. ] springboot: [ - 3.2.0 -D spring-framework.version=6.1.1, - 3.1.6 -D spring-framework.version=6.0.14, + 3.3.0 -D spring-framework.version=6.1.18 -D mockito.version=5.11.0 -D junit-jupiter.version=5.10.2, + 3.2.0 -D spring-framework.version=6.1.1 -D mockito.version=5.7.0 -D junit-jupiter.version=5.10.1, + 3.1.6 -D spring-framework.version=6.0.14 -D mockito.version=5.3.1 -D junit-jupiter.version=5.9.3, 3.0.13 -D spring-framework.version=6.0.14, ] steps: @@ -116,9 +117,9 @@ jobs: # step 4 ## step 4.1: for Ubuntu and MacOS - name: "Test with Maven on '${{ matrix.os }}' OS" - if: matrix.os != 'windows' + if: ${{ ! startsWith(matrix.os, 'windows') }} run: | - if [ "${{ matrix.os }}" == "macos" ]; then + if [[ "${{ matrix.os }}" =~ "macos" ]]; then python3 -m ensurepip --upgrade; python3 -m pip install --upgrade pip setuptools; if ! python3 -c "import distutils" &>/dev/null; then @@ -130,7 +131,7 @@ jobs: fi ## step 4.2: for Windows - name: "Build with Maven on 'windows' OS (Skip tests)" - if: matrix.os == 'windows' + if: ${{ startsWith(matrix.os, 'windows') }} run: | # Skip tests, because too many errors in unit-test. ./mvnw.cmd -version; ./mvnw.cmd clean install -P args-for-client-test -DskipTests -D spring-boot.version=${{ matrix.springboot }} -e -B -D org.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn; diff --git a/dependencies/pom.xml b/dependencies/pom.xml index ac5059fb02..6cadbced39 100644 --- a/dependencies/pom.xml +++ b/dependencies/pom.xml @@ -135,6 +135,7 @@ <!-- # for test --> <mockito.version>4.11.0</mockito.version> + <mockito-inline.version>4.11.0</mockito-inline.version> <assertj-core.version>3.12.2</assertj-core.version> <janino-version>3.1.10</janino-version> <mockwebserver-version>4.12.0</mockwebserver-version> @@ -837,7 +838,13 @@ <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-inline</artifactId> - <version>${mockito.version}</version> + <version>${mockito-inline.version}</version> + <exclusions> + <exclusion> + <groupId>org.mockito</groupId> + <artifactId>mockito-core</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>org.assertj</groupId> --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org For additional commands, e-mail: notifications-h...@seata.apache.org