ListImagesTest.test_index_no_params is checking by the list length, not the images identity

Bug #1088515 reported by Jaroslav Henner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Fix Released
Medium
Jaroslav Henner

Bug Description

I'm running tests in parallel. I met an ERROR that appears it happened because some parallel test added some image. Tests should be comparing not by collection sizes, but by ids to avoid such race conditions.

16:09:12 #4 Simple test to see all fixture images returned ... FAIL
16:09:16
16:09:16 ======================================================================
16:09:16 FAIL: Simple test to see all fixture images returned
16:09:16 ----------------------------------------------------------------------
16:09:16 Traceback (most recent call last):
16:09:16 File "tempest/tests/image/test_images.py", line 202, in ListImagesTest.test_index_no_params
16:09:16 self = <tempest.tests.image.test_images.ListImagesTest testMethod=test_index_no_params>
16:09:16 198 """
16:09:16 199 Simple test to see all fixture images returned
16:09:16 200 """
16:09:16 201 images = list(self.client.images.list())
16:09:16 --> 202 self.assertEqual(10, len(images) - len(self.original_images))
16:09:16 images = [
...
16:09:16 <Image {u'status': u'active', u'name': u'f16-x86_64-openstack-sda', u'deleted': False, u'container_format': u'ovf', u'created_at': u'2012-12-10T14:57:12', u'disk_format': u'qcow2', u'updated_at': u'2012-12-10T14:57:18', u'id': u'22429bff-1c95-4a3b-affe-27eccdf7b284', u'owner': u'af07e16d3b9f48318b4a948b6ab6153c', u'protected': False, u'min_ram': 0, u'checksum': u'755122332caeb9f661d5c978adb8b45f', u'min_disk': 0, u'is_public': True, u'deleted_at': None, u'properties': {}, u'size': 213581824}>,
16:09:16 ]
16:09:16 AssertionError: 10 != 11
16:09:16 '10 != 11' = '%s != %s' % (safe_repr(10), safe_repr(11))
16:09:16 '10 != 11' = self._formatMessage('10 != 11', '10 != 11')
16:09:16 >> raise self.failureException('10 != 11')

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/18035

Changed in tempest:
assignee: nobody → Jaroslav Henner (jhenner)
status: New → In Progress
Jay Pipes (jaypipes)
Changed in tempest:
importance: Undecided → Low
importance: Low → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tempest (master)

Reviewed: https://review.openstack.org/18035
Committed: http://github.com/openstack/tempest/commit/72604c5d782f4b178dad4669cf2e34b05f7ccf34
Submitter: Jenkins
Branch: master

commit 72604c5d782f4b178dad4669cf2e34b05f7ccf34
Author: Jaroslav Henner <email address hidden>
Date: Thu Dec 13 14:17:40 2012 +0100

    Check images by ids, not by count. lp#1088515

    Change-Id: I0ec2d06615f1fff834c72599847e39a01678529f

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.