# under the License.
import re
-
-import eventlet
-eventlet.monkey_patch()
+import time
from oslo_config import cfg
from oslo_utils import importutils
if eligible_for_deletion(conf, ns, conf.force)]
if candidates:
- eventlet.sleep(2)
+ time.sleep(2)
for namespace in candidates:
destroy_namespace(conf, namespace, conf.force)
with mock.patch('neutron.agent.linux.ip_lib.IPWrapper') as ip_wrap:
ip_wrap.get_namespaces.return_value = namespaces
- with mock.patch('eventlet.sleep') as eventlet_sleep:
+ with mock.patch('time.sleep') as time_sleep:
conf = mock.Mock()
conf.force = False
methods_to_mock = dict(
ip_wrap.assert_has_calls(
[mock.call.get_namespaces(conf.AGENT.root_helper)])
- eventlet_sleep.assert_called_once_with(2)
+ time_sleep.assert_called_once_with(2)
def test_main_no_candidates(self):
namespaces = ['ns1', 'ns2']
with mock.patch('neutron.agent.linux.ip_lib.IPWrapper') as ip_wrap:
ip_wrap.get_namespaces.return_value = namespaces
- with mock.patch('eventlet.sleep') as eventlet_sleep:
+ with mock.patch('time.sleep') as time_sleep:
conf = mock.Mock()
conf.force = False
methods_to_mock = dict(
self.assertFalse(mocks['destroy_namespace'].called)
- self.assertFalse(eventlet_sleep.called)
+ self.assertFalse(time_sleep.called)