hadoop-yarn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zjs...@apache.org
Subject svn commit: r1608669 - in /hadoop/common/branches/branch-2.5/hadoop-yarn-project: ./ hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/
Date Tue, 08 Jul 2014 06:09:53 GMT
Author: zjshen
Date: Tue Jul  8 06:09:53 2014
New Revision: 1608669

URL: http://svn.apache.org/r1608669
Log:
YARN-2158. Improved assertion messages of TestRMWebServicesAppsModification. Contributed by
Varun Vasudev.
svn merge --ignore-ancestry -c 1608667 ../../trunk/

Modified:
    hadoop/common/branches/branch-2.5/hadoop-yarn-project/CHANGES.txt
    hadoop/common/branches/branch-2.5/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/TestRMWebServicesAppsModification.java

Modified: hadoop/common/branches/branch-2.5/hadoop-yarn-project/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.5/hadoop-yarn-project/CHANGES.txt?rev=1608669&r1=1608668&r2=1608669&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.5/hadoop-yarn-project/CHANGES.txt (original)
+++ hadoop/common/branches/branch-2.5/hadoop-yarn-project/CHANGES.txt Tue Jul  8 06:09:53
2014
@@ -319,6 +319,9 @@ Release 2.5.0 - UNRELEASED
     YARN-2250. FairScheduler.findLowestCommonAncestorQueue returns null when
     queues not identical (Krisztian Horvath via Sandy Ryza)
 
+    YARN-2158. Improved assertion messages of TestRMWebServicesAppsModification.
+    (Varun Vasudev via zjshen)
+
 Release 2.4.1 - 2014-06-23 
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/branches/branch-2.5/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/TestRMWebServicesAppsModification.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.5/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/TestRMWebServicesAppsModification.java?rev=1608669&r1=1608668&r2=1608669&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.5/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/TestRMWebServicesAppsModification.java
(original)
+++ hadoop/common/branches/branch-2.5/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/TestRMWebServicesAppsModification.java
Tue Jul  8 06:09:53 2014
@@ -411,13 +411,15 @@ public class TestRMWebServicesAppsModifi
     assertEquals(MediaType.APPLICATION_JSON_TYPE, response.getType());
     JSONObject json = response.getEntity(JSONObject.class);
     assertEquals("incorrect number of elements", 1, json.length());
+    String responseState = json.getString("state");
     boolean valid = false;
     for (RMAppState state : states) {
-      if (state.toString().equals(json.getString("state"))) {
+      if (state.toString().equals(responseState)) {
         valid = true;
       }
     }
-    assertTrue("app state incorrect", valid);
+    String msg = "app state incorrect, got " + responseState;
+    assertTrue(msg, valid);
     return;
   }
 
@@ -441,7 +443,8 @@ public class TestRMWebServicesAppsModifi
         valid = true;
       }
     }
-    assertTrue("app state incorrect", valid);
+    String msg = "app state incorrect, got " + state;
+    assertTrue(msg, valid);
     return;
   }
 



Mime
View raw message