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

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

Closed
wants to merge 1 commit into from

Conversation

biyuhao
Copy link
Member

@biyuhao biyuhao commented Nov 27, 2018

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

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
Copy link
Member Author

biyuhao commented Nov 27, 2018

Fix #2838

@carryxyh
Copy link
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
Copy link
Member Author

biyuhao commented Nov 29, 2018

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
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.

None yet

3 participants