CI: Change migrations timeout to be >60 seoncds
In local testing, I found the migrations tended to take an average of 70 seconds. Granted, my test machine is old, and slow but the performance is very similar to a busy cloud provider. As such, increase the timeout to a larger value so we can enable the double migration test again. Also use BASE_TEST_TIMEOUT as time limit for unit tests, failing hard if that's passed. Change-Id: Ida495d59bde977a20590c34e282c884a65ceab43
This commit is contained in:

committed by
Riccardo Pittau

parent
76a920aed2
commit
bc7771bf35
@@ -72,6 +72,9 @@ def _patch_mock_callable(obj):
|
||||
return False
|
||||
|
||||
|
||||
BASE_TEST_TIMEOUT = os.environ.get('BASE_TEST_TIMEOUT', 60)
|
||||
|
||||
|
||||
class WarningsFixture(fixtures.Fixture):
|
||||
"""Filters out warnings during test runs."""
|
||||
|
||||
@@ -190,6 +193,9 @@ class TestCase(oslo_test_base.BaseTestCase):
|
||||
self.policy = self.useFixture(policy_fixture.PolicyFixture())
|
||||
self.useFixture(WarningsFixture())
|
||||
|
||||
self.useFixture(fixtures.Timeout(int(BASE_TEST_TIMEOUT),
|
||||
gentle=False))
|
||||
|
||||
driver_factory.HardwareTypesFactory._extension_manager = None
|
||||
for factory in driver_factory._INTERFACE_LOADERS.values():
|
||||
factory._extension_manager = None
|
||||
|
4
tox.ini
4
tox.ini
@@ -10,11 +10,11 @@ setenv = VIRTUAL_ENV={envdir}
|
||||
PYTHONDONTWRITEBYTECODE=1
|
||||
LANGUAGE=en_US
|
||||
LC_ALL=en_US.UTF-8
|
||||
MIGRATIONS_TIMEOUT={env:MIGRATIONS_TIMEOUT:60}
|
||||
BASE_TEST_TIMEOUT={env:BASE_TEST_TIMEOUT:60}
|
||||
MIGRATIONS_TIMEOUT={env:MIGRATIONS_TIMEOUT:180}
|
||||
OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
|
||||
OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true}
|
||||
OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
|
||||
OS_TEST_TIMEOUT={env:OS_TEST_TIMEOUT:30}
|
||||
PYTHONUNBUFFERED=1
|
||||
SQLALCHEMY_WARN_20=true
|
||||
deps =
|
||||
|
Reference in New Issue
Block a user