From 79c12f5930ecdbacf33fabcba7dce1f4cb8f72ba Mon Sep 17 00:00:00 2001 From: Goutham Pacha Ravi Date: Tue, 12 Mar 2019 08:21:42 -0700 Subject: [PATCH] Bump timeout on sqlalchemy migration test As we add more migrations in the database, the time taken by the test increases. The test `manila.tests.db.migrations.alembic. test_migration.TestManilaMigrationsPostgreSQL.test_walk_versions` runs upgrades, downgrades and database checks for every migration. It has been timing out on numerous occasions because it can't run under 5 minutes. We feel the pinch of the timeouts because the test itself is run as part of multiple jobs (ex: unit test jobs on py2x, py3x, coverage, requirements/lower-constraints check) and can fail anywhere because it was running on a "slow" node. Change-Id: I1fdef6e907110681cb5ffb59f6f90f8eb67f118b Partial-Bug: #1793364 --- manila/tests/db/migrations/alembic/test_migration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manila/tests/db/migrations/alembic/test_migration.py b/manila/tests/db/migrations/alembic/test_migration.py index 1bffda7198..32aa0e3a2e 100644 --- a/manila/tests/db/migrations/alembic/test_migration.py +++ b/manila/tests/db/migrations/alembic/test_migration.py @@ -139,13 +139,13 @@ class ManilaMigrationsCheckers(test_migrations.WalkVersionsMixin, 'exception': e}) raise - # NOTE(vponomaryov): set 5 minutes timeout for case of running it on + # NOTE(vponomaryov): set 7 minutes timeout for case of running it on # very slow nodes/VMs. Note, that this test becomes slower with each # addition of new DB migration. On fast nodes it can take about 5-10 secs # having Mitaka set of migrations. # 'pymysql' works much slower on slow nodes than 'psycopg2'. And such # timeout mostly required for testing of 'mysql' backend. - @test_utils.set_timeout(300) + @test_utils.set_timeout(420) def test_walk_versions(self): """Walks all version scripts for each tested database.