ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mpapirkovs...@apache.org
Subject [1/2] ambari git commit: AMBARI-14774. Change logging level to INFO for unit tests. Unstable unit tests fix. (mpapirkovskyy)
Date Mon, 25 Jan 2016 18:12:13 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.2 04389fe1b -> f19be1403
  refs/heads/trunk 9e8405299 -> 05a4020eb


AMBARI-14774. Change logging level to INFO for unit tests. Unstable unit tests fix. (mpapirkovskyy)


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

Branch: refs/heads/branch-2.2
Commit: f19be1403eb6da82bd4d3f0753fb932bf06abca0
Parents: 04389fe
Author: Myroslav Papirkovskyy <mpapyrkovskyy@hortonworks.com>
Authored: Mon Jan 25 20:10:17 2016 +0200
Committer: Myroslav Papirkovskyy <mpapyrkovskyy@hortonworks.com>
Committed: Mon Jan 25 20:10:17 2016 +0200

----------------------------------------------------------------------
 .../org/apache/ambari/server/actionmanager/ActionScheduler.java    | 2 +-
 .../apache/ambari/server/actionmanager/TestActionScheduler.java    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/f19be140/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
index 3b489e5..5753361 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
@@ -864,7 +864,7 @@ class ActionScheduler implements Runnable {
             && !status.equals(HostRoleStatus.IN_PROGRESS)) {
       return false;
     }
-    if (currentTime > stage.getLastAttemptTime(hostName, role)
+    if (currentTime >= stage.getLastAttemptTime(hostName, role)
         + taskTimeout) {
       return true;
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/f19be140/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/TestActionScheduler.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/TestActionScheduler.java
b/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/TestActionScheduler.java
index fd8b4ea..bc4d397 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/TestActionScheduler.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/TestActionScheduler.java
@@ -317,7 +317,7 @@ public class TestActionScheduler {
     stages.get(0).setHostRoleStatus(hostname, "SECONDARY_NAMENODE", HostRoleStatus.IN_PROGRESS);
     scheduler.doWork();
     assertEquals(1, stages.get(0).getAttemptCount(hostname, "NAMENODE"));
-    assertEquals(1, stages.get(0).getAttemptCount(hostname, "SECONDARY_NAMENODE"));
+    assertEquals(2, stages.get(0).getAttemptCount(hostname, "SECONDARY_NAMENODE"));
 
     while (!stages.get(0).getHostRoleStatus(hostname, "SECONDARY_NAMENODE")
         .equals(HostRoleStatus.TIMEDOUT) && cycleCount++ <= MAX_CYCLE_ITERATIONS)
{


Mime
View raw message