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

gifuma pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 509b20b  YARN-9404. 
TestApplicationLifetimeMonitor#testApplicationLifetimeMonitor fails 
intermittent. Contributed by Prabhu Joseph.
509b20b is described below

commit 509b20b292465ea0c8a2a0908995421e29e71da4
Author: Giovanni Matteo Fumarola <gif...@apache.org>
AuthorDate: Fri Mar 22 11:45:39 2019 -0700

    YARN-9404. TestApplicationLifetimeMonitor#testApplicationLifetimeMonitor 
fails intermittent. Contributed by Prabhu Joseph.
---
 .../resourcemanager/rmapp/TestApplicationLifetimeMonitor.java      | 7 +++----
 1 file changed, 3 insertions(+), 4 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/rmapp/TestApplicationLifetimeMonitor.java
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/TestApplicationLifetimeMonitor.java
index 26499a7..8d40936 100644
--- 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/TestApplicationLifetimeMonitor.java
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/TestApplicationLifetimeMonitor.java
@@ -204,13 +204,12 @@ public class TestApplicationLifetimeMonitor {
         // app4 submitted exceeding queue max lifetime,
         // so killed after queue max lifetime.
         rm.waitForState(app4.getApplicationId(), RMAppState.KILLED);
-        long totalTimeRun =
-            (app4.getFinishTime() - app4.getSubmitTime()) / 1000;
+        long totalTimeRun = app4.getFinishTime() - app4.getSubmitTime();
         Assert.assertTrue("Application killed before lifetime value",
-            totalTimeRun > maxLifetime);
+            totalTimeRun > (maxLifetime * 1000));
         Assert.assertTrue(
             "Application killed before lifetime value " + totalTimeRun,
-            totalTimeRun < maxLifetime + 10L);
+            totalTimeRun < ((maxLifetime + 10L) * 1000));
       }
     } finally {
       stopRM(rm);


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

Reply via email to