You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ds...@apache.org on 2017/04/26 14:52:35 UTC

ambari git commit: AMBARI-20776 test_kill_process_with_children and test_facterMemInfoOutput test fails (dsen)

Repository: ambari
Updated Branches:
  refs/heads/trunk 6bd1addfb -> e759b7889


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

Branch: refs/heads/trunk
Commit: e759b788992631796eec5414049d014e6c70400b
Parents: 6bd1add
Author: Dmytro Sen <ds...@apache.org>
Authored: Wed Apr 26 17:52:29 2017 +0300
Committer: Dmytro Sen <ds...@apache.org>
Committed: Wed Apr 26 17:52:29 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/e759b788/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/e759b788/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 5dc1899..47923bd 100644
--- a/ambari-agent/src/test/python/ambari_agent/TestShell.py
+++ b/ambari-agent/src/test/python/ambari_agent/TestShell.py
@@ -63,7 +63,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)