Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit test of JValidator; Clean code of JValidator #3723

Merged
merged 1 commit into from
Mar 25, 2019

Conversation

tswstarplanet
Copy link
Contributor

What is the purpose of the change

Add unit test of JValidator; clean code of JValidator

Brief changelog

1.JValidatorTest and relative test class
2.JValidator

Verifying this change

XXXXX

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

  • Make sure there is a GITHUB_issue 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.
  • 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.

@codecov-io
Copy link

Codecov Report

Merging #3723 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##             master   #3723      +/-   ##
===========================================
- Coverage      63.6%   63.6%   -0.01%     
  Complexity       71      71              
===========================================
  Files           703     703              
  Lines         31001   31000       -1     
  Branches       5022    5022              
===========================================
- Hits          19719   19718       -1     
+ Misses         9016    9014       -2     
- Partials       2266    2268       +2
Impacted Files Coverage Δ Complexity Δ
...bbo/validation/support/jvalidation/JValidator.java 79.87% <100%> (+8.9%) 0 <0> (ø) ⬇️
.../apache/dubbo/remoting/transport/AbstractPeer.java 58.69% <0%> (-8.7%) 0% <0%> (ø)
...apache/dubbo/common/config/ConfigurationUtils.java 64% <0%> (-8%) 0% <0%> (ø)
...ava/org/apache/dubbo/config/DubboShutdownHook.java 75% <0%> (-6.25%) 0% <0%> (ø)
...ng/exchange/support/header/HeartbeatTimerTask.java 73.68% <0%> (-5.27%) 0% <0%> (ø)
...e/dubbo/remoting/transport/netty/NettyChannel.java 57.64% <0%> (-4.71%) 0% <0%> (ø)
...dubbo/remoting/exchange/support/DefaultFuture.java 73.46% <0%> (-2.05%) 0% <0%> (ø)
...che/dubbo/remoting/transport/mina/MinaChannel.java 53.94% <0%> (-1.32%) 0% <0%> (ø)
.../exchange/support/header/HeaderExchangeServer.java 66.98% <0%> (-0.95%) 0% <0%> (ø)
...pache/dubbo/registry/support/AbstractRegistry.java 80.7% <0%> (-0.4%) 0% <0%> (ø)
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6e4ff91...7d4790f. Read the comment docs.

Copy link
Contributor

@lixiaojiee lixiaojiee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lt looks good to me.

@lixiaojiee lixiaojiee merged commit c1be6c6 into apache:master Mar 25, 2019
Jeff-Lv pushed a commit that referenced this pull request Apr 12, 2019
* Result implement CF

* Result implement CF

* Result implement CF

* Add AsyncRpcResult

* Fix bugs and refactor Filter

* Try to add onSend onError for Filter

* invoke different filter method according to result status.

*  make generic work with async call, including add $invokeAsync

* refactor legacy Filter implementation to work with onResponse.

* demo changes

* Fixes #3620, provider attachment lose on consumer side, fix this by reverting RpcContext copy

* AsyncRpcResult should always holds an Invocation instance

* refactor filter signature

* reimplement embedded Filters

* use ProviderModel modification in 3.x

* Fix address notification processing workflow after merging 3.x branch

* Fix UT

* Fix UT

* Unit test of JValidator; Clean code of JValidator (#3723)

* Fixes #3625 (#3730)

use constant to replace magic number

* Fix conflict when merging master and 3.x

* Fix conflict when merging master and 3.x

* Result interface itself has Future status.

* Fix DefaultFuture UT

* Wrap all protocol Invoker with AsyncToSyncInvoker & Fix UT

* Add license

* fix UT

* Fix ut in MonitorFilterTest

* avoid duplicate async to sync wrapper

* return async result in CacheFilter.

* fix UT in CacheFilterTest

* Add generic condition check to GenericFilter callback.

* Fix UT

* Get generic from RpcContext if the value in Invocation is empty.

* Fix RSocketProtocol to meet AbstractProtocol adjustment

* rename RpcResult to AppResponse to help avoid confusion with AsyncRpcResult.

* RSocket module switch to AsyncRpcResult
chickenlj added a commit to chickenlj/incubator-dubbo that referenced this pull request May 8, 2019
* Result implement CF

* Result implement CF

* Result implement CF

* Add AsyncRpcResult

* Fix bugs and refactor Filter

* Try to add onSend onError for Filter

* invoke different filter method according to result status.

*  make generic work with async call, including add $invokeAsync

* refactor legacy Filter implementation to work with onResponse.

* demo changes

* Fixes apache#3620, provider attachment lose on consumer side, fix this by reverting RpcContext copy

* AsyncRpcResult should always holds an Invocation instance

* refactor filter signature

* reimplement embedded Filters

* use ProviderModel modification in 3.x

* Fix address notification processing workflow after merging 3.x branch

* Fix UT

* Fix UT

* Unit test of JValidator; Clean code of JValidator (apache#3723)

* Fixes apache#3625 (apache#3730)

use constant to replace magic number

* Fix conflict when merging master and 3.x

* Fix conflict when merging master and 3.x

* Result interface itself has Future status.

* Fix DefaultFuture UT

* Wrap all protocol Invoker with AsyncToSyncInvoker & Fix UT

* Add license

* fix UT

* Fix ut in MonitorFilterTest

* avoid duplicate async to sync wrapper

* return async result in CacheFilter.

* fix UT in CacheFilterTest

* Add generic condition check to GenericFilter callback.

* Fix UT

* Get generic from RpcContext if the value in Invocation is empty.

* Fix RSocketProtocol to meet AbstractProtocol adjustment

* rename RpcResult to AppResponse to help avoid confusion with AsyncRpcResult.

* RSocket module switch to AsyncRpcResult
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants