fix override_pool_size
related to Id3af696193af2ccf5e5f3a1ae1d22f4f80860606. we need to make override_pool_size accessible for external use. Change-Id: I686c8c341f117dbc0b02443306395d5fd011c2f1
This commit is contained in:
parent
f42ff2efa5
commit
1bca96ff78
@ -29,7 +29,7 @@ class ExecutorBase(object):
|
||||
self.dispatcher = dispatcher
|
||||
|
||||
@abc.abstractmethod
|
||||
def start(self):
|
||||
def start(self, override_pool_size=None):
|
||||
"""Start polling for incoming messages."""
|
||||
|
||||
@abc.abstractmethod
|
||||
|
@ -330,7 +330,7 @@ class MessageHandlingServer(service.ServiceBase, _OrderedTaskRunner):
|
||||
super(MessageHandlingServer, self).__init__()
|
||||
|
||||
@ordered(reset_after='stop')
|
||||
def start(self):
|
||||
def start(self, override_pool_size=None):
|
||||
"""Start handling incoming messages.
|
||||
|
||||
This method causes the server to begin polling the transport for
|
||||
@ -358,7 +358,7 @@ class MessageHandlingServer(service.ServiceBase, _OrderedTaskRunner):
|
||||
except driver_base.TransportDriverError as ex:
|
||||
raise ServerListenError(self.target, ex)
|
||||
executor = self._executor_cls(self.conf, listener, self.dispatcher)
|
||||
executor.start()
|
||||
executor.start(override_pool_size=override_pool_size)
|
||||
self._executor_obj = executor
|
||||
|
||||
if self.executor == 'blocking':
|
||||
|
@ -553,7 +553,10 @@ class TestServerLocking(test_utils.BaseTestCase):
|
||||
self.listener = mock.MagicMock()
|
||||
executors.append(self)
|
||||
|
||||
start = _logmethod('start')
|
||||
def start(self, override_pool_size=None):
|
||||
with self._lock:
|
||||
self._calls.append('start')
|
||||
|
||||
stop = _logmethod('stop')
|
||||
wait = _logmethod('wait')
|
||||
execute = _logmethod('execute')
|
||||
@ -611,7 +614,7 @@ class TestServerLocking(test_utils.BaseTestCase):
|
||||
runner = [None]
|
||||
|
||||
class SteppingFakeExecutor(self.server._executor_cls):
|
||||
def start(self):
|
||||
def start(self, override_pool_size=None):
|
||||
# Tell the test which thread won the race
|
||||
runner[0] = eventlet.getcurrent()
|
||||
running_event.set()
|
||||
|
Loading…
Reference in New Issue
Block a user