Browse Source

YARN-1837. Fixed TestMoveApplication#testMoveRejectedByScheduler failure. Contributed by Hong Zhiguo

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1584862 13f79535-47bb-0310-9956-ffa450edef68
Jian He 11 years ago
parent
commit
15ac36a216

+ 3 - 0
hadoop-yarn-project/CHANGES.txt

@@ -78,6 +78,9 @@ Release 2.4.1 - UNRELEASED
     YARN-1898. Made Standby RM links conf, stacks, logLevel, metrics, jmx, logs
     YARN-1898. Made Standby RM links conf, stacks, logLevel, metrics, jmx, logs
     and static not be redirected to Active RM. (Xuan Gong via zjshen)
     and static not be redirected to Active RM. (Xuan Gong via zjshen)
 
 
+    YARN-1837. Fixed TestMoveApplication#testMoveRejectedByScheduler failure.
+    (Hong Zhiguo via jianhe)
+
 Release 2.4.0 - 2014-04-07 
 Release 2.4.0 - 2014-04-07 
 
 
   INCOMPATIBLE CHANGES
   INCOMPATIBLE CHANGES

+ 7 - 0
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestMoveApplication.java

@@ -72,6 +72,13 @@ public class TestMoveApplication {
     Application application = new Application("user1", resourceManager);
     Application application = new Application("user1", resourceManager);
     application.submit();
     application.submit();
 
 
+    // Wait for app to be accepted
+    RMApp app = resourceManager.rmContext.getRMApps()
+            .get(application.getApplicationId());
+    while (app.getState() != RMAppState.ACCEPTED) {
+      Thread.sleep(100);
+    }
+
     ClientRMService clientRMService = resourceManager.getClientRMService();
     ClientRMService clientRMService = resourceManager.getClientRMService();
     try {
     try {
       // FIFO scheduler does not support moves
       // FIFO scheduler does not support moves