diff --git a/tempest/api/compute/images/test_images.py b/tempest/api/compute/images/test_images.py index c8221c28d9..7cf26fb473 100644 --- a/tempest/api/compute/images/test_images.py +++ b/tempest/api/compute/images/test_images.py @@ -47,6 +47,10 @@ class ImagesTestJSON(base.BaseV2ComputeTest): def test_delete_saving_image(self): server = self.create_test_server(wait_until='ACTIVE') self.addCleanup(self.servers_client.delete_server, server['id']) + # wait for server active to avoid conflict when deleting server + # in task_state image_snapshot + self.addCleanup(waiters.wait_for_server_status, self.servers_client, + server['id'], 'ACTIVE') image = self.create_image_from_server(server['id'], wait_until='SAVING') self.client.delete_image(image['id'])