Merge "Move eventlet to test-requirements. Remove greenlet."

This commit is contained in:
Jenkins 2016-03-25 00:23:08 +00:00 committed by Gerrit Code Review
commit 6dc190d478
3 changed files with 5 additions and 3 deletions

View File

@ -24,7 +24,6 @@ from ironic_lib import exception
from ironic_lib import utils
@mock.patch.object(eventlet.greenthread, 'sleep', lambda seconds: None)
class DiskPartitionerTestCase(test_base.BaseTestCase):
def test_add_partition(self):
@ -74,6 +73,7 @@ class DiskPartitionerTestCase(test_base.BaseTestCase):
mock_utils_exc.assert_called_once_with(
'fuser', '/dev/fake', run_as_root=True, check_exit_code=[0, 1])
@mock.patch.object(eventlet.greenthread, 'sleep', lambda seconds: None)
@mock.patch.object(disk_partitioner.DiskPartitioner, '_exec',
autospec=True)
@mock.patch.object(utils, 'execute', autospec=True)
@ -104,6 +104,7 @@ class DiskPartitionerTestCase(test_base.BaseTestCase):
'fuser', '/dev/fake', run_as_root=True, check_exit_code=[0, 1])
self.assertEqual(2, mock_utils_exc.call_count)
@mock.patch.object(eventlet.greenthread, 'sleep', lambda seconds: None)
@mock.patch.object(disk_partitioner.DiskPartitioner, '_exec',
autospec=True)
@mock.patch.object(utils, 'execute', autospec=True)
@ -133,6 +134,8 @@ class DiskPartitionerTestCase(test_base.BaseTestCase):
'fuser', '/dev/fake', run_as_root=True, check_exit_code=[0, 1])
self.assertEqual(20, mock_utils_exc.call_count)
# Mock the eventlet.greenthread.sleep for the looping_call
@mock.patch.object(eventlet.greenthread, 'sleep', lambda seconds: None)
@mock.patch.object(disk_partitioner.DiskPartitioner, '_exec',
autospec=True)
@mock.patch.object(utils, 'execute', autospec=True)

View File

@ -3,8 +3,6 @@
# process, which may cause wedges in the gate later.
pbr>=1.6 # Apache-2.0
eventlet!=0.18.3,>=0.18.2 # MIT
greenlet>=0.3.2 # MIT
oslo.concurrency>=3.5.0 # Apache-2.0
oslo.config>=3.7.0 # Apache-2.0
oslo.i18n>=2.1.0 # Apache-2.0

View File

@ -4,6 +4,7 @@
coverage>=3.6 # Apache-2.0
discover # BSD
eventlet!=0.18.3,>=0.18.2 # MIT
hacking<0.11,>=0.10.0
oslosphinx!=3.4.0,>=2.5.0 # Apache-2.0
oslotest>=1.10.0 # Apache-2.0