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

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


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

commit 1ffa7f834988b85bf3f91b9e847a49293ce7488e
Author: Weiwei Yang <[email protected]>
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to