OpenStack Task Tracking API
Go to file
Adam Coldrick 6cdc6f4bfb Use one database per test class rather than per test
When running the test suite using MySQL, a lot of time is spent
creating the database, running the migrations, and then dropping
the database when the test finishes. Obviously we need a clean
database at the start of each test, but that doesn't mean we need
to run the migrations every single time.

Setting parallel_class to True in .stestr.conf makes all the tests
in a given class run in the same subprocess, whilst retaining
parallelisation when there is more than one test class discovered.

This commit moves the setup and cleanup of the database to the class
level rather than the test level, so that the slow migration step only
runs once per test class, rather than once per test. Cleaning the
database between tests is done by deleting everything from the tables
(excepting the tables that are populated by the migrations themselves),
and resetting any autoincrement counters.

This reduces the runtime of the individual tests by an order of
magnitude locally, from about 10 seconds per test to about 1 second per
test with this patch applied. There is still some overhead for each
class, but I can now run the test suite in about 15 minutes with MySQL
on my machine, as opposed to over an hour previously.

Change-Id: I1f38a3c4bf88cba8abfaa3f7d39d1403be6952b7
2019-03-18 15:24:05 +00:00
doc Merge "Update docs on how to run the tests locally" 2019-03-04 21:41:53 +00:00
etc Use charset=utf8mb4 in pymysql DBURIs 2018-03-28 21:25:11 +00:00
storyboard Use one database per test class rather than per test 2019-03-18 15:24:05 +00:00
tools Merge "Add a test openid server" 2018-08-28 20:31:16 +00:00
.coveragerc remove final vestiges of incubated oslo code 2016-11-07 13:31:55 -05:00
.gitignore Remove vagrant setup 2018-01-10 00:30:08 +00:00
.gitreview Add .gitreview file. 2013-07-18 12:03:46 +02:00
.stestr.conf Use one database per test class rather than per test 2019-03-18 15:24:05 +00:00
.zuul.yaml Pin tox-py35 jobs to ubuntu-xenial 2019-03-14 13:02:44 +00:00
CONTRIBUTING.rst Replace broken links and http links in the doc 2018-06-30 00:04:59 +02:00
LICENSE Initial import 2013-07-01 18:09:56 +02:00 Introducing basic REST API 2014-01-22 11:37:54 -08:00
README.rst Replace broken links and http links in the doc 2018-06-30 00:04:59 +02:00
babel.cfg Add SQLalchemy database model 2014-01-13 18:52:47 +04:00
bindep.txt bindep: Require libffi-devel 2016-11-14 07:19:17 +01:00
requirements.txt Remove upper limit on PyMySQL version 2019-01-26 12:15:58 +00:00
setup.cfg Change openstack-dev to openstack-discuss 2018-12-04 15:52:17 +00:00 Use a common requirements file 2016-07-08 09:06:10 -07:00
test-requirements.txt Switch to using stestr for tests 2018-10-17 14:24:24 -05:00
tox.ini Merge "Use python3 for basepython in tox.ini" 2019-02-21 02:30:19 +00:00



Storyboard is a task tracker created to serve the needs of highly-distributed systems that span multiple projects, to enable cross-project work on a massive scale. Concepts were adapted from existing tools, and as many potential points of contention were removed as possible, to better facilitate coordination of project work by stakeholders with widely varied interests and needs.

Project Resources

Project status, bugs, and blueprints are tracked at:

Source code can be found at:

Documentation can be found here:

Additional resources are linked from the project wiki page:

Anyone wishing to contribute to an OpenStack project should find plenty of helpful resources here:

All OpenStack projects use Gerrit for code reviews. A good reference for that is here: