Race Condition in ImagesOneServerTest's test_create_delete_image()

Bug #1187566 reported by Matthew Treinish on 2013-06-04
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Matthew Treinish

Bug Description

The delete portion test_create_delete_image() in ImagesOneServerTest has a race condition between the delete and the assertRaises(). Delete is async and there is no guarantee that immediately after you receive a response on the delete request the image will actually be deleted. See:

# 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)

Changed in tempest:
status: New → Confirmed
importance: Undecided → High

Fix proposed to branch: master
Review: https://review.openstack.org/31709

Changed in tempest:
status: Confirmed → In Progress

Reviewed: https://review.openstack.org/31709
Committed: http://github.com/openstack/tempest/commit/0d66049d8542934717b885b9f46b7684036146f6
Submitter: Jenkins
Branch: master

commit 0d66049d8542934717b885b9f46b7684036146f6
Author: Matthew Treinish <email address hidden>
Date: Tue Jun 4 17:26:09 2013 -0400

    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

Changed in tempest:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers