Unit test 'test_walk_versions' in
'manila.tests.db.migrations.alembic.test_migration' module
takes abnormally very long time sometimes.
In common cases it takes about 5-10 seconds in CI for Mitaka set of
DB migrations.
In CI runs when this test fails, 'postgres' variant takes
about 47 seconds and mysql reaches common test timeout of 60 seconds.
Note, that this test becomes slower with each
addition of new DB migration. Also, 'pymysql' works much slower
on slow nodes than 'psycopg2'.
So, add new test decorator that sets individual test timeout.
And make it be 5 minutes for mentioned test. In worst case of Mitaka
DB migrations set it can take about 2 minutes, but make it bigger
to have a margin for future releases.
Reviewed: https:/ /review. openstack. org/291397 /git.openstack. org/cgit/ openstack/ manila/ commit/ ?id=37c6e3179f9 6c6cd22b357030e ee7a4218f3becd
Committed: https:/
Submitter: Jenkins
Branch: master
commit 37c6e3179f96c6c d22b357030eee7a 4218f3becd
Author: Valeriy Ponomaryov <email address hidden>
Date: Thu Mar 10 21:56:31 2016 +0200
Fix unstable DB migration tests
Unit test 'test_walk_ versions' in tests.db. migrations. alembic. test_migration' module
'manila.
takes abnormally very long time sometimes.
In common cases it takes about 5-10 seconds in CI for Mitaka set of
DB migrations.
In CI runs when this test fails, 'postgres' variant takes
about 47 seconds and mysql reaches common test timeout of 60 seconds.
Note, that this test becomes slower with each
addition of new DB migration. Also, 'pymysql' works much slower
on slow nodes than 'psycopg2'.
So, add new test decorator that sets individual test timeout.
And make it be 5 minutes for mentioned test. In worst case of Mitaka
DB migrations set it can take about 2 minutes, but make it bigger
to have a margin for future releases.
Change-Id: I233f96f29fe622 31c2e7013b74c06 396dd923f27
Closes-Bug: #1501272