Mark some slow tests as slow so they move out of the main job

We've seen a trend of tempest-full jobs timing out because of
tests taking a long time to complete which are not marked slow:

  http://status.openstack.org/elastic-recheck/#1783405

Based on some analysis of the slowest tests:

  https://ethercalc.openstack.org/dorupfz6s9qt

This change marks several tests as slow and gives reasons why
they are marked as slow - not only because they are slow, but
also because they are less common scenarios. These will still
be run in the tempest-slow job so we aren't losing test coverage
with this change.

If this makes the tempest-slow job itself take significantly
longer, we should consider running the tempest.api* slow tests
concurrently (like they are in tempest-full) and continue to
run the tempest.scenario* tests in serial. The tempest-slow job
currently runs all slow tests in serial, so this will make the
job take longer.

Partial-Bug: #1783405

Change-Id: I2a0e154ba38c7407b41b7e986a0bf9b451c65cae
This commit is contained in:
Matt Riedemann 2018-09-19 16:02:05 -04:00
parent ecddd38ecb
commit b572053303
5 changed files with 41 additions and 0 deletions

View File

@ -82,6 +82,11 @@ class TestVolumeSwap(TestVolumeSwapBase):
is attached to "instance1" and "volume2" is in available state.
"""
# NOTE(mriedem): This is an uncommon scenario to call the compute API
# to swap volumes directly; swap volume is primarily only for volume
# live migration and retype callbacks from the volume service, and is slow
# so it's marked as such.
@decorators.attr(type='slow')
@decorators.idempotent_id('1769f00d-a693-4d67-a631-6a3496773813')
@utils.services('volume')
def test_volume_swap(self):
@ -136,6 +141,11 @@ class TestMultiAttachVolumeSwap(TestVolumeSwapBase):
if not CONF.compute_feature_enabled.volume_multiattach:
raise cls.skipException('Volume multi-attach is not available.')
# NOTE(mriedem): This is an uncommon scenario to call the compute API
# to swap volumes directly; swap volume is primarily only for volume
# live migration and retype callbacks from the volume service, and is slow
# so it's marked as such.
@decorators.attr(type='slow')
@decorators.idempotent_id('e8f8f9d1-d7b7-4cd2-8213-ab85ef697b6e')
@utils.services('volume')
def test_volume_swap_with_multiattach(self):
@ -146,6 +156,8 @@ class TestMultiAttachVolumeSwap(TestVolumeSwapBase):
volume1 = self.create_volume(multiattach=True)
volume2 = self.create_volume(multiattach=True)
# TODO(mriedem): Speed this up by waiting for both servers to be active
# in parallel.
# Boot server1
server1 = self.create_test_server(wait_until='ACTIVE')
# Attach volume1 to server1

View File

@ -138,6 +138,9 @@ class TaggedBootDevicesTest(DeviceTaggingBase):
except Exception:
return False
# NOTE(mriedem): This is really more like a scenario test and is slow so
# it's marked as such.
@decorators.attr(type='slow')
@decorators.idempotent_id('a2e65a6c-66f1-4442-aaa8-498c31778d96')
@utils.services('network', 'volume', 'image')
def test_tagged_boot_devices(self):

View File

@ -265,6 +265,11 @@ class ServerActionsTestJSON(base.BaseV2ComputeTest):
self.client.start_server(self.server_id)
# NOTE(mriedem): Marked as slow because while rebuild and volume-backed is
# common, we don't actually change the image (you can't with volume-backed
# rebuild) so this isn't testing much outside normal rebuild
# (and it's slow).
@decorators.attr(type='slow')
@decorators.idempotent_id('b68bd8d6-855d-4212-b59b-2e704044dace')
@utils.services('volume')
def test_rebuild_server_with_volume_attached(self):

View File

@ -45,6 +45,10 @@ class ServerPersonalityTestJSON(base.BaseV2ComputeTest):
super(ServerPersonalityTestJSON, cls).setup_clients()
cls.client = cls.servers_client
# NOTE(mriedem): Marked as slow because personality (file injection) is
# deprecated in nova so we don't care as much about running this all the
# time (and it's slow).
@decorators.attr(type='slow')
@decorators.idempotent_id('3cfe87fd-115b-4a02-b942-7dc36a337fdf')
def test_create_server_with_personality(self):
file_contents = 'This is a test file.'
@ -75,6 +79,10 @@ class ServerPersonalityTestJSON(base.BaseV2ComputeTest):
linux_client.exec_command(
'sudo cat %s' % file_path))
# NOTE(mriedem): Marked as slow because personality (file injection) is
# deprecated in nova so we don't care as much about running this all the
# time (and it's slow).
@decorators.attr(type='slow')
@decorators.idempotent_id('128966d8-71fc-443c-8cab-08e24114ecc9')
def test_rebuild_server_with_personality(self):
validation_resources = self.get_test_validation_resources(
@ -117,6 +125,10 @@ class ServerPersonalityTestJSON(base.BaseV2ComputeTest):
self.assertRaises((lib_exc.Forbidden, lib_exc.OverLimit),
self.create_test_server, personality=personality)
# NOTE(mriedem): Marked as slow because personality (file injection) is
# deprecated in nova so we don't care as much about running this all the
# time (and it's slow).
@decorators.attr(type='slow')
@decorators.idempotent_id('52f12ee8-5180-40cc-b417-31572ea3d555')
def test_can_create_server_with_max_number_personality_files(self):
# Server should be created successfully if maximum allowed number of

View File

@ -160,6 +160,9 @@ class AttachVolumeShelveTestJSON(BaseAttachVolumeTest):
This test checks the attaching and detaching volumes from
a shelved or shelved offload instance.
Note that these are uncommon scenarios until blueprint detach-boot-volume
is implemented in the compute service.
"""
min_microversion = '2.20'
@ -220,6 +223,9 @@ class AttachVolumeShelveTestJSON(BaseAttachVolumeTest):
server, validation_resources)
self.assertEqual(number_of_volumes, counted_volumes)
# NOTE(mriedem): Marked as slow since this is an uncommon scenario until
# attach/detach root volume is supported in nova, and it's slow.
@decorators.attr(type='slow')
@decorators.idempotent_id('13a940b6-3474-4c3c-b03f-29b89112bfee')
def test_attach_volume_shelved_or_offload_server(self):
# Create server, count number of volumes on it, shelve
@ -245,6 +251,9 @@ class AttachVolumeShelveTestJSON(BaseAttachVolumeTest):
# case of shelved_offloaded.
self.assertIsNotNone(volume_attachment['device'])
# NOTE(mriedem): Marked as slow since this is an uncommon scenario until
# attach/detach root volume is supported in nova, and it's slow.
@decorators.attr(type='slow')
@decorators.idempotent_id('b54e86dd-a070-49c4-9c07-59ae6dae15aa')
def test_detach_volume_shelved_or_offload_server(self):
# Count number of volumes on instance, shelve