Changes the consistency watchdog that runs
in the background to use eventlet.sleep instead
of time.sleep to avoid blocking other members of
the same pool.
Closes-Bug: #
1291695
Change-Id: I5ec842cca1063cef761c2cd09d63617baf27d191
import os
import socket
import ssl
-import time
import eventlet
from oslo.config import cfg
# rest call and the consistency header will be added. If it
# doesn't match, the backend will return a synchronization error
# that will be handled by the rest_call.
- time.sleep(polling_interval)
+ eventlet.sleep(polling_interval)
self.rest_call('GET', HEALTH_PATH)
pl.servers.capabilities = []
self.watch_p.stop()
with nested(
- mock.patch('time.sleep'),
+ mock.patch('eventlet.sleep'),
mock.patch(
SERVERMANAGER + '.ServerPool.rest_call',
side_effect=servermanager.RemoteRestError(