You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by am...@apache.org on 2017/11/16 15:37:02 UTC

[39/50] [abbrv] ambari git commit: AMBARI-22398. Upstart is not able to stop the ambari-agent - fix unit test

AMBARI-22398. Upstart is not able to stop the ambari-agent - fix unit test


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

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: 5e0700b51d89fc3ed5fee44013b40b336d78f995
Parents: 38f441d
Author: Attila Doroszlai <ad...@hortonworks.com>
Authored: Wed Nov 15 12:56:23 2017 +0100
Committer: Attila Magyar <am...@hortonworks.com>
Committed: Thu Nov 16 16:35:30 2017 +0100

----------------------------------------------------------------------
 ambari-agent/src/test/python/ambari_agent/TestAmbariAgent.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/5e0700b5/ambari-agent/src/test/python/ambari_agent/TestAmbariAgent.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/test/python/ambari_agent/TestAmbariAgent.py b/ambari-agent/src/test/python/ambari_agent/TestAmbariAgent.py
index 8ff192a..56a73fc 100644
--- a/ambari-agent/src/test/python/ambari_agent/TestAmbariAgent.py
+++ b/ambari-agent/src/test/python/ambari_agent/TestAmbariAgent.py
@@ -35,8 +35,7 @@ class TestAmbariAgent(unittest.TestCase):
   @patch("os.path.isfile")
   @patch("os.remove")
   @patch("os.killpg")
-  @patch("os.setpgrp")
-  def test_main(self, os_setpgrp_mock, os_killpg_mock, os_remove_mock,
+  def test_main(self, os_killpg_mock, os_remove_mock,
                 os_path_isfile_mock, subprocess_popen_mock):
     facter1 = MagicMock()
     facter2 = MagicMock()
@@ -49,7 +48,6 @@ class TestAmbariAgent(unittest.TestCase):
     sys.argv[0] = "test data"
     AmbariAgent.main()
 
-    self.assertTrue(os_setpgrp_mock.called)
     self.assertTrue(subprocess_popen_mock.called)
     self.assertTrue(subprocess_popen_mock.call_count == 2)
     self.assertTrue(facter1.communicate.called)