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/10/06 17:28:54 UTC
[GitHub] [shenyu] BoyuLi4 opened a new pull request, #4040: Fixed Possible Json Ordering Permutations Problem in Tests
BoyuLi4 opened a new pull request, #4040:
URL: https://github.com/apache/shenyu/pull/4040
## **Fixed Possible Json Ordering Permutations Problem in Tests**
- [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`.
<!-- Describe your PR here; eg. Fixes #issueNo -->
## What is the purpose of the change
The `org.apache.shenyu.admin.service.register.ShenyuClientRegisterDivideServiceImplTest.testBuildHandle` has flakiness.
The test flakiness is due to comparisons between Json Strings and outputs from` JsonUtils.toJson()` and `GsonUtils.getInstance().toJson()`.
However, JsonObject does not guarantee entry orders, its object is an unordered set of name/value pairs, and internal permutations may occur in the output from toJson().
There are five more similar tests that also have these kinds of flakiness. This is just an example, I will change the other five if you accept these changes.
## Brief changelog
Since the JSON tool used in the Project is GSON, so I use the GSON library `JsonParser `to convert the string back to JSON Object and compare them.
## Verifying this change
This test avoids nested or different orders of JSON strings that cause flaky errors.
Since I didn't touch any Source code, it should be no impact on the project.
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] yu199195 merged pull request #4040: Fixed Possible Json Ordering Permutations Problem in Tests
Posted by GitBox <gi...@apache.org>.
yu199195 merged PR #4040:
URL: https://github.com/apache/shenyu/pull/4040
--
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 commented on pull request #4040: Fixed Possible Json Ordering Permutations Problem in Tests
Posted by GitBox <gi...@apache.org>.
yu199195 commented on PR #4040:
URL: https://github.com/apache/shenyu/pull/4040#issuecomment-1272214793
@BoyuLi4 Hi, Sure, thanks for your contribution!
--
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] BoyuLi4 commented on pull request #4040: Fixed Possible Json Ordering Permutations Problem in Tests
Posted by GitBox <gi...@apache.org>.
BoyuLi4 commented on PR #4040:
URL: https://github.com/apache/shenyu/pull/4040#issuecomment-1272214413
Thanks a lot!! can I pull the other five tests with the same problem?
--
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 #4040: Fixed Possible Json Ordering Permutations Problem in Tests
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #4040:
URL: https://github.com/apache/shenyu/pull/4040#issuecomment-1272210627
# [Codecov](https://codecov.io/gh/apache/shenyu/pull/4040?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 [#4040](https://codecov.io/gh/apache/shenyu/pull/4040?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (902dcef) into [master](https://codecov.io/gh/apache/shenyu/commit/1cd41f5cfece4b8a6c9b8c8954bba8bb1bfc336e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1cd41f5) will **decrease** coverage by `0.24%`.
> The diff coverage is `n/a`.
```diff
@@ Coverage Diff @@
## master #4040 +/- ##
============================================
- Coverage 70.11% 69.87% -0.25%
+ Complexity 6748 6712 -36
============================================
Files 935 935
Lines 25408 25408
Branches 2288 2288
============================================
- Hits 17816 17754 -62
- Misses 6202 6264 +62
Partials 1390 1390
```
| [Impacted Files](https://codecov.io/gh/apache/shenyu/pull/4040?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...ache/shenyu/plugin/grpc/cache/GrpcClientCache.java](https://codecov.io/gh/apache/shenyu/pull/4040/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==) | `68.75% <0.00%> (-31.25%)` | :arrow_down: |
| [.../client/server/consul/ShenyuConsulConfigWatch.java](https://codecov.io/gh/apache/shenyu/pull/4040/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) | `58.33% <0.00%> (-27.09%)` | :arrow_down: |
| [...henyu/plugin/grpc/resolver/ShenyuNameResolver.java](https://codecov.io/gh/apache/shenyu/pull/4040/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-c2hlbnl1LXBsdWdpbi9zaGVueXUtcGx1Z2luLWdycGMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoZW55dS9wbHVnaW4vZ3JwYy9yZXNvbHZlci9TaGVueXVOYW1lUmVzb2x2ZXIuamF2YQ==) | `54.25% <0.00%> (-9.58%)` | :arrow_down: |
| [...va/org/apache/shenyu/plugin/cache/CachePlugin.java](https://codecov.io/gh/apache/shenyu/pull/4040/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-c2hlbnl1LXBsdWdpbi9zaGVueXUtcGx1Z2luLWNhY2hlL3NoZW55dS1wbHVnaW4tY2FjaGUtaGFuZGxlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hlbnl1L3BsdWdpbi9jYWNoZS9DYWNoZVBsdWdpbi5qYXZh) | `85.29% <0.00%> (-8.83%)` | :arrow_down: |
| [.../apache/shenyu/admin/model/dto/BatchCommonDTO.java](https://codecov.io/gh/apache/shenyu/pull/4040/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/4040/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: |
| [...org/apache/shenyu/admin/model/dto/AuthPathDTO.java](https://codecov.io/gh/apache/shenyu/pull/4040/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: |
| [...elimiter/handler/RateLimiterPluginDataHandler.java](https://codecov.io/gh/apache/shenyu/pull/4040/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-c2hlbnl1LXBsdWdpbi9zaGVueXUtcGx1Z2luLXJhdGVsaW1pdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGVueXUvcGx1Z2luL3JhdGVsaW1pdGVyL2hhbmRsZXIvUmF0ZUxpbWl0ZXJQbHVnaW5EYXRhSGFuZGxlci5qYXZh) | `54.54% <0.00%> (-4.55%)` | :arrow_down: |
| [...che/shenyu/admin/model/vo/DashboardUserEditVO.java](https://codecov.io/gh/apache/shenyu/pull/4040/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-c2hlbnl1LWFkbWluL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGVueXUvYWRtaW4vbW9kZWwvdm8vRGFzaGJvYXJkVXNlckVkaXRWTy5qYXZh) | `60.86% <0.00%> (-4.35%)` | :arrow_down: |
| [...he/shenyu/plugin/grpc/client/ShenyuGrpcClient.java](https://codecov.io/gh/apache/shenyu/pull/4040/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-c2hlbnl1LXBsdWdpbi9zaGVueXUtcGx1Z2luLWdycGMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoZW55dS9wbHVnaW4vZ3JwYy9jbGllbnQvU2hlbnl1R3JwY0NsaWVudC5qYXZh) | `8.00% <0.00%> (-4.00%)` | :arrow_down: |
| ... and [24 more](https://codecov.io/gh/apache/shenyu/pull/4040/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