diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml deleted file mode 100644 index cecbed7f0..000000000 --- a/.github/workflows/integration.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: integration test -on: - push: - branches: - - main - pull_request: - branches: - - main - workflow_dispatch: - -jobs: - build: - strategy: - matrix: - java: [ 8, 11, 17 ] - name: integration test - runs-on: ubuntu-latest - services: - polaris: - image: polarismesh/polaris-standalone:latest - ports: - - 8090:8090 - - 8091:8091 - - 8093:8093 - steps: - - name: Checkout codes - uses: actions/checkout@v3 - - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: ${{ matrix.java }} - - name: Cache local Maven repository - uses: actions/cache@v3 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - name: Build with Maven - run: mvn clean install -DskipTests -B -U -Psonatype --file pom.xml - - name: Integration test with Maven - run: mvn failsafe:integration-test -B -U -Psonatype --file pom.xml - diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 117ad0965..813916c42 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,9 +8,9 @@ jobs: release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Maven Central Repository - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: '8' distribution: 'temurin' diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index f7089e246..fe9f874b7 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -14,7 +14,7 @@ jobs: IS_SNAPSHOT: ${{ steps.set_output_1.outputs.IS_SNAPSHOT }} steps: - name: Checkout codes - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Check deploy type id: set_output_1 run: | @@ -30,9 +30,9 @@ jobs: needs: check-snapshot if: ${{ needs.check-snapshot.outputs.IS_SNAPSHOT == 'true' }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Maven Central Repository - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: '8' distribution: 'temurin' diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 8ef303619..5e488e2e4 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -16,19 +16,19 @@ jobs: build: strategy: matrix: - java: [ 8, 11, 17 ] + java: [ 8, 11, 17, 21 ] os: [ 'windows-latest', 'ubuntu-latest' ] runs-on: ${{ matrix.os }} steps: - name: Checkout codes - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: ${{ matrix.java }} - name: Cache local Maven repository - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} @@ -37,4 +37,4 @@ jobs: - name: Test with Maven run: mvn clean test -B -U -Psonatype --file pom.xml - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 diff --git a/polaris-plugins/polaris-plugins-healthchecker/healthchecker-http/src/test/java/com/tencent/polaris/plugins/outlier/detector/http/HttpHealthCheckerTest.java b/polaris-plugins/polaris-plugins-healthchecker/healthchecker-http/src/test/java/com/tencent/polaris/plugins/outlier/detector/http/HttpHealthCheckerTest.java index c23dfe020..8d9b15f35 100644 --- a/polaris-plugins/polaris-plugins-healthchecker/healthchecker-http/src/test/java/com/tencent/polaris/plugins/outlier/detector/http/HttpHealthCheckerTest.java +++ b/polaris-plugins/polaris-plugins-healthchecker/healthchecker-http/src/test/java/com/tencent/polaris/plugins/outlier/detector/http/HttpHealthCheckerTest.java @@ -45,16 +45,11 @@ import java.net.InetAddress; import java.net.InetSocketAddress; import java.util.Collection; -import java.util.HashMap; -import java.util.List; import java.util.Map; import java.util.Objects; import java.util.UUID; import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicReference; -import java.util.function.BiConsumer; import java.util.function.Consumer; import static com.tencent.polaris.test.common.TestUtils.SERVER_ADDRESS_ENV; @@ -263,7 +258,9 @@ public void handle(HttpExchange exchange) throws IOException { @Override public void close() throws IOException { - this.thread.stop(); + if (this.thread != null && this.thread.isAlive()) { + this.thread.interrupt(); + } } } } \ No newline at end of file diff --git a/pom.xml b/pom.xml index 44befb55c..94868ad29 100644 --- a/pom.xml +++ b/pom.xml @@ -66,7 +66,7 @@ - 2.0.1.0-RC1 + 2.0.1.0-SNAPSHOT ${maven.build.timestamp} false @@ -105,7 +105,6 @@ 3.0.1 3.2.4 3.0.0-M1 - 3.0.0-M5 1.2.5 3.1.0 2.7.5 @@ -197,19 +196,6 @@ - - org.apache.maven.plugins - maven-failsafe-plugin - ${maven.failsafe.plugin.version} - - - - integration-test - verify - - - - org.apache.maven.plugins maven-source-plugin