Race Condition in ImagesOneServerTest's test_create_delete_image()

Bug #1187566 reported by Matthew Treinish
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
tempest
Fix Released
High
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
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest (master)

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

Changed in tempest:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tempest (master)

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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.