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

YARN-11245. Upgrade JUnit from 4 to 5 in hadoop-yarn-csi #4778

Merged
merged 1 commit into from
Aug 30, 2022

Conversation

ashutoshcipher
Copy link
Contributor

Description of PR

Upgrade JUnit from 4 to 5 in hadoop-yarn-csi

JIRA - YARN-11245

For code changes:

  • Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
  • Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation?
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE, LICENSE-binary, NOTICE-binary files?

@slfan1989
Copy link
Contributor

slfan1989 commented Aug 21, 2022

@ashutoshcipher @aajisaka From my personal point of view, this change is valuable, but can we provide some suggestions to developers, such as which methods we should use in junit5. Forcibly changing the habits of developers is not very friendly.

@ashutoshcipher Thanks a lot for your contribution, but it's better to let the developers know the best practices in junit5.

@ashutoshcipher
Copy link
Contributor Author

@slfan1989 - We are not forcing the developers to change any habits. This upgrade is required for Java 11 compile support.

Please feel to check online for best practices in junit5. I am sure you will get many links. Also best-practices are very much subjective.

@slfan1989
Copy link
Contributor

Please feel to check online for best practices in junit5. I am sure you will get many links. Also best-practices are very much subjective.

I think the responsible approach is that the community should give a guide, such as which methods of junit4 are replaced with which methods of junit5, rather than encouraging developers to search the Internet.

@slfan1989
Copy link
Contributor

We are not forcing the developers to change any habits. This upgrade is required for Java 11 compile support.

@ashutoshcipher This is very necessary, I can recognize the value of this, and thank you very much for your contribution, but it is better to give a guide first.

@ashutoshcipher
Copy link
Contributor Author

@slfan1989 - To know which methods of junit4 are replaced with which methods of junit5. You can see previous PRs - they will be very much informative to know such things :)

@slfan1989
Copy link
Contributor

@slfan1989 - To know which methods of junit4 are replaced with which methods of junit5. You can see previous PRs - they will be very much informative to know such things :)

I still feel that this is not very friendly, let's look at other partners' suggestions.

@ashutoshcipher
Copy link
Contributor Author

I think the responsible approach is that the community should give a guide

I feel community is already busy with so many things. I am atleast personally not expecting from someone to sit and write down best practices for upgrading Junit 4 to Junit 5 for me. But if someone want/can do it, I am very much happy :)

We are all learners and its upto us to decide how we want to learn :)

FYI - Currently, This is being followed - https://github.com/openrewrite/rewrite-docs/tree/b187223ddcbf369a77a86efd6950e924fd91f00d/reference/recipes/java/testing/junit5

@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 51s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 1s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+0 🆗 xmllint 0m 0s xmllint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 6 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 38m 25s trunk passed
+1 💚 compile 0m 52s trunk passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚 compile 0m 50s trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 checkstyle 0m 47s trunk passed
+1 💚 mvnsite 0m 55s trunk passed
+1 💚 javadoc 0m 56s trunk passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚 javadoc 0m 44s trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 spotbugs 1m 32s trunk passed
+1 💚 shadedclient 20m 54s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 35s the patch passed
+1 💚 compile 0m 35s the patch passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚 javac 0m 35s the patch passed
+1 💚 compile 0m 32s the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 javac 0m 32s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 22s the patch passed
+1 💚 mvnsite 0m 35s the patch passed
+1 💚 javadoc 0m 29s the patch passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚 javadoc 0m 28s the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 spotbugs 1m 9s the patch passed
+1 💚 shadedclient 20m 14s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 0m 55s hadoop-yarn-csi in the patch passed.
+1 💚 asflicense 0m 51s The patch does not generate ASF License warnings.
95m 7s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4778/1/artifact/out/Dockerfile
GITHUB PR #4778
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient codespell detsecrets xmllint spotbugs checkstyle
uname Linux 225547b1df51 4.15.0-191-generic #202-Ubuntu SMP Thu Aug 4 01:49:29 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / e8e42a8
Default Java Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4778/1/testReport/
Max. process+thread count 699 (vs. ulimit of 5500)
modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-csi U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-csi
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4778/1/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@aajisaka
Copy link
Member

aajisaka commented Aug 30, 2022

@slfan1989 @ashutoshcipher Thank you for the discussion

I feel community is already busy with so many things. I am atleast personally not expecting from someone to sit and write down best practices for upgrading Junit 4 to Junit 5 for me. But if someone want/can do it, I am very much happy :)

+1 to write down best practices. In this case, now I like using AssertJ APIs as they are more fluent and their error messages are user-friendly, but I think we can continue to use JUnit 5 APIs because it's the similar experience as existing JUnit 4 APIs and it's more easier to use for the upgrade rather than replacing all the APIs with AssertJ.

@aajisaka aajisaka merged commit 90dba8b into apache:trunk Aug 30, 2022
HarshitGupta11 pushed a commit to HarshitGupta11/hadoop that referenced this pull request Nov 28, 2022
Co-authored-by: Ashutosh Gupta <ashugpt@amazon.com>
Signed-off-by: Akira Ajisaka <aajisaka@apache.org>
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.

4 participants