You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ww...@apache.org on 2019/02/21 10:15:53 UTC

[hadoop] branch branch-3.2 updated: YARN-9315. TestCapacitySchedulerMetrics fails intermittently. Contributed by Prabhu Joseph.

This is an automated email from the ASF dual-hosted git repository.

wwei pushed a commit to branch branch-3.2
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/branch-3.2 by this push:
     new c2ef443  YARN-9315. TestCapacitySchedulerMetrics fails intermittently. Contributed by Prabhu Joseph.
c2ef443 is described below

commit c2ef443359df2f68dc36a40256de202505db0886
Author: Weiwei Yang <ww...@apache.org>
AuthorDate: Thu Feb 21 17:21:21 2019 +0800

    YARN-9315. TestCapacitySchedulerMetrics fails intermittently. Contributed by Prabhu Joseph.
---
 .../server/resourcemanager/TestCapacitySchedulerMetrics.java | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestCapacitySchedulerMetrics.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestCapacitySchedulerMetrics.java
index eaa966a..572619f 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestCapacitySchedulerMetrics.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestCapacitySchedulerMetrics.java
@@ -87,18 +87,18 @@ public class TestCapacitySchedulerMetrics {
     nm1.nodeHeartbeat(true);
     nm2.nodeHeartbeat(true);
 
-    // Verify HB metrics updated
     try {
+      // Verify HB metrics updated
       GenericTestUtils.waitFor(()
           -> csMetrics.getNumOfNodeUpdate() == 4, 100, 3000);
+      // For async mode, the number of alloc might be bigger than 1
+      Assert.assertTrue(csMetrics.getNumOfAllocates() > 0);
+      // But there will be only 2 successful commit (1 AM + 1 task)
+      GenericTestUtils.waitFor(()
+          -> csMetrics.getNumOfCommitSuccess() == 2, 100, 3000);
     } catch(TimeoutException e) {
       Assert.fail("CS metrics not updated on node-update events.");
     }
-
-    // For async mode, the number of alloc might be bigger than 1
-    Assert.assertTrue(csMetrics.getNumOfAllocates() > 0);
-    // But there will be only 2 successful commit (1 AM + 1 task)
-    Assert.assertEquals(2, csMetrics.getNumOfCommitSuccess());
   }
 
   @After


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