hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From varunsax...@apache.org
Subject [18/50] [abbrv] hadoop git commit: YARN-5815. Random failure of TestApplicationPriority.testOrderOfActivatingThePriorityApplicationOnRMRestart (Bibin A Chundatt via Varun Saxena)
Date Sun, 06 Nov 2016 09:58:04 GMT
YARN-5815. Random failure of TestApplicationPriority.testOrderOfActivatingThePriorityApplicationOnRMRestart
(Bibin A Chundatt via Varun Saxena)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/37791901
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/37791901
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/37791901

Branch: refs/heads/YARN-5355
Commit: 377919010b687dbf95f62082201cf91f5a7a2318
Parents: 0dc2a6a
Author: Varun Saxena <varunsaxena@apache.org>
Authored: Thu Nov 3 00:37:09 2016 +0530
Committer: Varun Saxena <varunsaxena@apache.org>
Committed: Thu Nov 3 00:37:09 2016 +0530

----------------------------------------------------------------------
 .../capacity/TestApplicationPriority.java       | 23 ++++++++++----------
 1 file changed, 11 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/37791901/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/TestApplicationPriority.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/TestApplicationPriority.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/TestApplicationPriority.java
index 8bd5314..523d49d 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/TestApplicationPriority.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/TestApplicationPriority.java
@@ -684,36 +684,35 @@ public class TestApplicationPriority {
         (LeafQueue) ((CapacityScheduler) scheduler).getQueue("default");
 
     // wait for all applications to get added to scheduler
-    int count = 5;
+    int count = 50;
     while (count-- > 0) {
-      if ((defaultQueue.getNumActiveApplications() + defaultQueue
-          .getNumPendingApplications()) == 3) {
+      if (defaultQueue.getNumPendingApplications() == 3) {
         break;
       }
-      Thread.sleep(500);
+      Thread.sleep(50);
     }
 
     // Before NM registration, AMResourceLimit threshold is 0. So no
     // applications get activated.
     Assert.assertEquals(0, defaultQueue.getNumActiveApplications());
+    Assert.assertEquals(3, defaultQueue.getNumPendingApplications());
 
     // NM resync to new RM
     nm1.registerNode();
     dispatcher1.await();
 
-    Assert.assertEquals(2, defaultQueue.getNumActiveApplications());
-    Assert.assertEquals(1, defaultQueue.getNumPendingApplications());
-
-
-    // wait for activating one applications
-    count = 5;
+    // wait for activating applications
+    count = 50;
     while (count-- > 0) {
-      if (defaultQueue.getOrderingPolicy().getSchedulableEntities().size() == 2) {
+      if (defaultQueue.getNumActiveApplications() == 2) {
         break;
       }
-      Thread.sleep(500);
+      Thread.sleep(50);
     }
 
+    Assert.assertEquals(2, defaultQueue.getNumActiveApplications());
+    Assert.assertEquals(1, defaultQueue.getNumPendingApplications());
+
     // verify for order of activated applications iterator
     iterator =
         defaultQueue.getOrderingPolicy().getSchedulableEntities().iterator();


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


Mime
View raw message