ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject ambari git commit: AMBARI-20776 test_kill_process_with_children and test_facterMemInfoOutput test fails (dsen)
Date Wed, 26 Apr 2017 14:54:48 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 8ce04c679 -> eb154aaa7


AMBARI-20776 test_kill_process_with_children and test_facterMemInfoOutput test fails (dsen)


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

Branch: refs/heads/branch-2.5
Commit: eb154aaa77daa391d04920efbc97337943aa0aa6
Parents: 8ce04c6
Author: Dmytro Sen <dsen@apache.org>
Authored: Wed Apr 26 17:52:29 2017 +0300
Committer: Dmytro Sen <dsen@apache.org>
Committed: Wed Apr 26 17:54:42 2017 +0300

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


http://git-wip-us.apache.org/repos/asf/ambari/blob/eb154aaa/ambari-agent/src/test/python/ambari_agent/TestHardware.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/test/python/ambari_agent/TestHardware.py b/ambari-agent/src/test/python/ambari_agent/TestHardware.py
index d30020c..5400e26 100644
--- a/ambari-agent/src/test/python/ambari_agent/TestHardware.py
+++ b/ambari-agent/src/test/python/ambari_agent/TestHardware.py
@@ -226,8 +226,10 @@ class TestHardware(TestCase):
   @patch.object(FacterLinux, "setMemInfoOutput")
   @patch.object(OSCheck, "get_os_type")
   @patch.object(OSCheck, "get_os_version")
-  def test_facterMemInfoOutput(self, get_os_version_mock, get_os_type_mock, facter_setMemInfoOutput_mock):
+  @patch.object(FacterLinux, "getSystemResourceOverrides")
+  def test_facterMemInfoOutput(self, getSystemResourceOverridesMock, get_os_version_mock,
get_os_type_mock, facter_setMemInfoOutput_mock):
 
+    getSystemResourceOverridesMock.return_value = {}
     facter_setMemInfoOutput_mock.return_value = '''
 MemTotal:        1832392 kB
 MemFree:          868648 kB

http://git-wip-us.apache.org/repos/asf/ambari/blob/eb154aaa/ambari-agent/src/test/python/ambari_agent/TestShell.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/test/python/ambari_agent/TestShell.py b/ambari-agent/src/test/python/ambari_agent/TestShell.py
index 8d375e3..c6bfa01 100644
--- a/ambari-agent/src/test/python/ambari_agent/TestShell.py
+++ b/ambari-agent/src/test/python/ambari_agent/TestShell.py
@@ -65,7 +65,7 @@ class TestShell(unittest.TestCase):
       test_process = subprocess.Popen(test_cmd, stderr=subprocess.PIPE, stdout=subprocess.PIPE,
shell=True)
       time.sleep(0.3) # Delay to allow subprocess to start
       # Check if processes are running
-      ps_cmd = """ps aux """
+      ps_cmd = """ps auxww """
       ps_process = subprocess.Popen(ps_cmd, stderr=subprocess.PIPE, stdout=subprocess.PIPE,
shell=True)
       (out, err) = ps_process.communicate()
       self.assertTrue(sleep_cmd in out)


Mime
View raw message