-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Fix UT readMultipleFiles in LocalCacheFileInStreamTest #18168
Merged
alluxio-bot
merged 3 commits into
Alluxio:main
from
jasondrogba:LocalCacheFileInStreamTest-readMultipleFiles
Nov 6, 2023
Merged
Fix UT readMultipleFiles in LocalCacheFileInStreamTest #18168
alluxio-bot
merged 3 commits into
Alluxio:main
from
jasondrogba:LocalCacheFileInStreamTest-readMultipleFiles
Nov 6, 2023
Conversation
This file contains 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
Automated checks report:
Some checks failed. Please fix the reported issues and reply 'alluxio-bot, check this please' to re-run checks. |
jasondrogba
changed the title
fix UT readMultipleFiles in LocalCacheFileInStreamTest
Fix UT readMultipleFiles in LocalCacheFileInStreamTest
Sep 19, 2023
Automated checks report:
All checks passed! |
dbw9580
approved these changes
Sep 19, 2023
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, thanks for fixing this!
apc999
force-pushed
the
main
branch
2 times, most recently
from
October 17, 2023 19:11
2fec0ec
to
b597c61
Compare
jiacheliu3
added
type-bug
This issue is about a bug
type-code-quality
code quality improvement
labels
Nov 6, 2023
alluxio-bot, merge this please |
ssz1997
pushed a commit
to ssz1997/alluxio
that referenced
this pull request
Dec 15, 2023
### What changes are proposed in this pull request? Added a modification to the code in the LocalCacheFileInStreamTest class.Specifically, the code change addresses an issue with the readMultipleFiles unit test in the LocalCacheFileInStreamTest. The proposed change to fix this issue is to add the setUfsPath method within the generateURIStatus method and set it to be identical to the Path. This ensures that the UfsPath is properly set for each file, allowing the readMultipleFiles test to pass successfully. ### Why are the changes needed? The changes in this pull request are needed because they address a specific issue with the LocalCacheFileInStreamTest class's readMultipleFiles unit test. The readMultipleFiles unit test was failing because it relied on the correct calculation of FieldId in Dora, which is based on the UfsPath. However, in this test, the UfsPath for files was not being set and remained empty, leading to all files having the same FieldId after hash calculation. The absence of a proper UfsPath for files in the test class caused multiple files to share the same FieldId, causing them to read data from a single file instead of their respective files. To resolve this issue, the proposed solution is to set the UfsPath within the generateURIStatus method to be identical to the Path. This ensures that each file has a distinct and properly set UfsPath, allowing the readMultipleFiles test to pass without affecting other unit tests. ### Does this PR introduce any user facing changes? Please list the user-facing changes introduced by your change, including 1. change in user-facing APIs 2. addition or removal of property keys 3. webui pr-link: Alluxio#18168 change-id: cid-422d5b4eb8bd94b044dbae9181dfc91810e300ed
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.
What changes are proposed in this pull request?
Added a modification to the code in the LocalCacheFileInStreamTest class.Specifically, the code change addresses an issue with the readMultipleFiles unit test in the LocalCacheFileInStreamTest.
The proposed change to fix this issue is to add the setUfsPath method within the generateURIStatus method and set it to be identical to the Path. This ensures that the UfsPath is properly set for each file, allowing the readMultipleFiles test to pass successfully.
Why are the changes needed?
The changes in this pull request are needed because they address a specific issue with the LocalCacheFileInStreamTest class's readMultipleFiles unit test.
The readMultipleFiles unit test was failing because it relied on the correct calculation of FieldId in Dora, which is based on the UfsPath. However, in this test, the UfsPath for files was not being set and remained empty, leading to all files having the same FieldId after hash calculation.
The absence of a proper UfsPath for files in the test class caused multiple files to share the same FieldId, causing them to read data from a single file instead of their respective files.
To resolve this issue, the proposed solution is to set the UfsPath within the generateURIStatus method to be identical to the Path. This ensures that each file has a distinct and properly set UfsPath, allowing the readMultipleFiles test to pass without affecting other unit tests.
Does this PR introduce any user facing changes?
Please list the user-facing changes introduced by your change, including