You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2022/10/25 07:51:08 UTC

[GitHub] [hadoop] aajisaka commented on a diff in pull request #4993: YARN-11337. Upgrade Junit 4 to 5 in hadoop-yarn-applications-mawo

aajisaka commented on code in PR #4993:
URL: https://github.com/apache/hadoop/pull/4993#discussion_r1004122612


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-mawo/hadoop-yarn-applications-mawo-core/src/test/java/org/apache/hadoop/applications/mawo/server/common/TestMaWoConfiguration.java:
##########
@@ -31,29 +33,29 @@ public class TestMaWoConfiguration {
    * Validate default MaWo Configurations.
    */
   @Test
-  public void testMaWoConfiguration() {
+  void testMaWoConfiguration() {
 
     MawoConfiguration mawoConf = new MawoConfiguration();
 
     // validate Rpc server port
-    Assert.assertEquals(mawoConf.getRpcServerPort(), 5120);
+    assertEquals(mawoConf.getRpcServerPort(), 5120);

Review Comment:
   Would you fix the order of the argument as follows?
   ```
   assertEquals(5120, mawoConf.getRpcServerPort());
   ```



##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-mawo/hadoop-yarn-applications-mawo-core/src/test/java/org/apache/hadoop/applications/mawo/server/common/TestMaWoConfiguration.java:
##########
@@ -31,29 +33,29 @@ public class TestMaWoConfiguration {
    * Validate default MaWo Configurations.
    */
   @Test
-  public void testMaWoConfiguration() {
+  void testMaWoConfiguration() {
 
     MawoConfiguration mawoConf = new MawoConfiguration();
 
     // validate Rpc server port
-    Assert.assertEquals(mawoConf.getRpcServerPort(), 5120);
+    assertEquals(mawoConf.getRpcServerPort(), 5120);
 
     // validate Rpc hostname
-    Assert.assertTrue("localhost".equals(mawoConf.getRpcHostName()));
+    assertEquals("localhost", mawoConf.getRpcHostName());
 
     // validate job queue storage conf
     boolean jobQueueStorage = mawoConf.getJobQueueStorageEnabled();
-    Assert.assertTrue(jobQueueStorage);
+    assertTrue(jobQueueStorage);
 
     // validate default teardownWorkerValidity Interval
-    Assert.assertEquals(mawoConf.getTeardownWorkerValidityInterval(), 120000);
+    assertEquals(mawoConf.getTeardownWorkerValidityInterval(), 120000);

Review Comment:
   Should be `assertEquals(120000, mawoConf.getTeardownWorkerValidityInterval());`
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org