You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/06/15 14:19:13 UTC

[GitHub] [dubbo-go] Mulavar opened a new pull request #1260: make the package v3router/judger test coverage rate reach 80%

Mulavar opened a new pull request #1260:
URL: https://github.com/apache/dubbo-go/pull/1260


   <!--  Thanks for sending a pull request!
   Read https://github.com/apache/dubbo-go/blob/master/contributing.md before commit pull request.
   -->
   
   **What this PR does**:
   
   **Which issue(s) this PR fixes**:
   <!--
   *Automatically closes linked issue when PR is merged.
   Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
   _If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_*
   -->
   Fixes #
   
   **Special notes for your reviewer**:
   
   **Does this PR introduce a user-facing change?**:
   <!--
   If no, just write "NONE" in the release-note block below.
   If yes, a release note is required:
   Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
   -->
   ```release-note
   
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] Mulavar commented on a change in pull request #1260: make the package v3router/judger test coverage rate reach 80%

Posted by GitBox <gi...@apache.org>.
Mulavar commented on a change in pull request #1260:
URL: https://github.com/apache/dubbo-go/pull/1260#discussion_r657049264



##########
File path: cluster/router/v3router/judger/list_string_match_judger_test.go
##########
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ */
+
+package judger
+
+import (
+	"dubbo.apache.org/dubbo-go/v3/config"

Review comment:
       this link is 404…




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] gaoxinge commented on a change in pull request #1260: make the package v3router/judger test coverage rate reach 80%

Posted by GitBox <gi...@apache.org>.
gaoxinge commented on a change in pull request #1260:
URL: https://github.com/apache/dubbo-go/pull/1260#discussion_r652326144



##########
File path: cluster/router/v3router/judger/list_string_match_judger_test.go
##########
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ */
+
+package judger
+
+import (
+	"dubbo.apache.org/dubbo-go/v3/config"

Review comment:
       move to a new import block, like https://github.com/apache/dubbo-go/blob/master/contributing.md#34-import

##########
File path: cluster/router/v3router/judger/attachment_match_judger.go
##########
@@ -29,45 +29,34 @@ type AttachmentMatchJudger struct {
 // nolint
 func (amj *AttachmentMatchJudger) Judge(invocation protocol.Invocation) bool {
 	invAttaMap := invocation.Attachments()
-	if amj.EagleeyeContext != nil {
-		for k, v := range amj.EagleeyeContext {
-			invAttaValue, ok := invAttaMap[k]
-			if !ok {
-				if v.Empty == "" {
-					return false
-				}
-				continue
-			}
-			// exist this key
-			str, ok := invAttaValue.(string)
-			if !ok {
-				return false
-			}
-			strJudger := NewStringMatchJudger(v)
-			if !strJudger.Judge(str) {
-				return false
-			}
-		}
+	if amj.EagleeyeContext != nil && !judge(amj.EagleeyeContext, invAttaMap) {
+		return false
 	}
 
-	if amj.DubboContext != nil {
-		for k, v := range amj.DubboContext {
-			invAttaValue, ok := invAttaMap[k]
-			if !ok {
-				if v.Empty == "" {
-					return false
-				}
-				continue
-			}
-			// exist this key
-			str, ok := invAttaValue.(string)
-			if !ok {
-				return false
-			}
-			strJudger := NewStringMatchJudger(v)
-			if !strJudger.Judge(str) {
+	if amj.DubboContext != nil && !judge(amj.DubboContext, invAttaMap) {
+		return false
+	}
+
+	return true
+}
+
+func judge(condition map[string]*config.StringMatch, invAttaMap map[string]interface{}) bool {
+	for k, v := range condition {
+		invAttaValue, ok := invAttaMap[k]
+		if !ok {
+			if v.Empty == "" {
 				return false
 			}
+			continue
+		}
+		// exist this key
+		str, ok := invAttaValue.(string)
+		if !ok {
+			return false
+		}
+		strJudger := NewStringMatchJudger(v)
+		if !strJudger.Judge(str) {

Review comment:
       directly use `return strJudger.Judge(str)`

##########
File path: cluster/router/v3router/judger/attachment_match_judger.go
##########
@@ -29,45 +29,34 @@ type AttachmentMatchJudger struct {
 // nolint
 func (amj *AttachmentMatchJudger) Judge(invocation protocol.Invocation) bool {
 	invAttaMap := invocation.Attachments()
-	if amj.EagleeyeContext != nil {
-		for k, v := range amj.EagleeyeContext {
-			invAttaValue, ok := invAttaMap[k]
-			if !ok {
-				if v.Empty == "" {
-					return false
-				}
-				continue
-			}
-			// exist this key
-			str, ok := invAttaValue.(string)
-			if !ok {
-				return false
-			}
-			strJudger := NewStringMatchJudger(v)
-			if !strJudger.Judge(str) {
-				return false
-			}
-		}
+	if amj.EagleeyeContext != nil && !judge(amj.EagleeyeContext, invAttaMap) {
+		return false
 	}
 
-	if amj.DubboContext != nil {
-		for k, v := range amj.DubboContext {
-			invAttaValue, ok := invAttaMap[k]
-			if !ok {
-				if v.Empty == "" {
-					return false
-				}
-				continue
-			}
-			// exist this key
-			str, ok := invAttaValue.(string)
-			if !ok {
-				return false
-			}
-			strJudger := NewStringMatchJudger(v)
-			if !strJudger.Judge(str) {
+	if amj.DubboContext != nil && !judge(amj.DubboContext, invAttaMap) {

Review comment:
       directly use `return amj.DubboContext == nil || judge(amj.DubboContext, invAttaMap)`

##########
File path: cluster/router/v3router/judger/attachment_match_judger.go
##########
@@ -29,45 +29,34 @@ type AttachmentMatchJudger struct {
 // nolint
 func (amj *AttachmentMatchJudger) Judge(invocation protocol.Invocation) bool {
 	invAttaMap := invocation.Attachments()
-	if amj.EagleeyeContext != nil {
-		for k, v := range amj.EagleeyeContext {
-			invAttaValue, ok := invAttaMap[k]
-			if !ok {
-				if v.Empty == "" {
-					return false
-				}
-				continue
-			}
-			// exist this key
-			str, ok := invAttaValue.(string)
-			if !ok {
-				return false
-			}
-			strJudger := NewStringMatchJudger(v)
-			if !strJudger.Judge(str) {
-				return false
-			}
-		}
+	if amj.EagleeyeContext != nil && !judge(amj.EagleeyeContext, invAttaMap) {
+		return false
 	}
 
-	if amj.DubboContext != nil {
-		for k, v := range amj.DubboContext {
-			invAttaValue, ok := invAttaMap[k]
-			if !ok {
-				if v.Empty == "" {
-					return false
-				}
-				continue
-			}
-			// exist this key
-			str, ok := invAttaValue.(string)
-			if !ok {
-				return false
-			}
-			strJudger := NewStringMatchJudger(v)
-			if !strJudger.Judge(str) {
+	if amj.DubboContext != nil && !judge(amj.DubboContext, invAttaMap) {
+		return false
+	}
+
+	return true
+}
+
+func judge(condition map[string]*config.StringMatch, invAttaMap map[string]interface{}) bool {
+	for k, v := range condition {
+		invAttaValue, ok := invAttaMap[k]
+		if !ok {
+			if v.Empty == "" {
 				return false
 			}
+			continue
+		}
+		// exist this key
+		str, ok := invAttaValue.(string)
+		if !ok {
+			return false
+		}
+		strJudger := NewStringMatchJudger(v)
+		if !strJudger.Judge(str) {

Review comment:
       directly use `return strJudger.Judge(str)`

##########
File path: cluster/router/v3router/judger/url_label_match_judge_test.go
##########
@@ -0,0 +1,35 @@
+/*
+ * 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.
+ */
+
+package judger
+
+import (
+	"dubbo.apache.org/dubbo-go/v3/common"

Review comment:
       move to a new import block, like https://github.com/apache/dubbo-go/blob/master/contributing.md#34-import

##########
File path: cluster/router/v3router/judger/method_match_judger_test.go
##########
@@ -0,0 +1,72 @@
+/*
+ * 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.
+ */
+
+package judger
+
+import (
+	"dubbo.apache.org/dubbo-go/v3/config"
+	"dubbo.apache.org/dubbo-go/v3/protocol/invocation"

Review comment:
       move to a new import block, like https://github.com/apache/dubbo-go/blob/master/contributing.md#34-import




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] Mulavar commented on a change in pull request #1260: make the package v3router/judger test coverage rate reach 80%

Posted by GitBox <gi...@apache.org>.
Mulavar commented on a change in pull request #1260:
URL: https://github.com/apache/dubbo-go/pull/1260#discussion_r657048754



##########
File path: cluster/router/v3router/judger/attachment_match_judger.go
##########
@@ -29,45 +29,34 @@ type AttachmentMatchJudger struct {
 // nolint
 func (amj *AttachmentMatchJudger) Judge(invocation protocol.Invocation) bool {
 	invAttaMap := invocation.Attachments()
-	if amj.EagleeyeContext != nil {
-		for k, v := range amj.EagleeyeContext {
-			invAttaValue, ok := invAttaMap[k]
-			if !ok {
-				if v.Empty == "" {
-					return false
-				}
-				continue
-			}
-			// exist this key
-			str, ok := invAttaValue.(string)
-			if !ok {
-				return false
-			}
-			strJudger := NewStringMatchJudger(v)
-			if !strJudger.Judge(str) {
-				return false
-			}
-		}
+	if amj.EagleeyeContext != nil && !judge(amj.EagleeyeContext, invAttaMap) {
+		return false
 	}
 
-	if amj.DubboContext != nil {
-		for k, v := range amj.DubboContext {
-			invAttaValue, ok := invAttaMap[k]
-			if !ok {
-				if v.Empty == "" {
-					return false
-				}
-				continue
-			}
-			// exist this key
-			str, ok := invAttaValue.(string)
-			if !ok {
-				return false
-			}
-			strJudger := NewStringMatchJudger(v)
-			if !strJudger.Judge(str) {
+	if amj.DubboContext != nil && !judge(amj.DubboContext, invAttaMap) {
+		return false
+	}
+
+	return true
+}
+
+func judge(condition map[string]*config.StringMatch, invAttaMap map[string]interface{}) bool {
+	for k, v := range condition {
+		invAttaValue, ok := invAttaMap[k]
+		if !ok {
+			if v.Empty == "" {
 				return false
 			}
+			continue
+		}
+		// exist this key
+		str, ok := invAttaValue.(string)
+		if !ok {
+			return false
+		}
+		strJudger := NewStringMatchJudger(v)
+		if !strJudger.Judge(str) {

Review comment:
       strJudger.Judge(str) 为 true 的时候需要遍历下一个条件继续做judge,不能直接返回




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] AlexStocks merged pull request #1260: make the package v3router/judger test coverage rate reach 80%

Posted by GitBox <gi...@apache.org>.
AlexStocks merged pull request #1260:
URL: https://github.com/apache/dubbo-go/pull/1260


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] Mulavar commented on a change in pull request #1260: make the package v3router/judger test coverage rate reach 80%

Posted by GitBox <gi...@apache.org>.
Mulavar commented on a change in pull request #1260:
URL: https://github.com/apache/dubbo-go/pull/1260#discussion_r657052980



##########
File path: cluster/router/v3router/judger/method_match_judger_test.go
##########
@@ -0,0 +1,72 @@
+/*
+ * 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.
+ */
+
+package judger
+
+import (
+	"dubbo.apache.org/dubbo-go/v3/config"
+	"dubbo.apache.org/dubbo-go/v3/protocol/invocation"

Review comment:
       thank u !




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] codecov-commenter edited a comment on pull request #1260: make the package v3router/judger test coverage rate reach 80%

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1260:
URL: https://github.com/apache/dubbo-go/pull/1260#issuecomment-861639051


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1260?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1260](https://codecov.io/gh/apache/dubbo-go/pull/1260?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (683fbb7) into [3.0](https://codecov.io/gh/apache/dubbo-go/commit/968650f658b63c11bb0409897d29c57b91cfaf50?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (968650f) will **decrease** coverage by `3.34%`.
   > The diff coverage is `55.14%`.
   
   > :exclamation: Current head 683fbb7 differs from pull request most recent head 49a2870. Consider uploading reports for the commit 49a2870 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/1260/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo-go/pull/1260?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##              3.0    #1260      +/-   ##
   ==========================================
   - Coverage   59.53%   56.18%   -3.35%     
   ==========================================
     Files         259      273      +14     
     Lines       12737    12818      +81     
   ==========================================
   - Hits         7583     7202     -381     
   - Misses       4199     4694     +495     
   + Partials      955      922      -33     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/1260?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [cluster/cluster\_impl/available\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvYXZhaWxhYmxlX2NsdXN0ZXJfaW52b2tlci5nbw==) | `66.66% <ø> (ø)` | |
   | [cluster/cluster\_impl/broadcast\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvYnJvYWRjYXN0X2NsdXN0ZXJfaW52b2tlci5nbw==) | `76.47% <ø> (ø)` | |
   | [cluster/cluster\_impl/failfast\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZmFpbGZhc3RfY2x1c3Rlcl9pbnZva2VyLmdv) | `66.66% <ø> (ø)` | |
   | [cluster/cluster\_impl/mock\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvbW9ja19jbHVzdGVyLmdv) | `0.00% <0.00%> (ø)` | |
   | [cluster/loadbalance/random.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9sb2FkYmFsYW5jZS9yYW5kb20uZ28=) | `100.00% <ø> (ø)` | |
   | [common/extension/auth.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL2V4dGVuc2lvbi9hdXRoLmdv) | `0.00% <ø> (ø)` | |
   | [common/extension/cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL2V4dGVuc2lvbi9jbHVzdGVyLmdv) | `0.00% <ø> (ø)` | |
   | [common/extension/cluster\_interceptor.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL2V4dGVuc2lvbi9jbHVzdGVyX2ludGVyY2VwdG9yLmdv) | `0.00% <0.00%> (ø)` | |
   | [common/extension/config\_center.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL2V4dGVuc2lvbi9jb25maWdfY2VudGVyLmdv) | `0.00% <ø> (ø)` | |
   | [common/extension/config\_center\_factory.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL2V4dGVuc2lvbi9jb25maWdfY2VudGVyX2ZhY3RvcnkuZ28=) | `0.00% <ø> (ø)` | |
   | ... and [280 more](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1260?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1260?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [5c2e47e...49a2870](https://codecov.io/gh/apache/dubbo-go/pull/1260?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] codecov-commenter commented on pull request #1260: make the package v3router/judger test coverage rate reach 80%

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #1260:
URL: https://github.com/apache/dubbo-go/pull/1260#issuecomment-861639051


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1260?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1260](https://codecov.io/gh/apache/dubbo-go/pull/1260?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (aa2a211) into [3.0](https://codecov.io/gh/apache/dubbo-go/commit/968650f658b63c11bb0409897d29c57b91cfaf50?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (968650f) will **decrease** coverage by `3.59%`.
   > The diff coverage is `53.28%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/1260/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo-go/pull/1260?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##              3.0    #1260      +/-   ##
   ==========================================
   - Coverage   59.53%   55.94%   -3.60%     
   ==========================================
     Files         259      273      +14     
     Lines       12737    12818      +81     
   ==========================================
   - Hits         7583     7171     -412     
   - Misses       4199     4742     +543     
   + Partials      955      905      -50     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/1260?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [cluster/cluster\_impl/available\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvYXZhaWxhYmxlX2NsdXN0ZXJfaW52b2tlci5nbw==) | `66.66% <ø> (ø)` | |
   | [cluster/cluster\_impl/broadcast\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvYnJvYWRjYXN0X2NsdXN0ZXJfaW52b2tlci5nbw==) | `76.47% <ø> (ø)` | |
   | [cluster/cluster\_impl/failfast\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZmFpbGZhc3RfY2x1c3Rlcl9pbnZva2VyLmdv) | `66.66% <ø> (ø)` | |
   | [cluster/cluster\_impl/mock\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvbW9ja19jbHVzdGVyLmdv) | `0.00% <0.00%> (ø)` | |
   | [cluster/loadbalance/random.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9sb2FkYmFsYW5jZS9yYW5kb20uZ28=) | `100.00% <ø> (ø)` | |
   | [common/extension/auth.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL2V4dGVuc2lvbi9hdXRoLmdv) | `0.00% <ø> (ø)` | |
   | [common/extension/cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL2V4dGVuc2lvbi9jbHVzdGVyLmdv) | `0.00% <ø> (ø)` | |
   | [common/extension/cluster\_interceptor.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL2V4dGVuc2lvbi9jbHVzdGVyX2ludGVyY2VwdG9yLmdv) | `0.00% <0.00%> (ø)` | |
   | [common/extension/config\_center.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL2V4dGVuc2lvbi9jb25maWdfY2VudGVyLmdv) | `0.00% <ø> (ø)` | |
   | [common/extension/config\_center\_factory.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL2V4dGVuc2lvbi9jb25maWdfY2VudGVyX2ZhY3RvcnkuZ28=) | `0.00% <ø> (ø)` | |
   | ... and [284 more](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1260?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1260?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [5c2e47e...aa2a211](https://codecov.io/gh/apache/dubbo-go/pull/1260?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] codecov-commenter edited a comment on pull request #1260: make the package v3router/judger test coverage rate reach 80%

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1260:
URL: https://github.com/apache/dubbo-go/pull/1260#issuecomment-861639051


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1260?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1260](https://codecov.io/gh/apache/dubbo-go/pull/1260?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (6cb49fe) into [3.0](https://codecov.io/gh/apache/dubbo-go/commit/968650f658b63c11bb0409897d29c57b91cfaf50?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (968650f) will **decrease** coverage by `3.28%`.
   > The diff coverage is `54.97%`.
   
   > :exclamation: Current head 6cb49fe differs from pull request most recent head e0007fc. Consider uploading reports for the commit e0007fc to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/1260/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo-go/pull/1260?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##              3.0    #1260      +/-   ##
   ==========================================
   - Coverage   59.53%   56.25%   -3.29%     
   ==========================================
     Files         259      272      +13     
     Lines       12737    12799      +62     
   ==========================================
   - Hits         7583     7200     -383     
   - Misses       4199     4685     +486     
   + Partials      955      914      -41     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/1260?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [cluster/cluster\_impl/available\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvYXZhaWxhYmxlX2NsdXN0ZXJfaW52b2tlci5nbw==) | `66.66% <ø> (ø)` | |
   | [cluster/cluster\_impl/broadcast\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvYnJvYWRjYXN0X2NsdXN0ZXJfaW52b2tlci5nbw==) | `76.47% <ø> (ø)` | |
   | [cluster/cluster\_impl/failfast\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZmFpbGZhc3RfY2x1c3Rlcl9pbnZva2VyLmdv) | `66.66% <ø> (ø)` | |
   | [cluster/cluster\_impl/mock\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvbW9ja19jbHVzdGVyLmdv) | `0.00% <0.00%> (ø)` | |
   | [cluster/loadbalance/random.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9sb2FkYmFsYW5jZS9yYW5kb20uZ28=) | `100.00% <ø> (ø)` | |
   | [common/extension/auth.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL2V4dGVuc2lvbi9hdXRoLmdv) | `0.00% <ø> (ø)` | |
   | [common/extension/cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL2V4dGVuc2lvbi9jbHVzdGVyLmdv) | `0.00% <ø> (ø)` | |
   | [common/extension/cluster\_interceptor.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL2V4dGVuc2lvbi9jbHVzdGVyX2ludGVyY2VwdG9yLmdv) | `0.00% <0.00%> (ø)` | |
   | [common/extension/config\_center.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL2V4dGVuc2lvbi9jb25maWdfY2VudGVyLmdv) | `0.00% <ø> (ø)` | |
   | [common/extension/config\_center\_factory.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL2V4dGVuc2lvbi9jb25maWdfY2VudGVyX2ZhY3RvcnkuZ28=) | `0.00% <ø> (ø)` | |
   | ... and [283 more](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1260?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1260?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [5c2e47e...e0007fc](https://codecov.io/gh/apache/dubbo-go/pull/1260?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] codecov-commenter edited a comment on pull request #1260: make the package v3router/judger test coverage rate reach 80%

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1260:
URL: https://github.com/apache/dubbo-go/pull/1260#issuecomment-861639051


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1260?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1260](https://codecov.io/gh/apache/dubbo-go/pull/1260?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e0007fc) into [3.0](https://codecov.io/gh/apache/dubbo-go/commit/968650f658b63c11bb0409897d29c57b91cfaf50?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (968650f) will **decrease** coverage by `3.37%`.
   > The diff coverage is `55.32%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/1260/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo-go/pull/1260?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##              3.0    #1260      +/-   ##
   ==========================================
   - Coverage   59.53%   56.16%   -3.38%     
   ==========================================
     Files         259      272      +13     
     Lines       12737    12799      +62     
   ==========================================
   - Hits         7583     7188     -395     
   - Misses       4199     4699     +500     
   + Partials      955      912      -43     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/1260?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [cluster/cluster\_impl/available\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvYXZhaWxhYmxlX2NsdXN0ZXJfaW52b2tlci5nbw==) | `66.66% <ø> (ø)` | |
   | [cluster/cluster\_impl/broadcast\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvYnJvYWRjYXN0X2NsdXN0ZXJfaW52b2tlci5nbw==) | `76.47% <ø> (ø)` | |
   | [cluster/cluster\_impl/failfast\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZmFpbGZhc3RfY2x1c3Rlcl9pbnZva2VyLmdv) | `66.66% <ø> (ø)` | |
   | [cluster/cluster\_impl/mock\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvbW9ja19jbHVzdGVyLmdv) | `0.00% <0.00%> (ø)` | |
   | [cluster/loadbalance/random.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9sb2FkYmFsYW5jZS9yYW5kb20uZ28=) | `100.00% <ø> (ø)` | |
   | [common/extension/auth.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL2V4dGVuc2lvbi9hdXRoLmdv) | `0.00% <ø> (ø)` | |
   | [common/extension/cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL2V4dGVuc2lvbi9jbHVzdGVyLmdv) | `0.00% <ø> (ø)` | |
   | [common/extension/cluster\_interceptor.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL2V4dGVuc2lvbi9jbHVzdGVyX2ludGVyY2VwdG9yLmdv) | `0.00% <0.00%> (ø)` | |
   | [common/extension/config\_center.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL2V4dGVuc2lvbi9jb25maWdfY2VudGVyLmdv) | `0.00% <ø> (ø)` | |
   | [common/extension/config\_center\_factory.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL2V4dGVuc2lvbi9jb25maWdfY2VudGVyX2ZhY3RvcnkuZ28=) | `0.00% <ø> (ø)` | |
   | ... and [283 more](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1260?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1260?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [5c2e47e...e0007fc](https://codecov.io/gh/apache/dubbo-go/pull/1260?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] codecov-commenter edited a comment on pull request #1260: make the package v3router/judger test coverage rate reach 80%

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1260:
URL: https://github.com/apache/dubbo-go/pull/1260#issuecomment-861639051


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1260?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1260](https://codecov.io/gh/apache/dubbo-go/pull/1260?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (6cb49fe) into [3.0](https://codecov.io/gh/apache/dubbo-go/commit/968650f658b63c11bb0409897d29c57b91cfaf50?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (968650f) will **decrease** coverage by `3.28%`.
   > The diff coverage is `54.97%`.
   
   > :exclamation: Current head 6cb49fe differs from pull request most recent head 49a2870. Consider uploading reports for the commit 49a2870 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/1260/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo-go/pull/1260?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##              3.0    #1260      +/-   ##
   ==========================================
   - Coverage   59.53%   56.25%   -3.29%     
   ==========================================
     Files         259      272      +13     
     Lines       12737    12799      +62     
   ==========================================
   - Hits         7583     7200     -383     
   - Misses       4199     4685     +486     
   + Partials      955      914      -41     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/1260?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [cluster/cluster\_impl/available\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvYXZhaWxhYmxlX2NsdXN0ZXJfaW52b2tlci5nbw==) | `66.66% <ø> (ø)` | |
   | [cluster/cluster\_impl/broadcast\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvYnJvYWRjYXN0X2NsdXN0ZXJfaW52b2tlci5nbw==) | `76.47% <ø> (ø)` | |
   | [cluster/cluster\_impl/failfast\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZmFpbGZhc3RfY2x1c3Rlcl9pbnZva2VyLmdv) | `66.66% <ø> (ø)` | |
   | [cluster/cluster\_impl/mock\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvbW9ja19jbHVzdGVyLmdv) | `0.00% <0.00%> (ø)` | |
   | [cluster/loadbalance/random.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9sb2FkYmFsYW5jZS9yYW5kb20uZ28=) | `100.00% <ø> (ø)` | |
   | [common/extension/auth.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL2V4dGVuc2lvbi9hdXRoLmdv) | `0.00% <ø> (ø)` | |
   | [common/extension/cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL2V4dGVuc2lvbi9jbHVzdGVyLmdv) | `0.00% <ø> (ø)` | |
   | [common/extension/cluster\_interceptor.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL2V4dGVuc2lvbi9jbHVzdGVyX2ludGVyY2VwdG9yLmdv) | `0.00% <0.00%> (ø)` | |
   | [common/extension/config\_center.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL2V4dGVuc2lvbi9jb25maWdfY2VudGVyLmdv) | `0.00% <ø> (ø)` | |
   | [common/extension/config\_center\_factory.go](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL2V4dGVuc2lvbi9jb25maWdfY2VudGVyX2ZhY3RvcnkuZ28=) | `0.00% <ø> (ø)` | |
   | ... and [283 more](https://codecov.io/gh/apache/dubbo-go/pull/1260/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1260?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1260?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [5c2e47e...49a2870](https://codecov.io/gh/apache/dubbo-go/pull/1260?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] gaoxinge commented on a change in pull request #1260: make the package v3router/judger test coverage rate reach 80%

Posted by GitBox <gi...@apache.org>.
gaoxinge commented on a change in pull request #1260:
URL: https://github.com/apache/dubbo-go/pull/1260#discussion_r657103919



##########
File path: cluster/router/v3router/judger/attachment_match_judger.go
##########
@@ -29,45 +29,34 @@ type AttachmentMatchJudger struct {
 // nolint
 func (amj *AttachmentMatchJudger) Judge(invocation protocol.Invocation) bool {
 	invAttaMap := invocation.Attachments()
-	if amj.EagleeyeContext != nil {
-		for k, v := range amj.EagleeyeContext {
-			invAttaValue, ok := invAttaMap[k]
-			if !ok {
-				if v.Empty == "" {
-					return false
-				}
-				continue
-			}
-			// exist this key
-			str, ok := invAttaValue.(string)
-			if !ok {
-				return false
-			}
-			strJudger := NewStringMatchJudger(v)
-			if !strJudger.Judge(str) {
-				return false
-			}
-		}
+	if amj.EagleeyeContext != nil && !judge(amj.EagleeyeContext, invAttaMap) {
+		return false
 	}
 
-	if amj.DubboContext != nil {
-		for k, v := range amj.DubboContext {
-			invAttaValue, ok := invAttaMap[k]
-			if !ok {
-				if v.Empty == "" {
-					return false
-				}
-				continue
-			}
-			// exist this key
-			str, ok := invAttaValue.(string)
-			if !ok {
-				return false
-			}
-			strJudger := NewStringMatchJudger(v)
-			if !strJudger.Judge(str) {
+	if amj.DubboContext != nil && !judge(amj.DubboContext, invAttaMap) {
+		return false
+	}
+
+	return true
+}
+
+func judge(condition map[string]*config.StringMatch, invAttaMap map[string]interface{}) bool {
+	for k, v := range condition {
+		invAttaValue, ok := invAttaMap[k]
+		if !ok {
+			if v.Empty == "" {
 				return false
 			}
+			continue
+		}
+		// exist this key
+		str, ok := invAttaValue.(string)
+		if !ok {
+			return false
+		}
+		strJudger := NewStringMatchJudger(v)
+		if !strJudger.Judge(str) {

Review comment:
       ok




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] gaoxinge commented on a change in pull request #1260: make the package v3router/judger test coverage rate reach 80%

Posted by GitBox <gi...@apache.org>.
gaoxinge commented on a change in pull request #1260:
URL: https://github.com/apache/dubbo-go/pull/1260#discussion_r657105668



##########
File path: cluster/router/v3router/judger/method_match_judger_test.go
##########
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+package judger
+
+import (
+	"reflect"
+	"testing"
+)
+
+import (
+	"github.com/stretchr/testify/assert"
+)
+
+import (
+	"dubbo.apache.org/dubbo-go/v3/config"
+	"dubbo.apache.org/dubbo-go/v3/protocol/invocation"
+)
+
+func TestMethodMatchJudger(t *testing.T) {
+
+	methodArgs := make([]*config.DubboMethodArg, 0)

Review comment:
       Remove blank line.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org