Fix a race condition in test_create_delete_image()
The delete portion test_create_delete_image() in
ImagesOneServerTest has a race condition between the delete
and the assertRaises(). This commit fixes this by enabling
wait_for_resource_deletion() for the images_client and using that
after the delete request.
Fixes Bug 1187566
Change-Id: I13114d6c549756b3d753c9395f82d58cbaec04db
diff --git a/tempest/api/compute/images/test_images_oneserver.py b/tempest/api/compute/images/test_images_oneserver.py
index c7f0b23..4163245 100644
--- a/tempest/api/compute/images/test_images_oneserver.py
+++ b/tempest/api/compute/images/test_images_oneserver.py
@@ -131,7 +131,7 @@
# Verify the image was deleted correctly
resp, body = self.client.delete_image(image_id)
self.assertEqual('204', resp['status'])
- self.assertRaises(exceptions.NotFound, self.client.get_image, image_id)
+ self.client.wait_for_resource_deletion(image_id)
@testtools.skipUnless(compute.MULTI_USER,
'Need multiple users for this test.')