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

Optimize the logic of obtaining the mock parameter value in the MockInvoker#invoke method #7840

Merged

Conversation

BurningCN
Copy link
Member

@BurningCN BurningCN commented May 23, 2021

The logic of the original code can be replaced with the getMethodParameter method. The logic of the getMethodParameter method is as follows:
For example, URL url = "test://1.1.1.1/path?test.mock=xx&mock=yy", url.getMethodParameter("test","mock") will first get the parameter value of test.mock,if it does not exist,, then Get the mock parameter value directly

…sponding method in the MockInvoker#invoke method
@codecov-commenter
Copy link

codecov-commenter commented May 23, 2021

Codecov Report

Merging #7840 (81211aa) into master (e845e16) will increase coverage by 0.14%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #7840      +/-   ##
============================================
+ Coverage     59.28%   59.42%   +0.14%     
- Complexity      529      557      +28     
============================================
  Files          1077     1086       +9     
  Lines         43565    43844     +279     
  Branches       6368     6381      +13     
============================================
+ Hits          25826    26055     +229     
- Misses        14879    14907      +28     
- Partials       2860     2882      +22     
Impacted Files Coverage Δ Complexity Δ
...java/org/apache/dubbo/rpc/support/MockInvoker.java 84.61% <100.00%> (-0.51%) 0.00 <0.00> (ø)
...ntext/event/AwaitingNonWebApplicationListener.java 48.48% <0.00%> (-24.25%) 0.00% <0.00%> (ø%)
.../dubbo/remoting/transport/MultiMessageHandler.java 80.00% <0.00%> (-20.00%) 0.00% <0.00%> (ø%)
...bo/rpc/cluster/support/FailbackClusterInvoker.java 52.45% <0.00%> (-18.04%) 0.00% <0.00%> (ø%)
...va/org/apache/dubbo/rpc/support/ProtocolUtils.java 61.53% <0.00%> (-8.03%) 0.00% <0.00%> (ø%)
...ng/transport/dispatcher/all/AllChannelHandler.java 82.75% <0.00%> (-6.90%) 0.00% <0.00%> (ø%)
...dubbo/remoting/exchange/support/DefaultFuture.java 80.34% <0.00%> (-6.84%) 0.00% <0.00%> (ø%)
.../threadpool/manager/DefaultExecutorRepository.java 80.95% <0.00%> (-4.54%) 0.00% <0.00%> (ø%)
.../rpc/protocol/dubbo/LazyConnectExchangeClient.java 49.45% <0.00%> (-4.40%) 0.00% <0.00%> (ø%)
.../apache/dubbo/remoting/transport/AbstractPeer.java 58.69% <0.00%> (-4.35%) 0.00% <0.00%> (ø%)
... and 88 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 e845e16...81211aa. Read the comment docs.

@AlbumenJ AlbumenJ merged commit 0049c24 into apache:master May 23, 2021
This pull request was closed.
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