This test invokes Cinder WSGIService.Service() and asserts
against values that are only manipulated in wsgi.Server(),
which WSGIService is based on.
We also have TestWSGIServer.test_reset_pool_size_to_default
which does the same thing for wsgi.Server().
Remove this test since it duplicates the TestWSGIServer test
and tests code which is an additional layer of abstraction
(cinder.WSGIService) away from the class that the code belongs
to (wsgi.Server).
Change-Id: I68d6f479da26e75618bfa773c84273501926ab07
self.assertNotEqual(0, test_service.port)
test_service.stop()
- def test_reset_pool_size_to_default(self):
- test_service = service.WSGIService("test_service")
- test_service.start()
-
- # Stopping the service, which in turn sets pool size to 0
- test_service.stop()
- self.assertEqual(test_service.server._pool.size, 0)
-
- # Resetting pool size to default
- test_service.reset()
- test_service.start()
- self.assertEqual(test_service.server._pool.size,
- 1000)
-
@mock.patch('cinder.wsgi.Server')
def test_workers_set_default(self, wsgi_server):
test_service = service.WSGIService("osapi_volume")