-
Notifications
You must be signed in to change notification settings - Fork 9k
MAPREDUCE-7419. Upgrade Junit 4 to 5 in hadoop-mapreduce-client-common #5028
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. |
🎊 +1 overall
This message was automatically generated. |
@aajisaka - Please help in reviewing in your free time. Thanks. |
@aajisaka @slfan1989 Please help in reviewing this PR. Thanks. |
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.
Dropped some comments, in general looks good,
Some generic stuff, don't use * in imports, rather expand. I flagged at some places, but do it where ever you added the import. (don't touch the existing ones).
Second, regarding the test. MR is a dependency to other modules as well and Jenkins by default doesn't run all the tests.
So, once you address all the comments, to make sure nothing break, can you make an additional commit touching the hadoop-project/pom so that entire test runs. We can revert that once we get the green build and merge this PR.
If, everything stays green post this. changes lgtm
@@ -22,77 +22,81 @@ | |||
import java.util.Collection; | |||
|
|||
import org.apache.hadoop.conf.Configuration; | |||
|
|||
import static org.junit.jupiter.api.Assertions.*; |
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.
expand, we don't use .* in general
} | ||
|
||
@Test(timeout = 10000) | ||
public void testIsJobDirValid() throws IOException { |
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.
is removing public mandatory? if things can work with this and others staying public, Would prefer it stay as public only
|
||
import static org.junit.jupiter.api.Assertions.assertNotNull; |
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.
import order is wrong
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.
Hi @ayushtkn . I used Intellij to optimize imports. Can you share what should be ideal order here ? Thanks
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.Timeout; | ||
|
||
import static org.junit.jupiter.api.Assertions.*; |
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.
expand
@@ -20,6 +20,7 @@ | |||
import org.apache.hadoop.util.StringUtils; | |||
|
|||
import static org.assertj.core.api.Assertions.assertThat; | |||
import static org.junit.jupiter.api.Assertions.*; |
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.
expand the import
import static org.junit.Assert.assertEquals; | ||
import static org.junit.Assert.assertFalse; | ||
import static org.junit.Assert.assertTrue; | ||
import static org.junit.jupiter.api.Assertions.*; |
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.
< 8000 !-- '"` -->expand
import static org.junit.Assert.assertNull; | ||
import static org.junit.Assert.assertTrue; | ||
import static org.junit.Assert.fail; | ||
import static org.junit.jupiter.api.Assertions.*; |
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.
expand
Thanks a lot @ayushtkn for your review, I will address your comments in my next commit. |
🎊 +1 overall
This message was automatically generated. |
@ayushtkn - As suggested the above by you. triggering next run with change in |
🎊 +1 overall
This message was automatically generated. |
I think it didn’t trigger the tests for the entire project :-( may be not hadoop-project/pom but the pom in main project would do |
Thanks for your review. I have updated |
💔 -1 overall
This message was automatically generated. |
Have triggered the build again, test were failing due to unable to create native thread. |
💔 -1 overall
This message was automatically generated. |
Sorry @ayushtkn for missing it. Can you please help with import order thing ? |
Hi @ashutoshcipher I just meant don't use *, there rather expand
and the second was if we don't need to remove public and things can work like that also, we should let it stay, it will reduce our code changes, and less chances of people blaming us if something breaks around that to us. there is a code formatter for hadoop in case interested |
Will make changes in my next commit. Thanks |
💔 -1 overall
This message was automatically generated. |
Good to go from my side. I don't think the test failures are related, double check once. If all safe can revert the changes done in the pom and licence to trigger the tests. |
Thanks @ayushtkn for reviewing it. I checked as well and test failures doesnt look related. Reverted the pom and licence changes as well that were for to trigger the tests |
💔 -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.
LGTM
Description of PR
Upgrade Junit 4 to 5 in hadoop-mapreduce-client-common
JIRA - MAPREDUCE-7419
For code changes:
LICENSE
,LICENSE-binary
,NOTICE-binary
files?