summaryrefslogtreecommitdiff
path: root/tox.ini
diff options
context:
space:
mode:
authorBalazs Gibizer <balazs.gibizer@est.tech>2020-12-18 13:42:34 +0100
committerBalazs Gibizer <balazs.gibizer@est.tech>2020-12-18 13:42:34 +0100
commit800254c0bc1dff5e4d41fb9739c3498d15d81791 (patch)
tree01fb442f76bbd6c4a21c31c94eca9d5ca4659b4e /tox.ini
parent5d910b6695fc67517b6fe08194ed2754a182f9a9 (diff)
downloadnova-800254c0bc1dff5e4d41fb9739c3498d15d81791.tar.gz
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
Diffstat (limited to 'tox.ini')
-rw-r--r--tox.ini14
1 files changed, 12 insertions, 2 deletions
diff --git a/tox.ini b/tox.ini
index 7570260469..05293e8f13 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]