You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@slider.apache.org by sm...@apache.org on 2014/07/29 04:31:07 UTC

git commit: SLIDER-258. Jenkins build continue to hang on python unit tests

Repository: incubator-slider
Updated Branches:
  refs/heads/develop f90f4a3bf -> 3fecc58c9


SLIDER-258. Jenkins build continue to hang on python unit tests


Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/3fecc58c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/3fecc58c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/3fecc58c

Branch: refs/heads/develop
Commit: 3fecc58c941655d79ba38f875551e66af616bd39
Parents: f90f4a3
Author: Sumit Mohanty <sm...@hortonworks.com>
Authored: Mon Jul 28 19:22:09 2014 -0700
Committer: Sumit Mohanty <sm...@hortonworks.com>
Committed: Mon Jul 28 19:22:09 2014 -0700

----------------------------------------------------------------------
 slider-agent/src/test/python/agent/TestActionQueue.py           | 2 +-
 slider-agent/src/test/python/agent/TestController.py            | 5 +++--
 .../test/python/resource_management/TestDirectoryResource.py    | 2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/3fecc58c/slider-agent/src/test/python/agent/TestActionQueue.py
----------------------------------------------------------------------
diff --git a/slider-agent/src/test/python/agent/TestActionQueue.py b/slider-agent/src/test/python/agent/TestActionQueue.py
index b3a840c..21cc5dd 100644
--- a/slider-agent/src/test/python/agent/TestActionQueue.py
+++ b/slider-agent/src/test/python/agent/TestActionQueue.py
@@ -209,7 +209,7 @@ class TestActionQueue(TestCase):
   @patch("traceback.print_exc")
   @patch.object(ActionQueue, "execute_command")
   @patch.object(ActionQueue, "execute_status_command")
-  def test_process_command(self, execute_status_command_mock,
+  def test_process_command2(self, execute_status_command_mock,
                            execute_command_mock, print_exc_mock):
     dummy_controller = MagicMock()
     actionQueue = ActionQueue(AgentConfig("", ""), dummy_controller)

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/3fecc58c/slider-agent/src/test/python/agent/TestController.py
----------------------------------------------------------------------
diff --git a/slider-agent/src/test/python/agent/TestController.py b/slider-agent/src/test/python/agent/TestController.py
index 939e63f..af62c67 100644
--- a/slider-agent/src/test/python/agent/TestController.py
+++ b/slider-agent/src/test/python/agent/TestController.py
@@ -152,9 +152,9 @@ class TestController(unittest.TestCase):
 
   @patch("urllib2.build_opener")
   @patch("urllib2.install_opener")
-  @patch.object(ActionQueue.ActionQueue, "run")
+  @patch.object(ActionQueue.ActionQueue, "start")
   def test_repeatRegistration(self,
-                              run_mock, installMock, buildMock):
+                              start_mock, installMock, buildMock):
 
     registerAndHeartbeat = MagicMock(name="registerAndHeartbeat")
 
@@ -162,6 +162,7 @@ class TestController(unittest.TestCase):
     self.controller.run()
     self.assertTrue(installMock.called)
     self.assertTrue(buildMock.called)
+    self.assertTrue(start_mock.called)
     self.controller.registerAndHeartbeat.assert_called_once_with()
 
     calls = []

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/3fecc58c/slider-agent/src/test/python/resource_management/TestDirectoryResource.py
----------------------------------------------------------------------
diff --git a/slider-agent/src/test/python/resource_management/TestDirectoryResource.py b/slider-agent/src/test/python/resource_management/TestDirectoryResource.py
index 866486e..d9a262c 100644
--- a/slider-agent/src/test/python/resource_management/TestDirectoryResource.py
+++ b/slider-agent/src/test/python/resource_management/TestDirectoryResource.py
@@ -26,7 +26,7 @@ from resource_management.core import Environment, Fail
 from resource_management.core.resources import Directory
 
 @patch.object(System, "os_family", new = 'redhat')
-class TestFileResource(TestCase):
+class TestDirectoryResource(TestCase):
   
   @patch.object(os.path, "exists")
   @patch.object(os, "makedirs")