fix test nit

although 2G of ram is rare, but test should not
break if vm got that small ram.

Change-Id: Ic3efbe0767abca9c7ac25b58a7fb2af97e210d45
This commit is contained in:
ushen 2019-08-03 19:32:11 +08:00
parent 86feb7916b
commit 3781825edf
1 changed files with 2 additions and 1 deletions

View File

@ -62,7 +62,8 @@ class TestRunRpcWorkers(base.BaseTestCase):
self._test_rpc_workers(0, 1)
def test_rpc_workers_default_api_workers_default(self):
self._test_rpc_workers(None, int(self.worker_count / 2))
workers = max(int(self.worker_count / 2), 1)
self._test_rpc_workers(None, workers)
def test_rpc_workers_default_api_workers_set(self):
cfg.CONF.set_override('api_workers', 18)