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

[#559] test: use withEnvironmentVariable to replace RssUtilsTest#setEnv #560

Merged
merged 1 commit into from
Feb 8, 2023

Conversation

advancedxy
Copy link
Contributor

@advancedxy advancedxy commented Feb 7, 2023

What changes were proposed in this pull request?

replace RssUtils.setEnv by withEnvironmentVariable

Why are the changes needed?

Better code quality. This fixes #559

Does this PR introduce any user-facing change?

No

How was this patch tested?

Existed UTs.

@codecov-commenter
Copy link

codecov-commenter commented Feb 7, 2023

Codecov Report

Merging #560 (60a5104) into master (5cba4e7) will decrease coverage by 0.37%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master     #560      +/-   ##
============================================
- Coverage     60.87%   60.50%   -0.37%     
+ Complexity     1796     1567     -229     
============================================
  Files           213      191      -22     
  Lines         12372    10528    -1844     
  Branches       1050      886     -164     
============================================
- Hits           7531     6370    -1161     
+ Misses         4434     3793     -641     
+ Partials        407      365      -42     
Impacted Files Coverage Δ
...storage/handler/impl/DataSkippableReadHandler.java 83.78% <0.00%> (-2.71%) ⬇️
.../apache/uniffle/coordinator/ClientConfManager.java 91.54% <0.00%> (-1.41%) ⬇️
...he/uniffle/server/storage/LocalStorageManager.java 85.87% <0.00%> (-1.13%) ⬇️
...pache/hadoop/mapreduce/task/reduce/RssFetcher.java
.../hadoop/mapreduce/task/reduce/RssEventFetcher.java
...java/org/apache/hadoop/mapred/SortWriteBuffer.java
...k/shuffle/writer/WrappedByteArrayOutputStream.java
.../org/apache/spark/shuffle/writer/WriterBuffer.java
...org/apache/spark/shuffle/writer/AddBlockEvent.java
...apache/hadoop/mapreduce/v2/app/RssMRAppMaster.java
... and 15 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@kaijchen kaijchen left a comment

Choose a reason for hiding this comment

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

Thanks @advancedxy for the work. Some general questions here.

@advancedxy advancedxy changed the title [#559] refactor: use system stubs to mutable environment variables [#559] refactor: use withEnvironmentVariable to replace RssUtils' setEnv Feb 8, 2023
Copy link
Contributor

@kaijchen kaijchen left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @advancedxy.

@kaijchen kaijchen changed the title [#559] refactor: use withEnvironmentVariable to replace RssUtils' setEnv [#559] test: use withEnvironmentVariable to replace RssUtilsTest#setEnv Feb 8, 2023
@advancedxy advancedxy merged commit b45175e into apache:master Feb 8, 2023
@advancedxy
Copy link
Contributor Author

Merged, thanks @kaijchen

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.

[Improvement] refactor RssUtilsTest.setEnv by leverage EnvironmentVariables system stub
3 participants