-
Notifications
You must be signed in to change notification settings - Fork 9.1k
HADOOP-19424. [S3A] Upgrade JUnit from 4 to 5 in hadoop-aws. #7752
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
Conversation
💔 -1 overall
This message was automatically generated. |
@steveloughran The JUnit 5 upgrade for the hadoop-aws module has been completed and is ready for review. I've also removed the dependency on JUnit 4. Let's take a look at the Yetus build results. If you have time, your review of this PR would be appreciated. Thank you! |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
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.
+1. Before committing this, I would prefer if someone could run the integration tests against real S3. (If necessary, I can fake it with GCS's S3-compatible XML API, but that's not the typical usage pattern.)
@cnauroth Thank you for your help and code review! I completely agree with your point, and we indeed need other members of the community to assist in validating this part of the code. |
public void testInputPolicies(S3AInputPolicy pPolicy, | ||
long pTargetPos, long pLength, long pContentLength, | ||
long pReadahead, long pExpectedLimit) throws Throwable { | ||
initTestS3AInputPolicies(pPolicy, pTargetPos, pLength, pContentLength, |
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.
@steveloughran Regarding the Parameterized test issue, we have found some solutions, although it will significantly increase the workload. We can call initTestS3AInputPolicies in each unit test and explicitly call the setup method in the init method, which ensures that the tests pass.
cc: @cnauroth
@steveloughran I would still prefer to have this PR temporarily approved, as it will help better advance the migration to JUnit 4. If you have a better implementation approach, I would be happy to assist you in further upgrading the code in the future. |
+1 for the merge and then I can work on top of this |
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.
+1 and lets see where we go from here.
FWIW I am really unimpressed how they changed the signatures of asserttrue/assertequals etc, so that those people who put in the effort of writing meaningful assertion messages suffer.
I am so happy I've been using assertj for some time
@steveloughran Thanks for supporting the merge of this PR! If any issues arise, feel free to me @slfan1989, and I'll address them as soon as possible. Additionally, once the JUnit 5 upgrade is complete, I plan to prioritize upgrading AssertJ in the Yarn module. I’ve found that AssertJ provides a more user-friendly assertion experience, which is more intuitive and easier to use compared to JUnit 5's native assertions. |
|
I've generally left junit4 asserts alone in existing test cases, except on code I was actually editing. But given junit5 has broken every single assert with meaningful error messages, well, it's easier to justify, isn't it? |
Description of PR
JIRA: HADOOP-19424. [S3A] Upgrade JUnit from 4 to 5 in hadoop-aws.
How was this patch tested?
mvn clean test.
For code changes:
LICENSE
,LICENSE-binary
,NOTICE-binary
files?