You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by GitBox <gi...@apache.org> on 2022/12/09 23:23:55 UTC

[GitHub] [shenyu] BoyuLi4 opened a new pull request, #4252: Fixed Possible Order dependent Test Problem

BoyuLi4 opened a new pull request, #4252:
URL: https://github.com/apache/shenyu/pull/4252

   <!-- Describe your PR here; eg. Fixes #issueNo -->
   
   <!--
   Thank you for proposing a pull request. This template will guide you through the essential steps necessary for a pull request.
   -->
   Make sure that:
   
   - [X] You have read the [contribution guidelines](https://shenyu.apache.org/community/contributor-guide).
   - [ ] You submit test cases (unit or integration tests) that back your changes.
   - [X] Your local test passed `./mvnw clean install -Dmaven.javadoc.skip=true`.
   - 
   ## What is the purpose of the change
   The test file in module `shenyu/shenyu-client/shenyu-client-http/shenyu-client-springmvc` 
   ```
   org/apache/shenyu/client/springmvc/init/SpringMvcClientEventListenerTest.java
   ```
   has flakiness due to the running order of the tests.
   
   If we run `testOnApplicationEvent()` before other tests, it might caused an error
   `For org.apache.shenyu.register.client.http.utils.RegisterUtils, static mocking is already registered in the current thread`
   
   The returned object's MockedStatic.close() method must be called upon completing the test.
   
   ## Brief changelog
   
   We might import `junit.TestMethodOrder` to define the running order of the test.
   But I found we may add `registerUtilsMockedStatic.close();` at the end of the test `testOnApplicationEvent()` even it did not use `registerUtilsMockedStatic`
   
   ## Verifying this change
   The test will passed in any order.
   And it passed the local test that the guidelines mentioned.
   
   


-- 
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: notifications-unsubscribe@shenyu.apache.org

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


[GitHub] [shenyu] codecov-commenter commented on pull request #4252: Fixed Possible Order dependent Test Problem

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #4252:
URL: https://github.com/apache/shenyu/pull/4252#issuecomment-1345369462

   # [Codecov](https://codecov.io/gh/apache/shenyu/pull/4252?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 [#4252](https://codecov.io/gh/apache/shenyu/pull/4252?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (087a0eb) into [master](https://codecov.io/gh/apache/shenyu/commit/10375c5204c67f9889235f19fe2d6e8eb0438a5a?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (10375c5) will **decrease** coverage by `0.34%`.
   > The diff coverage is `n/a`.
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #4252      +/-   ##
   ============================================
   - Coverage     69.58%   69.23%   -0.35%     
   + Complexity     7381     7340      -41     
   ============================================
     Files           993      993              
     Lines         27963    27954       -9     
     Branches       2477     2474       -3     
   ============================================
   - Hits          19458    19355     -103     
   - Misses         7027     7128     +101     
   + Partials       1478     1471       -7     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shenyu/pull/4252?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...n/alibaba/dubbo/cache/AlibabaDubboConfigCache.java](https://codecov.io/gh/apache/shenyu/pull/4252/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-c2hlbnl1LXBsdWdpbi9zaGVueXUtcGx1Z2luLWR1YmJvL3NoZW55dS1wbHVnaW4tYWxpYmFiYS1kdWJiby9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hlbnl1L3BsdWdpbi9hbGliYWJhL2R1YmJvL2NhY2hlL0FsaWJhYmFEdWJib0NvbmZpZ0NhY2hlLmphdmE=) | `47.12% <0.00%> (-31.04%)` | :arrow_down: |
   | [...ache/shenyu/plugin/grpc/cache/GrpcClientCache.java](https://codecov.io/gh/apache/shenyu/pull/4252/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-c2hlbnl1LXBsdWdpbi9zaGVueXUtcGx1Z2luLWdycGMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoZW55dS9wbHVnaW4vZ3JwYy9jYWNoZS9HcnBjQ2xpZW50Q2FjaGUuamF2YQ==) | `75.00% <0.00%> (-25.00%)` | :arrow_down: |
   | [.../client/server/consul/ShenyuConsulConfigWatch.java](https://codecov.io/gh/apache/shenyu/pull/4252/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-c2hlbnl1LXJlZ2lzdGVyLWNlbnRlci9zaGVueXUtcmVnaXN0ZXItY2xpZW50LXNlcnZlci9zaGVueXUtcmVnaXN0ZXItY2xpZW50LXNlcnZlci1jb25zdWwvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoZW55dS9yZWdpc3Rlci9jbGllbnQvc2VydmVyL2NvbnN1bC9TaGVueXVDb25zdWxDb25maWdXYXRjaC5qYXZh) | `60.41% <0.00%> (-25.00%)` | :arrow_down: |
   | [...he/shenyu/loadbalancer/spi/RandomLoadBalancer.java](https://codecov.io/gh/apache/shenyu/pull/4252/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-c2hlbnl1LWxvYWRiYWxhbmNlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hlbnl1L2xvYWRiYWxhbmNlci9zcGkvUmFuZG9tTG9hZEJhbGFuY2VyLmphdmE=) | `81.81% <0.00%> (-9.10%)` | :arrow_down: |
   | [.../apache/shenyu/admin/model/dto/BatchCommonDTO.java](https://codecov.io/gh/apache/shenyu/pull/4252/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-c2hlbnl1LWFkbWluL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGVueXUvYWRtaW4vbW9kZWwvZHRvL0JhdGNoQ29tbW9uRFRPLmphdmE=) | `50.00% <0.00%> (-7.15%)` | :arrow_down: |
   | [...apache/shenyu/admin/model/dto/AuthPathWarpDTO.java](https://codecov.io/gh/apache/shenyu/pull/4252/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-c2hlbnl1LWFkbWluL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGVueXUvYWRtaW4vbW9kZWwvZHRvL0F1dGhQYXRoV2FycERUTy5qYXZh) | `57.14% <0.00%> (-7.15%)` | :arrow_down: |
   | [...a/org/apache/shenyu/common/utils/VersionUtils.java](https://codecov.io/gh/apache/shenyu/pull/4252/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-c2hlbnl1LWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hlbnl1L2NvbW1vbi91dGlscy9WZXJzaW9uVXRpbHMuamF2YQ==) | `21.27% <0.00%> (-6.39%)` | :arrow_down: |
   | [...org/apache/shenyu/admin/model/dto/AuthPathDTO.java](https://codecov.io/gh/apache/shenyu/pull/4252/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-c2hlbnl1LWFkbWluL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGVueXUvYWRtaW4vbW9kZWwvZHRvL0F1dGhQYXRoRFRPLmphdmE=) | `58.82% <0.00%> (-5.89%)` | :arrow_down: |
   | [...nyu/plugin/motan/cache/ApplicationConfigCache.java](https://codecov.io/gh/apache/shenyu/pull/4252/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-c2hlbnl1LXBsdWdpbi9zaGVueXUtcGx1Z2luLW1vdGFuL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGVueXUvcGx1Z2luL21vdGFuL2NhY2hlL0FwcGxpY2F0aW9uQ29uZmlnQ2FjaGUuamF2YQ==) | `52.00% <0.00%> (-5.00%)` | :arrow_down: |
   | [...a/org/apache/shenyu/admin/model/entity/BaseDO.java](https://codecov.io/gh/apache/shenyu/pull/4252/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-c2hlbnl1LWFkbWluL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGVueXUvYWRtaW4vbW9kZWwvZW50aXR5L0Jhc2VETy5qYXZh) | `52.17% <0.00%> (-4.35%)` | :arrow_down: |
   | ... and [39 more](https://codecov.io/gh/apache/shenyu/pull/4252/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) | |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?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: notifications-unsubscribe@shenyu.apache.org

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


[GitHub] [shenyu] yu199195 merged pull request #4252: Fixed Possible Order dependent Test Problem

Posted by "yu199195 (via GitHub)" <gi...@apache.org>.
yu199195 merged PR #4252:
URL: https://github.com/apache/shenyu/pull/4252


-- 
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: notifications-unsubscribe@shenyu.apache.org

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