Repository: ambari
Updated Branches:
  refs/heads/trunk 5c48015d6 -> 0eb3937c2


AMBARI-7401. Ambari Unit Tests failing on Jenkins.(vbrodetskyi)


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

Branch: refs/heads/trunk
Commit: 0eb3937c208ac650725059356ec909effc367534
Parents: 5c48015
Author: Vitaly Brodetskyi <vbrodets...@hortonworks.com>
Authored: Fri Sep 19 13:41:24 2014 +0300
Committer: Vitaly Brodetskyi <vbrodets...@hortonworks.com>
Committed: Fri Sep 19 13:41:24 2014 +0300

----------------------------------------------------------------------
 ambari-agent/src/test/python/ambari_agent/TestController.py      | 4 ++--
 .../test/python/ambari_agent/TestCustomServiceOrchestrator.py    | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/0eb3937c/ambari-agent/src/test/python/ambari_agent/TestController.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/test/python/ambari_agent/TestController.py 
b/ambari-agent/src/test/python/ambari_agent/TestController.py
index ad8303f..7ef64cc 100644
--- a/ambari-agent/src/test/python/ambari_agent/TestController.py
+++ b/ambari-agent/src/test/python/ambari_agent/TestController.py
@@ -364,7 +364,7 @@ class TestController(unittest.TestCase):
       self.fail("Should throw exception!")
     except IOError, e: # Expected
       self.assertEquals('Response parsing failed! Request data: ' + data +
-                        '; Response: {invalid_object}', e.message)
+                        '; Response: {invalid_object}', str(e))
 
     exceptionMessage = "Connection Refused"
     conMock.request.side_effect = Exception(exceptionMessage)
@@ -373,7 +373,7 @@ class TestController(unittest.TestCase):
       self.fail("Should throw exception!")
     except IOError, e: # Expected
       self.assertEquals('Request to ' + url + ' failed due to ' +
-                        exceptionMessage, e.message)
+                        exceptionMessage, str(e))
 
 
   @patch.object(threading._Event, "wait")

http://git-wip-us.apache.org/repos/asf/ambari/blob/0eb3937c/ambari-agent/src/test/python/ambari_agent/TestCustomServiceOrchestrator.py
----------------------------------------------------------------------
diff --git 
a/ambari-agent/src/test/python/ambari_agent/TestCustomServiceOrchestrator.py 
b/ambari-agent/src/test/python/ambari_agent/TestCustomServiceOrchestrator.py
index 92791e2..6a61c0d 100644
--- a/ambari-agent/src/test/python/ambari_agent/TestCustomServiceOrchestrator.py
+++ b/ambari-agent/src/test/python/ambari_agent/TestCustomServiceOrchestrator.py
@@ -486,7 +486,8 @@ class TestCustomServiceOrchestrator(TestCase):
       'taskId' : '13',
       'roleCommand': 'ACTIONEXECUTE',
       'commandType': 'BACKGROUND_EXECUTION_COMMAND',
-      '__handle' : BackgroundCommandExecutionHandle(None,13,MagicMock(), 
MagicMock())
+      '__handle': BackgroundCommandExecutionHandle({'taskId': '13'}, 13,
+                                                   MagicMock(), MagicMock())
     }
     dummy_controller = MagicMock()
     orchestrator = CustomServiceOrchestrator(self.config, dummy_controller)

Reply via email to