]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Tests: Remove TestWSGIService.test_reset_pool_size_to_default
authorEric Harney <eharney@redhat.com>
Fri, 13 Feb 2015 17:11:34 +0000 (12:11 -0500)
committerEric Harney <eharney@redhat.com>
Fri, 13 Feb 2015 17:43:01 +0000 (12:43 -0500)
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

cinder/tests/test_service.py

index 2b9759da4b9293e8016bdb687cb634e02de0a2fb..56ea90e159216dbf9ca43f76b5aa2bdd860a463e 100644 (file)
@@ -220,20 +220,6 @@ class TestWSGIService(test.TestCase):
         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")