Using PowerMockito to mock System.getent;#2593
Merged
liuhaoyang merged 6 commits intoapache:masterfrom May 7, 2019
Merged
Conversation
Member
|
@liuhaoyang What do you think? Which one do you prefer? |
Member
|
I think you should continue open appveyor to avoid this in next time, no matter which PR you think it is better. |
Member
Author
|
It seems that the configuration of appveyor has some mistakes. In fact, I didn't find the config file appveyor.yml int root directory. |
Member
|
@liuhaoyang is working on that, the PR is on the way. |
Member
|
@flycash The appveyor setting file has been merged. Could you open the test in your PR, and let's wait it pass. |
Member
|
I have sync your branch, you should have it now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Now, I read the document of PowerMockito and find the way to mock system class's static method.
So I remove the reflection code. I think it would be better to use PowerMockito and it can avoid the problem of compatability between difference OS and platform.
see EnvUtilsTest failed
Why submit this pull request?
Bug fix
New feature provided
Improve performance
Related issues
Bug fix
Bug description.
How to fix?
New feature or improvement