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

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

commit 867b3b9d989e0c8e385fd35eabb245aff20527cb
Author: Andrew Onishuk <aonis...@hortonworks.com>
AuthorDate: Fri Apr 13 04:25:46 2018 +0300

    AMBARI-23536. Fix TestCustomServiceOrchestrator.py and TestRegistration.py 
on branch-3.0-perf (aonishuk)
---
 .../ambari_agent/TestCustomServiceOrchestrator.py  | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git 
a/ambari-agent/src/test/python/ambari_agent/TestCustomServiceOrchestrator.py 
b/ambari-agent/src/test/python/ambari_agent/TestCustomServiceOrchestrator.py
index badcb5f..f55cd7d 100644
--- a/ambari-agent/src/test/python/ambari_agent/TestCustomServiceOrchestrator.py
+++ b/ambari-agent/src/test/python/ambari_agent/TestCustomServiceOrchestrator.py
@@ -207,7 +207,10 @@ class TestCustomServiceOrchestrator(TestCase):
         'exitcode': 0,
       }
     ret = orchestrator.runCommand(command, "out.txt", "err.txt")
-    self.assertEqual(ret['exitcode'], 0)
+    try:
+      self.assertEqual(ret['exitcode'], 0)
+    except:
+      raise Exception(ret)
     self.assertTrue(run_file_mock.called)
     self.assertEqual(run_file_mock.call_count, 3)
 
@@ -330,8 +333,11 @@ class TestCustomServiceOrchestrator(TestCase):
     orchestrator.cancel_command(command['taskId'], 'reason')
 
     ret = async_result.get()
-
-    self.assertEqual(ret['exitcode'], 1)
+    
+    try:
+      self.assertEqual(ret['exitcode'], 1)
+    except:
+      raise Exception(ret)
     self.assertEquals(ret['stdout'], 'killed\nCommand aborted. Reason: 
\'reason\'')
     self.assertEquals(ret['stderr'], 'killed\nCommand aborted. Reason: 
\'reason\'')
 
@@ -466,7 +472,10 @@ class TestCustomServiceOrchestrator(TestCase):
       'exitcode': 0,
       }
     ret = orchestrator.runCommand(command, "out.txt", "err.txt")
-    self.assertEqual(ret['exitcode'], 0)
+    try:
+      self.assertEqual(ret['exitcode'], 0)
+    except:
+      raise Exception(ret)
     self.assertTrue(run_file_mock.called)
     # Hoooks are not supported for custom actions,
     # that's why run_file() should be called only once
@@ -570,7 +579,10 @@ class TestCustomServiceOrchestrator(TestCase):
     orchestrator.dump_command_to_json = MagicMock()
 
     ret = orchestrator.runCommand(command, "out.txt", "err.txt")
-    self.assertEqual(ret['exitcode'], 777)
+    try:
+      self.assertEqual(ret['exitcode'], 777)
+    except:
+      raise Exception(ret)
 
   def tearDown(self):
     # enable stdout

-- 
To stop receiving notification emails like this one, please contact
aonis...@apache.org.

Reply via email to