You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by li...@apache.org on 2021/03/05 01:57:45 UTC
[dubbo] branch 2.6.x updated: Add Github Actions script for Dubbo
2.6.x (#7327)
This is an automated email from the ASF dual-hosted git repository.
liujun pushed a commit to branch 2.6.x
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/2.6.x by this push:
new 87a634d Add Github Actions script for Dubbo 2.6.x (#7327)
87a634d is described below
commit 87a634db05262f0274176218f0a5e7ed2f909eb6
Author: Albumen Kevin <jh...@gmail.com>
AuthorDate: Fri Mar 5 09:57:14 2021 +0800
Add Github Actions script for Dubbo 2.6.x (#7327)
---
.github/workflows/build-and-test-2.6.yml | 47 ++++++++++++++++++++++
.../rpc/cluster/router/tag/TagRouterTest.java | 11 +++--
.../support/AbstractClusterInvokerTest.java | 1 -
pom.xml | 2 +-
4 files changed, 56 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/build-and-test-2.6.yml b/.github/workflows/build-and-test-2.6.yml
new file mode 100644
index 0000000..6630867
--- /dev/null
+++ b/.github/workflows/build-and-test-2.6.yml
@@ -0,0 +1,47 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+name: Build and Test For Dubbo 2.6
+
+on: [push, pull_request, workflow_dispatch]
+
+jobs:
+ unit-test:
+ name: "Unit Test On JDK: ${{ matrix.jdk }}"
+ runs-on: ubuntu-18.04
+ strategy:
+ fail-fast: false
+ matrix:
+ jdk: [ 8, 11 ]
+ steps:
+ - uses: actions/checkout@v2
+ - name: "Set up JDK ${{ matrix.jdk }}"
+ uses: actions/setup-java@v1
+ with:
+ java-version: ${{ matrix.jdk }}
+ - uses: actions/cache@v2
+ name: "Cache local Maven repository"
+ with:
+ path: ~/.m2/repository
+ key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+ restore-keys: |
+ ${{ runner.os }}-maven-
+ - name: "Test with Maven"
+ timeout-minutes: 30
+ run: ./mvnw --batch-mode -U -e --no-transfer-progress clean test install -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.retryHandler.count=5 -DskipTests=false -Dcheckstyle.skip=false -Drat.skip=false -Dmaven.javadoc.skip=true
+ - name: "Upload coverage to Codecov"
+ uses: codecov/codecov-action@v1
\ No newline at end of file
diff --git a/dubbo-cluster/src/test/java/com/alibaba/dubbo/rpc/cluster/router/tag/TagRouterTest.java b/dubbo-cluster/src/test/java/com/alibaba/dubbo/rpc/cluster/router/tag/TagRouterTest.java
index 7b400b7..caee008 100644
--- a/dubbo-cluster/src/test/java/com/alibaba/dubbo/rpc/cluster/router/tag/TagRouterTest.java
+++ b/dubbo-cluster/src/test/java/com/alibaba/dubbo/rpc/cluster/router/tag/TagRouterTest.java
@@ -18,15 +18,13 @@ package com.alibaba.dubbo.rpc.cluster.router.tag;
import com.alibaba.dubbo.common.Constants;
import com.alibaba.dubbo.common.URL;
-import com.alibaba.dubbo.common.extension.ExtensionLoader;
import com.alibaba.dubbo.common.utils.NetUtils;
import com.alibaba.dubbo.rpc.Invoker;
import com.alibaba.dubbo.rpc.RpcContext;
import com.alibaba.dubbo.rpc.RpcInvocation;
import com.alibaba.dubbo.rpc.cluster.Router;
-import com.alibaba.dubbo.rpc.cluster.RouterFactory;
import com.alibaba.dubbo.rpc.cluster.router.MockInvoker;
-
+import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
@@ -43,6 +41,12 @@ public class TagRouterTest {
@Before
public void setUp() throws Exception {
+ RpcContext.getContext().clearAttachments();
+ }
+
+ @After
+ public void after() {
+ RpcContext.getContext().clearAttachments();
}
@Test
@@ -70,6 +74,7 @@ public class TagRouterTest {
Assert.assertFalse(filteredInvokers.contains(yellowInvoker));
Assert.assertFalse(filteredInvokers.contains(blueInvoker));
Assert.assertFalse(filteredInvokers.contains(defaultInvoker));
+
}
@Test
diff --git a/dubbo-cluster/src/test/java/com/alibaba/dubbo/rpc/cluster/support/AbstractClusterInvokerTest.java b/dubbo-cluster/src/test/java/com/alibaba/dubbo/rpc/cluster/support/AbstractClusterInvokerTest.java
index 8883ed6..aed5136 100644
--- a/dubbo-cluster/src/test/java/com/alibaba/dubbo/rpc/cluster/support/AbstractClusterInvokerTest.java
+++ b/dubbo-cluster/src/test/java/com/alibaba/dubbo/rpc/cluster/support/AbstractClusterInvokerTest.java
@@ -33,7 +33,6 @@ import com.alibaba.dubbo.rpc.cluster.filter.DemoService;
import com.alibaba.dubbo.rpc.cluster.loadbalance.LeastActiveLoadBalance;
import com.alibaba.dubbo.rpc.cluster.loadbalance.RandomLoadBalance;
import com.alibaba.dubbo.rpc.cluster.loadbalance.RoundRobinLoadBalance;
-
import junit.framework.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
diff --git a/pom.xml b/pom.xml
index 368700e..4e91a65 100644
--- a/pom.xml
+++ b/pom.xml
@@ -118,7 +118,7 @@
<maven_javadoc_version>3.0.1</maven_javadoc_version>
<maven_jetty_version>6.1.26</maven_jetty_version>
<maven_checkstyle_version>3.0.0</maven_checkstyle_version>
- <maven_jacoco_version>0.8.1</maven_jacoco_version>
+ <maven_jacoco_version>0.8.6</maven_jacoco_version>
<apache-rat-plugin.version>0.12</apache-rat-plugin.version>
<arguments />
<checkstyle.skip>true</checkstyle.skip>