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/22 11:17:24 UTC

[29/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/a4e7bf37
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a4e7bf37
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a4e7bf37

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: a4e7bf379dc2392253bd9bad3ab42ab9c2d9552e
Parents: 2b917f4
Author: Attila Doroszlai <ad...@hortonworks.com>
Authored: Wed Nov 15 12:56:23 2017 +0100
Committer: Attila Doroszlai <ad...@hortonworks.com>
Committed: Wed Nov 15 12:56:23 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/a4e7bf37/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)