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/11 07:20:17 UTC

[GitHub] [hadoop] aajisaka commented on a diff in pull request #4994: YARN-11338. Upgrade Junit 4 to 5 in hadoop-yarn-applications-unmanaged-am-launcher

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


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-unmanaged-am-launcher/src/test/java/org/apache/hadoop/yarn/applications/unmanagedamlauncher/TestUnmanagedAMLauncher.java:
##########
@@ -71,9 +72,9 @@ public static void setup() throws InterruptedException, IOException {
       LOG.info("MiniYARN ResourceManager published web address: " +
                yarnClusterConfig.get(YarnConfiguration.RM_WEBAPP_ADDRESS));
       String webapp = yarnClusterConfig.get(YarnConfiguration.RM_WEBAPP_ADDRESS);
-      assertTrue("Web app address still unbound to a host at " + webapp,
-        !webapp.startsWith("0.0.0.0"));
-      LOG.info("Yarn webapp is at "+ webapp);
+      assertTrue(!webapp.startsWith("0.0.0.0"),

Review Comment:
   Would you replace with `assertFalse(webapp.startsWith("0.0.0.0"), ...)`?



##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-unmanaged-am-launcher/src/test/java/org/apache/hadoop/yarn/applications/unmanagedamlauncher/TestUnmanagedAMLauncher.java:
##########
@@ -149,24 +151,24 @@ public void launchAM(ApplicationAttemptId attemptId)
               throws IOException, YarnException {
             YarnApplicationAttemptState attemptState =
                 rmClient.getApplicationAttemptReport(attemptId)
-                  .getYarnApplicationAttemptState();
-            Assert.assertTrue(attemptState
-              .equals(YarnApplicationAttemptState.LAUNCHED));
+                    .getYarnApplicationAttemptState();
+            assertEquals(attemptState, YarnApplicationAttemptState.LAUNCHED);

Review Comment:
   Could you reverse the order of the arguments? The order is expected, actual.



-- 
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