You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "AlbumenJ (GitHub)" <gi...@apache.org> on 2020/03/24 11:27:12 UTC

[GitHub] [dubbo] AlbumenJ opened pull request #5913: windows platform unittest adapt

## What is the purpose of the change

Making unit-test can be correctly running on Windows platform and fixing some static port, which is coded into test cases.

## Brief changelog

- fix: in Windows platform content get from resource contains \r delimiter
- fix:in Windows Platform hessian2 may unable serialize byte
- fix:in some platform ServerSocket getting random port is not base on 30000
- fix:rename ExplicitCallbackTest to ArgumentCallbackTest owing to junit order
- fix:Windows error 0x70 while starting redis
- fix:fix static port may have been used

## Verifying this change

Follow this checklist to help us incorporate your contribution quickly and easily:

- [x] Make sure there is a [GITHUB_issue](https://github.com/apache/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.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] 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 sample in [dubbo samples](https://github.com/apache/dubbo-samples) project.
- [x] Run `mvn clean install -DskipTests=false` & `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/dubbo/wiki/Software-donation-guide).


[ Full content available at: https://github.com/apache/dubbo/pull/5913 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [dubbo] AlbumenJ commented on issue #5913: windows platform unittest adapt

Posted by "AlbumenJ (GitHub)" <gi...@apache.org>.
#5877

[ Full content available at: https://github.com/apache/dubbo/pull/5913 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [dubbo] AlbumenJ commented on pull request #5913: windows platform unittest adapt

Posted by "AlbumenJ (GitHub)" <gi...@apache.org>.
The fail will show when other test like `DubboInvokerAvilableTest` execute `ProtocolUtils.export` twice or more and execute `new DubboProtocol()` in other test.

[ Full content available at: https://github.com/apache/dubbo/pull/5913 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [dubbo] htynkn commented on pull request #5913: windows platform unittest adapt

Posted by "htynkn (GitHub)" <gi...@apache.org>.
thanks for your explanation. Happy to accept your PR. thanks again.

[ Full content available at: https://github.com/apache/dubbo/pull/5913 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [dubbo] htynkn commented on pull request #5913: windows platform unittest adapt

Posted by "htynkn (GitHub)" <gi...@apache.org>.
what's the purpose for this one.
will it fail if remove this one?

[ Full content available at: https://github.com/apache/dubbo/pull/5913 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [dubbo] htynkn commented on issue #5913: windows platform unittest adapt

Posted by "htynkn (GitHub)" <gi...@apache.org>.
thanks very much for your contribution.  it's really nice to have hardcode port number to replace by `available port`, it will make unit test more stable

Could you please take a look at my comment when you have time?

[ Full content available at: https://github.com/apache/dubbo/pull/5913 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [dubbo] htynkn commented on pull request #5913: windows platform unittest adapt

Posted by "htynkn (GitHub)" <gi...@apache.org>.
apache common lang has a tool named 'SystemUtils' to do this check. 
consider this is a unit test, I suggest add it as test scope dependency and use https://commons.apache.org/proper/commons-lang/apidocs/index.html?org/apache/commons/lang3/SystemUtils.html 

[ Full content available at: https://github.com/apache/dubbo/pull/5913 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [dubbo] htynkn closed pull request #5913: windows platform unittest adapt

Posted by "htynkn (GitHub)" <gi...@apache.org>.
[ pull request closed by htynkn ]

[ Full content available at: https://github.com/apache/dubbo/pull/5913 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [dubbo] codecov-io commented on issue #5913: windows platform unittest adapt

Posted by "codecov-io (GitHub)" <gi...@apache.org>.
# [Codecov](https://codecov.io/gh/apache/dubbo/pull/5913?src=pr&el=h1) Report
> Merging [#5913](https://codecov.io/gh/apache/dubbo/pull/5913?src=pr&el=desc) into [master](https://codecov.io/gh/apache/dubbo/commit/d55f062fe77ea0f6a4c913d2418113297ff8403d&el=desc) will **decrease** coverage by `0.05%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/apache/dubbo/pull/5913/graphs/tree.svg?width=650&height=150&src=pr&token=VnEIkiFQT0)](https://codecov.io/gh/apache/dubbo/pull/5913?src=pr&el=tree)

```diff
@@             Coverage Diff              @@
##             master    #5913      +/-   ##
============================================
- Coverage     61.22%   61.16%   -0.06%     
+ Complexity      496      491       -5     
============================================
  Files           981      981              
  Lines         39147    39106      -41     
  Branches       5645     5620      -25     
============================================
- Hits          23968    23921      -47     
+ Misses        12547    12546       -1     
- Partials       2632     2639       +7     
```


| [Impacted Files](https://codecov.io/gh/apache/dubbo/pull/5913?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [...apache/dubbo/common/extension/ExtensionLoader.java](https://codecov.io/gh/apache/dubbo/pull/5913/diff?src=pr&el=tree#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vZXh0ZW5zaW9uL0V4dGVuc2lvbkxvYWRlci5qYXZh) | `74.94% <ø> (-0.24%)` | `0.00 <0.00> (ø)` | |
| [.../rpc/protocol/dubbo/LazyConnectExchangeClient.java](https://codecov.io/gh/apache/dubbo/pull/5913/diff?src=pr&el=tree#diff-ZHViYm8tcnBjL2R1YmJvLXJwYy1kdWJiby9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL3Byb3RvY29sL2R1YmJvL0xhenlDb25uZWN0RXhjaGFuZ2VDbGllbnQuamF2YQ==) | `53.84% <0.00%> (-4.40%)` | `0.00% <0.00%> (ø%)` | |
| [...pache/dubbo/remoting/transport/AbstractServer.java](https://codecov.io/gh/apache/dubbo/pull/5913/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvQWJzdHJhY3RTZXJ2ZXIuamF2YQ==) | `53.75% <0.00%> (-3.75%)` | `0.00% <0.00%> (ø%)` | |
| [...c/main/java/org/apache/dubbo/rpc/RpcException.java](https://codecov.io/gh/apache/dubbo/pull/5913/diff?src=pr&el=tree#diff-ZHViYm8tcnBjL2R1YmJvLXJwYy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JwYy9ScGNFeGNlcHRpb24uamF2YQ==) | `80.00% <0.00%> (-3.34%)` | `0.00% <0.00%> (ø%)` | |
| [...ubbo/rpc/protocol/nativethrift/ThriftProtocol.java](https://codecov.io/gh/apache/dubbo/pull/5913/diff?src=pr&el=tree#diff-ZHViYm8tcnBjL2R1YmJvLXJwYy1uYXRpdmUtdGhyaWZ0L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9ycGMvcHJvdG9jb2wvbmF0aXZldGhyaWZ0L1RocmlmdFByb3RvY29sLmphdmE=) | `68.29% <0.00%> (-2.44%)` | `7.00% <0.00%> (-1.00%)` | |
| [.../remoting/transport/netty4/NettyClientHandler.java](https://codecov.io/gh/apache/dubbo/pull/5913/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbmV0dHk0L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvbmV0dHk0L05ldHR5Q2xpZW50SGFuZGxlci5qYXZh) | `57.62% <0.00%> (-1.70%)` | `0.00% <0.00%> (ø%)` | |
| [...ache/dubbo/remoting/transport/mina/MinaClient.java](https://codecov.io/gh/apache/dubbo/pull/5913/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbWluYS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcmVtb3RpbmcvdHJhbnNwb3J0L21pbmEvTWluYUNsaWVudC5qYXZh) | `56.92% <0.00%> (-1.54%)` | `8.00% <0.00%> (-1.00%)` | |
| [.../dubbo/xml/rpc/protocol/xmlrpc/XmlRpcProtocol.java](https://codecov.io/gh/apache/dubbo/pull/5913/diff?src=pr&el=tree#diff-ZHViYm8tcnBjL2R1YmJvLXJwYy14bWwvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3htbC9ycGMvcHJvdG9jb2wveG1scnBjL1htbFJwY1Byb3RvY29sLmphdmE=) | `51.94% <0.00%> (-1.30%)` | `4.00% <0.00%> (-1.00%)` | |
| [...ache/dubbo/rpc/protocol/AbstractProxyProtocol.java](https://codecov.io/gh/apache/dubbo/pull/5913/diff?src=pr&el=tree#diff-ZHViYm8tcnBjL2R1YmJvLXJwYy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JwYy9wcm90b2NvbC9BYnN0cmFjdFByb3h5UHJvdG9jb2wuamF2YQ==) | `59.25% <0.00%> (-1.24%)` | `0.00% <0.00%> (ø%)` | |
| [...g/apache/dubbo/rpc/protocol/http/HttpProtocol.java](https://codecov.io/gh/apache/dubbo/pull/5913/diff?src=pr&el=tree#diff-ZHViYm8tcnBjL2R1YmJvLXJwYy1odHRwL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9ycGMvcHJvdG9jb2wvaHR0cC9IdHRwUHJvdG9jb2wuamF2YQ==) | `48.14% <0.00%> (-1.24%)` | `7.00% <0.00%> (-1.00%)` | |
| ... and [15 more](https://codecov.io/gh/apache/dubbo/pull/5913/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo/pull/5913?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/dubbo/pull/5913?src=pr&el=footer). Last update [d55f062...547a1d1](https://codecov.io/gh/apache/dubbo/pull/5913?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


[ Full content available at: https://github.com/apache/dubbo/pull/5913 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org