Browse Source

AMBARI-5357. Hive service check tests try to access external host and slow down test runs (dlysnichenko)

Lisnichenko Dmitro 11 years ago
parent
commit
78fc98468e

+ 2 - 1
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")

+ 2 - 1
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")