Repository: ambari Updated Branches: refs/heads/trunk ad88bd14f -> 78fc98468
AMBARI-5357. Hive service check tests try to access external host and slow down test runs (dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/78fc9846 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/78fc9846 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/78fc9846 Branch: refs/heads/trunk Commit: 78fc98468e53bc99ded9faf0794106fa1da8d31c Parents: ad88bd1 Author: Lisnichenko Dmitro <dlysniche...@hortonworks.com> Authored: Fri Apr 4 21:16:37 2014 +0300 Committer: Lisnichenko Dmitro <dlysniche...@hortonworks.com> Committed: Fri Apr 4 21:17:21 2014 +0300 ---------------------------------------------------------------------- .../src/test/python/stacks/1.3.2/HIVE/test_hive_service_check.py | 3 ++- .../src/test/python/stacks/2.0.6/HIVE/test_hive_service_check.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/78fc9846/ambari-server/src/test/python/stacks/1.3.2/HIVE/test_hive_service_check.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/1.3.2/HIVE/test_hive_service_check.py b/ambari-server/src/test/python/stacks/1.3.2/HIVE/test_hive_service_check.py index 237be7a..bd2388b 100644 --- a/ambari-server/src/test/python/stacks/1.3.2/HIVE/test_hive_service_check.py +++ b/ambari-server/src/test/python/stacks/1.3.2/HIVE/test_hive_service_check.py @@ -19,9 +19,10 @@ limitations under the License. ''' from mock.mock import MagicMock, call, patch from stacks.utils.RMFTestCase import * -import datetime +import datetime, socket import resource_management.libraries.functions @patch.object(resource_management.libraries.functions, "get_unique_id_and_date", new = MagicMock(return_value='')) +@patch("socket.socket", new = MagicMock()) class TestServiceCheck(RMFTestCase): @patch("sys.exit") http://git-wip-us.apache.org/repos/asf/ambari/blob/78fc9846/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_service_check.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_service_check.py b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_service_check.py index 7eb5810..00c24d4 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_service_check.py +++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_service_check.py @@ -19,9 +19,10 @@ limitations under the License. ''' from mock.mock import MagicMock, call, patch from stacks.utils.RMFTestCase import * -import datetime, sys +import datetime, sys, socket import resource_management.libraries.functions @patch.object(resource_management.libraries.functions, "get_unique_id_and_date", new = MagicMock(return_value='')) +@patch("socket.socket", new = MagicMock()) class TestServiceCheck(RMFTestCase): @patch("sys.exit")