Skip to content

[Dubbo-2838] Fix UT failed on windows with FileNetworkerTest - #2839

Closed
biyuhao wants to merge 1 commit into
apache:masterfrom
biyuhao:fix-ut
Closed

biyuhao wants to merge 1 commit into
apache:masterfrom
biyuhao:fix-ut

Conversation

@biyuhao

@biyuhao biyuhao commented Nov 27, 2018

Copy link
Copy Markdown
Member

What is the purpose of the change

Fix Dubbo-2838

Brief changelog

Fix FileNetworkerTest failure

Verifying this change

Run UT on windows platform

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 & 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
Copy Markdown

Codecov Report

Merging #2839 into master will decrease coverage by 0.16%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2839      +/-   ##
==========================================
- Coverage    63.8%   63.63%   -0.17%     
==========================================
  Files         577      577              
  Lines       25930    25930              
  Branches     4541     4541              
==========================================
- Hits        16544    16501      -43     
- Misses       7239     7269      +30     
- Partials     2147     2160      +13
Impacted Files Coverage Δ
...onfig/spring/extension/SpringExtensionFactory.java 68.42% <0%> (-15.79%) ⬇️
.../remoting/transport/netty4/NettyClientHandler.java 75% <0%> (-13.89%) ⬇️
.../apache/dubbo/qos/protocol/QosProtocolWrapper.java 69.23% <0%> (-12.83%) ⬇️
...ache/dubbo/remoting/transport/AbstractChannel.java 75% <0%> (-12.5%) ⬇️
...org/apache/dubbo/rpc/filter/ActiveLimitFilter.java 77.77% <0%> (-11.12%) ⬇️
...ubbo/rpc/protocol/dubbo/ChannelWrappedInvoker.java 41.66% <0%> (-8.34%) ⬇️
.../apache/dubbo/remoting/transport/AbstractPeer.java 58.69% <0%> (-6.53%) ⬇️
.../dubbo/remoting/transport/netty4/NettyChannel.java 61.17% <0%> (-4.71%) ⬇️
...ing/exchange/support/header/AbstractTimerTask.java 66.66% <0%> (-4.17%) ⬇️
...rpc/protocol/dubbo/telnet/InvokeTelnetHandler.java 54.21% <0%> (-3.62%) ⬇️
... and 4 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 46b3458...311acf5. Read the comment docs.

@biyuhao

biyuhao commented Nov 27, 2018

Copy link
Copy Markdown
Member Author

Fix #2838

@carryxyh

Copy link
Copy Markdown
Member

I have seen another pr to fix this issue:
#2848

Personally think that his modification is simpler and effective.

What do u think about it?

@biyuhao

biyuhao commented Nov 29, 2018

Copy link
Copy Markdown
Member Author

Please refer to https://en.wikipedia.org/wiki/File_URI_scheme
Actually an additional slash is only for Windows local file which hostname is omitted.
And for Unix like system remains the same. (file:///tmp/junit2484075406115019206/junit2016855624112146186.tmp ,three slashes in total including the root path one)

In fact the UT passed, so I think both pr are fine. 😄

@carryxyh

Copy link
Copy Markdown
Member

Hi,
We don't need to judge our system, we just need to add a '/'. The content after the third '/' will be considered the path of the URL (the current way of parsing dubbo). I know that this problem is caused by the separator of WINDOWS. But in the way of fixing, I think we only need to add a '/' to move closer to dubbo's parsing.

Another thing is that that pr is simpler. So I personally prefer that one. Thx for your pr, too. Very nice solution. 👍

@carryxyh carryxyh closed this Nov 29, 2018
@biyuhao
biyuhao deleted the fix-ut branch November 29, 2018 07:59
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