-
Notifications
You must be signed in to change notification settings - Fork 142
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
[MINOR] test: fix tempdir leak in KerberizedHdfs tests #721
Conversation
Codecov Report
@@ Coverage Diff @@
## master #721 +/- ##
============================================
+ Coverage 60.49% 62.81% +2.31%
- Complexity 1846 1850 +4
============================================
Files 228 215 -13
Lines 12744 10785 -1959
Branches 1067 1064 -3
============================================
- Hits 7710 6775 -935
+ Misses 4625 3660 -965
+ Partials 409 350 -59 see 30 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@zuston please cherry-pick this to branch-0.7 after it's merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
### What changes were proposed in this pull request? Use JUnit 5 managed `@TempDir` in `KerberizedHdfs` test. ### Why are the changes needed? The tempdir created by `KerberizedHdfs` is leaking. It may cause test failures in some condition. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Before: ```console $ mvn test -Dtest=HadoopFilesystemProviderTest ... $ find . -name 'serverKS.jks' ./common/target/tmp/kerberizedDfsBaseDir1821275617120252168/serverKS.jks ``` After: ```console $ mvn test -Dtest=HadoopFilesystemProviderTest ... $ find . -name 'serverKS.jks' ```
Merge to master & branch 0.7. |
Thanks @jerqi for the review. |
@kaijchen
The test fail [ERROR] org.apache.uniffle.common.filesystem.HadoopFilesystemProviderTest Time elapsed: 1.896 s <<< ERROR! java.lang.Exception: java.io.FileNotFoundException: /Users/roryqi/Downloads/apache-uniffle-0.7.0-incubating-src/common/target/tmp/junit1553702532156578735/serverKS.jks (No such file or directory) I revert this pr. The tests passed. |
@jerqi OK, please revert this. I'll look into it later. |
### What changes were proposed in this pull request? Use JUnit 5 managed `@TempDir` in `KerberizedHdfs` test. ### Why are the changes needed? The tempdir created by `KerberizedHdfs` is leaking. It may cause test failures in some condition. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Before: ```console $ mvn test -Dtest=HadoopFilesystemProviderTest ... $ find . -name 'serverKS.jks' ./common/target/tmp/kerberizedDfsBaseDir1821275617120252168/serverKS.jks ``` After: ```console $ mvn test -Dtest=HadoopFilesystemProviderTest ... $ find . -name 'serverKS.jks' ```
…e#721)" (apache#732) This reverts commit 37d7659.
### What changes were proposed in this pull request? Use JUnit 5 managed `@TempDir` in `KerberizedHdfs` test. ### Why are the changes needed? The tempdir created by `KerberizedHdfs` is leaking. It may cause test failures in some condition. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Before: ```console $ mvn test -Dtest=HadoopFilesystemProviderTest ... $ find . -name 'serverKS.jks' ./common/target/tmp/kerberizedDfsBaseDir1821275617120252168/serverKS.jks ``` After: ```console $ mvn test -Dtest=HadoopFilesystemProviderTest ... $ find . -name 'serverKS.jks' ```
…e#721)" (apache#732) This reverts commit 37d7659.
What changes were proposed in this pull request?
Use JUnit 5 managed
@TempDir
inKerberizedHdfs
test.Why are the changes needed?
The tempdir created by
KerberizedHdfs
is leaking.It may cause test failures in some condition.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Before:
After: