diff --git a/nova/tests/unit/db/api/test_migrations.py b/nova/tests/unit/db/api/test_migrations.py index f714cf1852de..5b25755c7694 100644 --- a/nova/tests/unit/db/api/test_migrations.py +++ b/nova/tests/unit/db/api/test_migrations.py @@ -41,6 +41,10 @@ LOG = logging.getLogger(__name__) class NovaModelsMigrationsSync(test_migrations.ModelsMigrationsSync): """Test that the models match the database after migrations are run.""" + # Migrations can take a long time, particularly on underpowered CI nodes. + # Give them some breathing room. + TIMEOUT_SCALING_FACTOR = 4 + def setUp(self): super().setUp() self.engine = enginefacade.writer.get_engine() @@ -185,6 +189,10 @@ class NovaMigrationsWalk( test_fixtures.OpportunisticDBTestMixin, test.NoDBTestCase, ): + # Migrations can take a long time, particularly on underpowered CI nodes. + # Give them some breathing room. + TIMEOUT_SCALING_FACTOR = 4 + def setUp(self): super().setUp() self.engine = enginefacade.writer.get_engine() diff --git a/nova/tests/unit/db/main/test_migrations.py b/nova/tests/unit/db/main/test_migrations.py index c0da4cc66ae5..627b3fdc75e5 100644 --- a/nova/tests/unit/db/main/test_migrations.py +++ b/nova/tests/unit/db/main/test_migrations.py @@ -49,6 +49,10 @@ LOG = logging.getLogger(__name__) class NovaModelsMigrationsSync(test_migrations.ModelsMigrationsSync): """Test sqlalchemy-migrate migrations.""" + # Migrations can take a long time, particularly on underpowered CI nodes. + # Give them some breathing room. + TIMEOUT_SCALING_FACTOR = 4 + def setUp(self): # Ensure BaseTestCase's ConfigureLogging fixture is disabled since # we're using our own (StandardLogging). @@ -197,6 +201,10 @@ class NovaMigrationsWalk( test_fixtures.OpportunisticDBTestMixin, test.NoDBTestCase, ): + # Migrations can take a long time, particularly on underpowered CI nodes. + # Give them some breathing room. + TIMEOUT_SCALING_FACTOR = 4 + def setUp(self): super().setUp() self.engine = enginefacade.writer.get_engine()