Set wsgi.keep_alive=False globally for tests

This was previously set for all functional API samples
tests to try and fix a weird issue where requests and responses
seemed to get mixed up between the compute API wsgi service
fixture used in the API samples functional tests and the
Placement API functional tests.

However, we're also seeing these weird mixup issues in
non-API samples tests, and there are other wsgi server fixtures
that should be setting this, like the OSMetadataServer
fixture. And there are functional tests that don't inherit from
_IntegratedTestBase so we should just set this globally to be
safe.

Related-Bug: #1686109
Related-Bug: #1696834

Change-Id: Ie307e4d43be4b3e40dd75384ea6bb77598811713
This commit is contained in:
Matt Riedemann
2017-07-14 11:40:13 -04:00
parent 57360fb72a
commit d812c7eb3c
2 changed files with 5 additions and 1 deletions

View File

@@ -74,7 +74,6 @@ class _IntegratedTestBase(test.TestCase):
# TODO(mriedem): Fix the functional tests to work with Neutron.
self.flags(use_neutron=self.USE_NEUTRON)
self.flags(keep_alive=False, group="wsgi")
nova.tests.unit.image.fake.stub_out_image_service(self)
self._setup_services()

View File

@@ -74,6 +74,11 @@ class ConfFixture(config_fixture.Config):
self.conf.set_default('api_paste_config',
paths.state_path_def('etc/nova/api-paste.ini'),
group='wsgi')
# The functional tests run wsgi API services using fixtures and
# eventlet and we want one connection per request so things don't
# leak between requests from separate services in concurrently running
# tests.
self.conf.set_default('keep_alive', False, group="wsgi")
# placement group
self.conf.set_default('os_region_name', 'RegionOne',