You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2018/04/16 10:00:02 UTC

[ambari] 05/06: Revert "AMBARI-23536. Fix TestCustomServiceOrchestrator.py and TestRegistration.py on branch-3.0-perf (aonishuk)"

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 e42b01af51c0816b91a7335e5c849b731fa71bd5
Author: Andrew Onishuk <ao...@hortonworks.com>
AuthorDate: Fri Apr 13 13:02:54 2018 +0300

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

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

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