-
Notifications
You must be signed in to change notification settings - Fork 9.1k
HDFS-12431. [JDK17] Upgrade JUnit from 4 to 5 in hadoop-hdfs Part17. #7934
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. |
Configuration conf = new HdfsConfiguration(); | ||
conf.setInt(DFSConfigKeys.DFS_DATANODE_BALANCE_MAX_NUM_CONCURRENT_MOVES_KEY, 0); | ||
testBalancer1Internal (conf); | ||
Assertions.assertThrows(HadoopIllegalArgumentException.class, () -> { |
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.
It is best to use static imports.
@@ -1448,14 +1459,15 @@ public void testBalancerDispatchHotBlockTimeInterval() { | |||
Object hotBlockTimeInterval = field1.get(dispatcher); | |||
assertEquals(1000, (long)hotBlockTimeInterval); | |||
} catch (Exception e) { | |||
Assert.fail(e.getMessage()); | |||
Assertions.fail(e.getMessage()); |
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.
It is best to use static imports.
@@ -184,7 +185,7 @@ static void runBalancer(Suite s, | |||
// start rebalancing | |||
final Collection<URI> namenodes = DFSUtil.getInternalNsRpcUris(s.conf); | |||
final int r = Balancer.run(namenodes, s.parameters, s.conf); | |||
Assert.assertEquals(ExitStatus.SUCCESS.getExitCode(), r); | |||
Assertions.assertEquals(ExitStatus.SUCCESS.getExitCode(), r); |
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.
static imports.
Assert.assertEquals(totalBlocks - 2, info.numNodes()); | ||
Assert.assertEquals(totalBlocks * 2 - 2, info.getCapacity()); | ||
Assertions.assertEquals(totalBlocks - 2, info.numNodes()); | ||
Assertions.assertEquals(totalBlocks * 2 - 2, info.getCapacity()); |
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.
static imports.
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.
Thanks for the feedback—I’ll make the updates right away!
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
c5f4ff6
to
d825a69
Compare
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
Thanks @slfan1989 for reviewing and merging! |
Description of PR
JIRA:HDFS-12431. Upgrade JUnit from 4 to 5 in hadoop-hdfs Part17.
How was this patch tested?
Junit Test.
For code changes:
LICENSE
,LICENSE-binary
,NOTICE-binary
files?