Reduce stestr concurrency to 1 for tempest jobs

The switch from testr to stestr introduced in Change-Id
Icf1f9eb4539666dffb6c9c1651670541523a9f9e missed setting concurrency
jobs to 1 for api and scenario tests, leading to intermittent gate
issues.

This patch also fixes coverage test that got broken in the
aforementioned Change-Id.

Change-Id: I052a9c3b376624f8e9e63faa98f4d09a93bdde4d
This commit is contained in:
Carlos Goncalves 2018-03-11 18:57:07 +01:00
parent 69e092d06d
commit f27c44c478
3 changed files with 13 additions and 9 deletions

View File

@ -93,11 +93,6 @@ class ListenersTestJSON(base.BaseAdminTestCase):
a missing tenant_id creates the listener with admin
tenant_id.
"""
# TODO(rm_work): Figure out why this test breaks intermittently with
# the namespace driver, sometimes on either of py27 or py35
self.skipTest(
"This is breaking intermittently, and should be fixed, but will "
"be skipped until other gate issues are resolved.")
create_new_listener_kwargs = self.create_listener_kwargs
create_new_listener_kwargs['protocol_port'] = 8081
admin_listener = self._create_listener(

View File

@ -588,7 +588,6 @@ class BaseTestCase(manager.NetworkScenarioTest):
Check that the requests are not sent to any servers
Assert that no traffic is sent to any servers
"""
time.sleep(10) # Allow some time for the namespace service to restart
counters = self._send_requests(self.vip_ip, ["server1", "server2"])
for member, counter in counters.items():
self.assertEqual(counter, 0, 'Member %s is balanced' % member)

16
tox.ini
View File

@ -30,8 +30,12 @@ commands =
whitelist_externals = sh
[testenv:cover]
setenv =
{[testenv]setenv}
PYTHON=coverage run --source neutron_lbaas --parallel-mode
commands =
stestr run {posargs}
coverage combine
coverage report
[testenv:venv]
@ -89,7 +93,9 @@ commands =
passenv = TEMPEST_CONFIG_DIR
setenv =
OS_TEST_PATH={toxinidir}/neutron_lbaas/tests/tempest/v2/api
OS_TESTR_CONCURRENCY=1
commands =
stestr run --concurrency 1 {posargs}
stestr slowest
# If you are running the tests locally you should set the env variable
# TEMPEST_CONFIG_DIR=/opt/stack/tempest/etc
@ -97,7 +103,9 @@ setenv =
passenv = TEMPEST_CONFIG_DIR
setenv =
OS_TEST_PATH={toxinidir}/neutron_lbaas/tests/tempest/v2/scenario
OS_TESTR_CONCURRENCY=1
commands =
stestr run --concurrency 1 {posargs}
stestr slowest
# If you are running the tests locally you should set the env variable
# TEMPEST_CONFIG_DIR=/opt/stack/tempest/etc
@ -105,7 +113,9 @@ setenv =
passenv = TEMPEST_CONFIG_DIR
setenv =
OS_TEST_PATH={toxinidir}/neutron_lbaas/tests/tempest/v2/ddt
OS_TESTR_CONCURRENCY=1
commands =
stestr run --concurrency 1 {posargs}
stestr slowest
[testenv:genconfig]
commands = {toxinidir}/tools/generate_config_file_samples.sh