Run the db migration tests in the same test worker

In a heavily IO deprived CI VM the db migration tests could take a
significant amount of time and eventually time out. This patch moves the
tests into the same test executor worker process to spread the load
generated by these test in time until a final solution is found. For
example we hope that [1] will help eventually to decrease the load.

[1] https://review.opendev.org/q/topic:bp/compact-db-migrations-wallaby

Change-Id: I6ce930fa86c82da1008089791942b1fff7d04c18
Related-Bug: #1823251
This commit is contained in:
Balazs Gibizer 2020-12-18 13:42:34 +01:00
parent 5d910b6695
commit 800254c0bc
1 changed files with 12 additions and 2 deletions

14
tox.ini
View File

@ -32,7 +32,11 @@ passenv =
# there is also secret magic in subunit-trace which lets you run in a fail only
# mode. To do this define the TRACE_FAILONLY environmental variable.
commands =
stestr run {posargs}
# NOTE(gibi): The group-regex runs the matching tests in the same executor.
# These tests runs against a real mysql instance and in an IO deprived CI VM they tend to time out.
# See bug https://launchpad.net/bugs/1823251 for details.
# By running them in the same executor we can spread the IO load of these tests in time.
stestr --group-regex=nova\.tests\.unit\.db\.test_migrations\.TestNovaMigrationsMySQL run {posargs}
env TEST_OSPROFILER=1 stestr run --combine --no-discover 'nova.tests.unit.test_profiler'
stestr slowest
@ -84,7 +88,13 @@ deps =
{[testenv]deps}
openstack-placement>=1.0.0
commands =
stestr --test-path=./nova/tests/functional run {posargs}
# NOTE(gibi): The group-regex runs the matching tests in the same executor.
# These tests runs against a real db instance and in an IO deprived CI VM they tend to time out.
# See bug https://launchpad.net/bugs/1823251 for details.
# By running them in the same executor we can spread the IO load of these tests in time.
# NOTE(gibi): I was not able to group only the mysql tests this way as regex
# TestNovaAPIMigrations.*MySQL does not do what I expect
stestr --group-regex=nova\.tests\.functional\.db\.api\.test_migrations\.TestNovaAPIMigrations --test-path=./nova/tests/functional run {posargs}
stestr slowest
[testenv:functional-py36]