You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "lixiaojiee (GitHub)" <gi...@apache.org> on 2018/12/07 12:09:49 UTC
[GitHub] [incubator-dubbo] lixiaojiee opened pull request #2920:
enhance unit test
## What is the purpose of the change
add RegistryDIrectory UT
## Brief changelog
/dubbo-registry-default/src/test/java/org/apache/dubbo/registry/dubbo/RegistryDirectoryTest.java
## Verifying this change
UT pass
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Make sure there is a [GITHUB_issue](https://github.com/apache/incubator-dubbo/issues) field for the change (usually before you start working on it). Trivial changes like typos do not require a GITHUB issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
- [ ] Format the pull request title like `[Dubbo-XXX] Fix UnknownException when host config not exist #XXX`. Each commit in the pull request should have a meaningful subject line and body.
- [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in [test module](https://github.com/apache/incubator-dubbo/tree/master/dubbo-test).
- [ ] Run `mvn clean install -DskipTests` & `mvn clean test-compile failsafe:integration-test` to make sure unit-test and integration-test pass.
- [ ] If this contribution is large, please follow the [Software Donation Guide](https://github.com/apache/incubator-dubbo/wiki/Software-donation-guide).
[ Full content available at: https://github.com/apache/incubator-dubbo/pull/2920 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] ralf0131 commented on issue #2920: enhance
unit test
Posted by "ralf0131 (GitHub)" <gi...@apache.org>.
LGTM, thanks for the pull request!
[ Full content available at: https://github.com/apache/incubator-dubbo/pull/2920 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] lixiaojiee commented on pull request
#2920: enhance unit test
Posted by "lixiaojiee (GitHub)" <gi...@apache.org>.
I appreciate your spirit of code refinement, we should code with specification,and I also found that some unit tests were not written in strict accordance with the code specification,I wonder if we have any hard and fast rules for coding unit tests @carryxyh
[ Full content available at: https://github.com/apache/incubator-dubbo/pull/2920 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] khanimteyaz commented on pull request
#2920: enhance unit test
Posted by "khanimteyaz (GitHub)" <gi...@apache.org>.
Do you feel it below mention way could be a better approach
URL provider1=URL.valueOf("dubbo://10.134.108.1:20880")
.addParameter("methods", "getXXX")
.addParameter("group", "group1")
.addParameter("mock","false");
This might give better readability and might prevent accidental mistake of placing url escape character.
[ Full content available at: https://github.com/apache/incubator-dubbo/pull/2920 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] khanimteyaz commented on pull request
#2920: enhance unit test
Posted by "khanimteyaz (GitHub)" <gi...@apache.org>.
group1 can be also defined a variable so that it can be reuse here, so in future even we change value of it, it would be a single place change only.
[ Full content available at: https://github.com/apache/incubator-dubbo/pull/2920 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] lixiaojiee commented on pull request
#2920: enhance unit test
Posted by "lixiaojiee (GitHub)" <gi...@apache.org>.
Your approach is clear, but I think the simpler the code, the better.
[ Full content available at: https://github.com/apache/incubator-dubbo/pull/2920 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] ralf0131 commented on pull request #2920:
enhance unit test
Posted by "ralf0131 (GitHub)" <gi...@apache.org>.
@lixiaojiee Would you please bring your question to the dev mailing list, we can discuss it there. For now, it looks good to me. I will merge it.
[ Full content available at: https://github.com/apache/incubator-dubbo/pull/2920 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] khanimteyaz commented on pull request
#2920: enhance unit test
Posted by "khanimteyaz (GitHub)" <gi...@apache.org>.
might be method name can be define as a variable which can be used in the url plus here as well.
[ Full content available at: https://github.com/apache/incubator-dubbo/pull/2920 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] ralf0131 closed pull request #2920:
enhance unit test
Posted by "ralf0131 (GitHub)" <gi...@apache.org>.
[ pull request closed by ralf0131 ]
[ Full content available at: https://github.com/apache/incubator-dubbo/pull/2920 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] codecov-io commented on issue #2920:
enhance unit test
Posted by "codecov-io (GitHub)" <gi...@apache.org>.
# [Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/2920?src=pr&el=h1) Report
> Merging [#2920](https://codecov.io/gh/apache/incubator-dubbo/pull/2920?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-dubbo/commit/e16e78ff18997d595139a6561bea005e043fd568?src=pr&el=desc) will **increase** coverage by `0.11%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/incubator-dubbo/pull/2920?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #2920 +/- ##
==========================================
+ Coverage 63.71% 63.83% +0.11%
==========================================
Files 578 578
Lines 25928 25928
Branches 4539 4539
==========================================
+ Hits 16521 16552 +31
+ Misses 7235 7206 -29
+ Partials 2172 2170 -2
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-dubbo/pull/2920?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...che/dubbo/remoting/transport/mina/MinaChannel.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2920/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbWluYS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcmVtb3RpbmcvdHJhbnNwb3J0L21pbmEvTWluYUNoYW5uZWwuamF2YQ==) | `43.42% <0%> (-10.53%)` | :arrow_down: |
| [...e/dubbo/remoting/transport/netty/NettyChannel.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2920/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbmV0dHkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JlbW90aW5nL3RyYW5zcG9ydC9uZXR0eS9OZXR0eUNoYW5uZWwuamF2YQ==) | `57.64% <0%> (-4.71%)` | :arrow_down: |
| [...he/dubbo/remoting/transport/netty/NettyServer.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2920/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbmV0dHkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JlbW90aW5nL3RyYW5zcG9ydC9uZXR0eS9OZXR0eVNlcnZlci5qYXZh) | `67.85% <0%> (-3.58%)` | :arrow_down: |
| [...rg/apache/dubbo/common/timer/HashedWheelTimer.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2920/diff?src=pr&el=tree#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vdGltZXIvSGFzaGVkV2hlZWxUaW1lci5qYXZh) | `58.88% <0%> (-1.75%)` | :arrow_down: |
| [...pache/dubbo/registry/support/AbstractRegistry.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2920/diff?src=pr&el=tree#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9zdXBwb3J0L0Fic3RyYWN0UmVnaXN0cnkuamF2YQ==) | `80.22% <0%> (-1.12%)` | :arrow_down: |
| [...ava/org/apache/dubbo/common/utils/StringUtils.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2920/diff?src=pr&el=tree#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vdXRpbHMvU3RyaW5nVXRpbHMuamF2YQ==) | `86.53% <0%> (+0.81%)` | :arrow_up: |
| [...apache/dubbo/rpc/protocol/dubbo/DubboProtocol.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2920/diff?src=pr&el=tree#diff-ZHViYm8tcnBjL2R1YmJvLXJwYy1kdWJiby9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL3Byb3RvY29sL2R1YmJvL0R1YmJvUHJvdG9jb2wuamF2YQ==) | `66.66% <0%> (+0.83%)` | :arrow_up: |
| [...dubbo/remoting/exchange/support/DefaultFuture.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2920/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy9leGNoYW5nZS9zdXBwb3J0L0RlZmF1bHRGdXR1cmUuamF2YQ==) | `69.79% <0%> (+2.01%)` | :arrow_up: |
| [...dubbo/rpc/protocol/dubbo/CallbackServiceCodec.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2920/diff?src=pr&el=tree#diff-ZHViYm8tcnBjL2R1YmJvLXJwYy1kdWJiby9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL3Byb3RvY29sL2R1YmJvL0NhbGxiYWNrU2VydmljZUNvZGVjLmphdmE=) | `79.41% <0%> (+2.2%)` | :arrow_up: |
| [.../remoting/transport/netty4/NettyClientHandler.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2920/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbmV0dHk0L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvbmV0dHk0L05ldHR5Q2xpZW50SGFuZGxlci5qYXZh) | `88.88% <0%> (+2.77%)` | :arrow_up: |
| ... and [7 more](https://codecov.io/gh/apache/incubator-dubbo/pull/2920/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/2920?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/2920?src=pr&el=footer). Last update [e16e78f...86e8b36](https://codecov.io/gh/apache/incubator-dubbo/pull/2920?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
[ Full content available at: https://github.com/apache/incubator-dubbo/pull/2920 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org