You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sm...@apache.org on 2016/04/13 16:40:24 UTC

ambari git commit: AMBARI-15795. Parallel execution should only be allowed on commands that have auto retry enabled - test fixes (smohanty)

Repository: ambari
Updated Branches:
  refs/heads/trunk fbb314a71 -> 3a3802ce0


AMBARI-15795. Parallel execution should only be allowed on commands that have auto retry enabled - test fixes (smohanty)


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

Branch: refs/heads/trunk
Commit: 3a3802ce01b1dabd6c1a8eaaaaf871dd3401ab51
Parents: fbb314a
Author: Sumit Mohanty <sm...@hortonworks.com>
Authored: Wed Apr 13 07:40:09 2016 -0700
Committer: Sumit Mohanty <sm...@hortonworks.com>
Committed: Wed Apr 13 07:40:09 2016 -0700

----------------------------------------------------------------------
 ambari-agent/src/main/python/ambari_agent/ActionQueue.py     | 2 +-
 ambari-agent/src/test/python/ambari_agent/TestActionQueue.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/3a3802ce/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
index ccae62c..a0596a2 100644
--- a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
+++ b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
@@ -160,7 +160,7 @@ class ActionQueue(threading.Thread):
             # checking just one command is enough as all commands for a stage is sent
             # at the same time and retry is only enabled for initial start/install
             retryAble = False
-            if 'command_retry_enabled' in command['commandParams']:
+            if 'commandParams' in command and 'command_retry_enabled' in command['commandParams']:
               retryAble = command['commandParams']['command_retry_enabled'] == "true"
             if retryAble:
               logger.info("Kicking off a thread for the command, id=" +

http://git-wip-us.apache.org/repos/asf/ambari/blob/3a3802ce/ambari-agent/src/test/python/ambari_agent/TestActionQueue.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/test/python/ambari_agent/TestActionQueue.py b/ambari-agent/src/test/python/ambari_agent/TestActionQueue.py
index 2adf4ed..fcf2965 100644
--- a/ambari-agent/src/test/python/ambari_agent/TestActionQueue.py
+++ b/ambari-agent/src/test/python/ambari_agent/TestActionQueue.py
@@ -924,7 +924,7 @@ class TestActionQueue(TestCase):
     actionQueue.stop()
     actionQueue.join()
     self.assertEqual(actionQueue.stopped(), True, 'Action queue is not stopped.')
-    self.assertEqual(1, process_command_mock.call_count)
+    self.assertEqual(2, process_command_mock.call_count)
     self.assertEqual(0, threading_mock.call_count)
     process_command_mock.assert_any_calls([call(self.datanode_install_command), call(self.hbase_install_command)])