From 800254c0bc1dff5e4d41fb9739c3498d15d81791 Mon Sep 17 00:00:00 2001 From: Balazs Gibizer Date: Fri, 18 Dec 2020 13:42:34 +0100 Subject: [PATCH] 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 --- tox.ini | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 75702604697d..05293e8f1359 100644 --- a/tox.ini +++ b/tox.ini @@ -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]