You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2021/12/15 12:16:22 UTC

[GitHub] [servicecomb-java-chassis] lbc97 opened a new pull request #2666: Handler配置文件不支持 *.hanlder.xml #2660

lbc97 opened a new pull request #2666:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2666


   Follow this checklist to help us incorporate your contribution quickly and easily:
   
    - [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/SCB) filed for the change (usually before you start working on it).  Trivial changes like typos do not require a JIRA issue.  Your pull request should address just this issue, without pulling in other changes.
    - [ ] Each commit in the pull request should have a meaningful subject line and body.
    - [ ] Format the pull request title like `[SCB-XXX] Fixes bug in ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA issue.
    - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
    - [ ] Run `mvn clean install -Pit` to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
    - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   ---
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] liubao68 commented on a change in pull request #2666: Handler配置文件不支持 *.hanlder.xml #2660

Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #2666:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2666#discussion_r770156486



##########
File path: core/src/main/java/org/apache/servicecomb/core/handler/HandlerConfigUtils.java
##########
@@ -31,8 +31,9 @@ private HandlerConfigUtils() {
   private static Config loadConfig() throws Exception {
     Config config = new Config();
 
-    List<Resource> resList =
-        PaaSResourceUtils.getSortedResources("classpath*:config/cse.handler.xml", ".handler.xml");
+    List<Resource> resList = PaaSResourceUtils.getResources(new String[]{"classpath*:config/*.handler.xml"});
+    PaaSResourceUtils.sortResources(resList, ".handler.xml");

Review comment:
       Suffix is not correct. Add test cases to make sure file name sorting is work as expected. 




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] liubao68 commented on a change in pull request #2666: Handler配置文件不支持 *.hanlder.xml #2660

Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #2666:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2666#discussion_r771805877



##########
File path: demo/demo-cse-v2/test-client/pom.xml
##########
@@ -42,6 +42,17 @@
       <groupId>org.apache.servicecomb.demo</groupId>
       <artifactId>demo-schema</artifactId>
     </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.13.1</version>
+    </dependency>
+    <dependency>
+      <groupId>org.testng</groupId>
+      <artifactId>testng</artifactId>
+      <version>RELEASE</version>
+      <scope>compile</scope>
+    </dependency>

Review comment:
       These dependencies are not needed




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] codecov-commenter commented on pull request #2666: Handler配置文件不支持 *.hanlder.xml #2660

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #2666:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2666#issuecomment-996519117


   # [Codecov](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2666?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 [#2666](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2666?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a2ba349) into [master](https://codecov.io/gh/apache/servicecomb-java-chassis/commit/8207a76ecb0620f989173ce5c5a776aaaea0af4d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8207a76) will **increase** coverage by `0.06%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2666/graphs/tree.svg?width=650&height=150&src=pr&token=KXfDcr9rX2&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2666?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              @@
   ##             master    #2666      +/-   ##
   ============================================
   + Coverage     77.68%   77.74%   +0.06%     
     Complexity     1429     1429              
   ============================================
     Files          1598     1597       -1     
     Lines         42740    42707      -33     
     Branches       3606     3600       -6     
   ============================================
     Hits          33202    33202              
   + Misses         8027     7994      -33     
     Partials       1511     1511              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2666?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...mb/foundation/common/config/PaaSResourceUtils.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2666/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-Zm91bmRhdGlvbnMvZm91bmRhdGlvbi1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2ZvdW5kYXRpb24vY29tbW9uL2NvbmZpZy9QYWFTUmVzb3VyY2VVdGlscy5qYXZh) | `62.16% <ø> (+4.66%)` | :arrow_up: |
   | [...e/servicecomb/core/handler/HandlerConfigUtils.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2666/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-Y29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29yZS9oYW5kbGVyL0hhbmRsZXJDb25maWdVdGlscy5qYXZh) | `85.71% <100.00%> (ø)` | |
   | [...b/core/invocation/timeout/PassingTimeStrategy.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2666/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-Y29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29yZS9pbnZvY2F0aW9uL3RpbWVvdXQvUGFzc2luZ1RpbWVTdHJhdGVneS5qYXZh) | `94.44% <0.00%> (-5.56%)` | :arrow_down: |
   | [...comb/core/definition/MicroserviceVersionsMeta.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2666/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-Y29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29yZS9kZWZpbml0aW9uL01pY3Jvc2VydmljZVZlcnNpb25zTWV0YS5qYXZh) | `94.73% <0.00%> (-5.27%)` | :arrow_down: |
   | [...egistry/client/http/ServiceRegistryClientImpl.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2666/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-c2VydmljZS1yZWdpc3RyeS9yZWdpc3RyeS1zZXJ2aWNlLWNlbnRlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvc2VydmljZXJlZ2lzdHJ5L2NsaWVudC9odHRwL1NlcnZpY2VSZWdpc3RyeUNsaWVudEltcGwuamF2YQ==) | `71.26% <0.00%> (+0.38%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2666?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/servicecomb-java-chassis/pull/2666?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 [8207a76...a2ba349](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2666?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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] liubao68 commented on a change in pull request #2666: Handler配置文件不支持 *.hanlder.xml #2660

Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #2666:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2666#discussion_r770156143



##########
File path: demo/demo-cse-v2/provider/src/main/resources/application.yml
##########
@@ -34,6 +34,10 @@ servicecomb:
   kie:
     serverUri: ${CSE_V2_CC}
     customLabel: public
+  handler:
+    chain:
+      Provider:
+        default: governance-provider1

Review comment:
       Add test case to demo-springmvc or other demos, and add assertions to make sure your test case is exactly excuted. 




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] liubao68 commented on a change in pull request #2666: Handler配置文件不支持 *.hanlder.xml #2660

Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #2666:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2666#discussion_r770155837



##########
File path: handlers/handler-governance/src/main/resources/config/lbc.handler.xml
##########
@@ -0,0 +1,21 @@
+<!--

Review comment:
       Add test code to demo folder, and add assertions to test code to make sure your test is exactly executed. 




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] liubao68 merged pull request #2666: [SCB-2365]handler configuration support *.hanlder.xm instead of cse.*.handler.xml

Posted by GitBox <gi...@apache.org>.
liubao68 merged pull request #2666:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2666


   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] liubao68 commented on a change in pull request #2666: Handler配置文件不支持 *.hanlder.xml #2660

Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #2666:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2666#discussion_r771805979



##########
File path: core/src/main/java/org/apache/servicecomb/core/handler/HandlerConfigUtils.java
##########
@@ -31,8 +31,9 @@ private HandlerConfigUtils() {
   private static Config loadConfig() throws Exception {
     Config config = new Config();
 
-    List<Resource> resList =
-        PaaSResourceUtils.getSortedResources("classpath*:config/cse.handler.xml", ".handler.xml");
+    List<Resource> resList = PaaSResourceUtils.getResources(new String[]{"classpath*:config/*.handler.xml"});
+    PaaSResourceUtils.sortResources(resList, ".handler.xml");

Review comment:
       Format code




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] codecov-commenter edited a comment on pull request #2666: [SCB-2365]handler configuration support *.hanlder.xm instead of cse.*.handler.xml

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2666:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2666#issuecomment-996519117


   # [Codecov](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2666?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 [#2666](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2666?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (94a800c) into [master](https://codecov.io/gh/apache/servicecomb-java-chassis/commit/8207a76ecb0620f989173ce5c5a776aaaea0af4d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8207a76) will **increase** coverage by `0.06%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2666/graphs/tree.svg?width=650&height=150&src=pr&token=KXfDcr9rX2&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2666?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              @@
   ##             master    #2666      +/-   ##
   ============================================
   + Coverage     77.68%   77.74%   +0.06%     
   - Complexity     1429     1430       +1     
   ============================================
     Files          1598     1597       -1     
     Lines         42740    42714      -26     
     Branches       3606     3600       -6     
   ============================================
   + Hits          33202    33208       +6     
   + Misses         8027     7995      -32     
     Partials       1511     1511              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2666?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...mb/foundation/common/config/PaaSResourceUtils.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2666/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-Zm91bmRhdGlvbnMvZm91bmRhdGlvbi1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2ZvdW5kYXRpb24vY29tbW9uL2NvbmZpZy9QYWFTUmVzb3VyY2VVdGlscy5qYXZh) | `62.16% <ø> (+4.66%)` | :arrow_up: |
   | [...e/servicecomb/core/handler/HandlerConfigUtils.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2666/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-Y29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29yZS9oYW5kbGVyL0hhbmRsZXJDb25maWdVdGlscy5qYXZh) | `86.66% <100.00%> (+0.95%)` | :arrow_up: |
   | [...he/servicecomb/demo/springmvc/SpringmvcClient.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2666/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-ZGVtby9kZW1vLXNwcmluZ212Yy9zcHJpbmdtdmMtY2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zZXJ2aWNlY29tYi9kZW1vL3NwcmluZ212Yy9TcHJpbmdtdmNDbGllbnQuamF2YQ==) | `84.52% <100.00%> (+0.28%)` | :arrow_up: |
   | [...b/core/invocation/timeout/PassingTimeStrategy.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2666/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-Y29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29yZS9pbnZvY2F0aW9uL3RpbWVvdXQvUGFzc2luZ1RpbWVTdHJhdGVneS5qYXZh) | `94.44% <0.00%> (-5.56%)` | :arrow_down: |
   | [.../servicecomb/registry/discovery/DiscoveryTree.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2666/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-Zm91bmRhdGlvbnMvZm91bmRhdGlvbi1yZWdpc3RyeS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvcmVnaXN0cnkvZGlzY292ZXJ5L0Rpc2NvdmVyeVRyZWUuamF2YQ==) | `96.49% <0.00%> (-3.51%)` | :arrow_down: |
   | [...egistry/client/http/ServiceRegistryClientImpl.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2666/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-c2VydmljZS1yZWdpc3RyeS9yZWdpc3RyeS1zZXJ2aWNlLWNlbnRlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvc2VydmljZXJlZ2lzdHJ5L2NsaWVudC9odHRwL1NlcnZpY2VSZWdpc3RyeUNsaWVudEltcGwuamF2YQ==) | `71.26% <0.00%> (+0.38%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2666?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/servicecomb-java-chassis/pull/2666?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 [8207a76...94a800c](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2666?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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] liubao68 commented on a change in pull request #2666: Handler配置文件不支持 *.hanlder.xml #2660

Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #2666:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2666#discussion_r771805836



##########
File path: demo/demo-cse-v2/provider/src/main/java/org/apache/servicecomb/samples/handler/ProviderTestHandler.java
##########
@@ -0,0 +1,149 @@
+/*
+ * 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 org.apache.servicecomb.samples.handler;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.CompletionStage;
+import java.util.function.Supplier;
+
+import org.apache.servicecomb.core.Handler;
+import org.apache.servicecomb.core.Invocation;
+import org.apache.servicecomb.core.definition.MicroserviceMeta;
+import org.apache.servicecomb.foundation.common.utils.BeanUtils;
+import org.apache.servicecomb.governance.handler.BulkheadHandler;
+import org.apache.servicecomb.governance.handler.CircuitBreakerHandler;
+import org.apache.servicecomb.governance.handler.RateLimitingHandler;
+import org.apache.servicecomb.governance.marker.GovernanceRequest;
+import org.apache.servicecomb.handler.governance.MatchType;
+import org.apache.servicecomb.handler.governance.ProviderGovernanceHandler;
+import org.apache.servicecomb.handler.governance.ServiceCombInvocationContext;
+import org.apache.servicecomb.swagger.invocation.AsyncResponse;
+import org.apache.servicecomb.swagger.invocation.InvocationType;
+import org.apache.servicecomb.swagger.invocation.Response;
+import org.apache.servicecomb.swagger.invocation.exception.CommonExceptionData;
+import org.apache.servicecomb.swagger.invocation.exception.InvocationException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import io.github.resilience4j.bulkhead.Bulkhead;
+import io.github.resilience4j.bulkhead.BulkheadFullException;
+import io.github.resilience4j.circuitbreaker.CallNotPermittedException;
+import io.github.resilience4j.circuitbreaker.CircuitBreaker;
+import io.github.resilience4j.decorators.Decorators;
+import io.github.resilience4j.decorators.Decorators.DecorateCompletionStage;
+import io.github.resilience4j.ratelimiter.RateLimiter;
+import io.github.resilience4j.ratelimiter.RequestNotPermitted;
+
+public class ProviderTestHandler implements Handler {

Review comment:
       Do not copy codes from other handlers, write simpe test cases and only keep code needed. 




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] liubao68 commented on a change in pull request #2666: Handler配置文件不支持 *.hanlder.xml #2660

Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #2666:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2666#discussion_r771806173



##########
File path: demo/demo-cse-v2/test-client/src/main/java/org/apache/servicecomb/samples/HelloWorldIT.java
##########
@@ -36,4 +37,17 @@ private void testHelloWorld() {
         .getForObject(Config.GATEWAY_URL + "/sayHello?name=World", String.class);
     TestMgr.check("\"Hello World\"", result);
   }
+
+  @Test
+  public void Test01() {
+    String result = template
+        .getForObject(Config.GATEWAY_URL + "/sayHello?name=tom", String.class);
+    TestMgr.check("\"Hello tom\"", result);
+    TestMgr.summary();
+    TestMgr.errors().clear();
+    result = template
+        .getForObject(Config.GATEWAY_URL + "/sayHello?name=sam", String.class);
+    TestMgr.check("\"Hello sam\"", result);
+    TestMgr.summary();

Review comment:
       This test case does not cover any purpose of this PR. 




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

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