Merge "BigSwitch: Use eventlet.sleep in watchdog"

This commit is contained in:
Jenkins 2014-03-20 15:47:37 +00:00 committed by Gerrit Code Review
commit 28cfb4f15d
2 changed files with 2 additions and 3 deletions

View File

@ -37,7 +37,6 @@ import json
import os import os
import socket import socket
import ssl import ssl
import time
import eventlet import eventlet
from oslo.config import cfg from oslo.config import cfg
@ -556,7 +555,7 @@ class ServerPool(object):
# rest call and the consistency header will be added. If it # rest call and the consistency header will be added. If it
# doesn't match, the backend will return a synchronization error # doesn't match, the backend will return a synchronization error
# that will be handled by the rest_call. # that will be handled by the rest_call.
time.sleep(polling_interval) eventlet.sleep(polling_interval)
self.rest_call('GET', HEALTH_PATH) self.rest_call('GET', HEALTH_PATH)

View File

@ -58,7 +58,7 @@ class ServerManagerTests(test_rp.BigSwitchProxyPluginV2TestCase):
pl.servers.capabilities = [] pl.servers.capabilities = []
self.watch_p.stop() self.watch_p.stop()
with nested( with nested(
mock.patch('time.sleep'), mock.patch('eventlet.sleep'),
mock.patch( mock.patch(
SERVERMANAGER + '.ServerPool.rest_call', SERVERMANAGER + '.ServerPool.rest_call',
side_effect=servermanager.RemoteRestError( side_effect=servermanager.RemoteRestError(