race condition in test_delete_backup

Bug #1284227 reported by Avishay Traeger
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Medium
Avishay Traeger

Bug Description

The test_delete_backup unit test fails sporadically as such:

2014-02-19 06:55:33.645 | Traceback (most recent call last):
2014-02-19 06:55:33.645 | File "cinder/tests/test_backup.py", line 360, in test_delete_backup
2014-02-19 06:55:33.645 | self.assertGreater(timeutils.utcnow(), backup.deleted_at)
2014-02-19 06:55:33.645 | File "cinder/test.py", line 280, in assertGreater
2014-02-19 06:55:33.645 | f(first, second, msg=msg)
2014-02-19 06:55:33.645 | File "/usr/lib/python2.7/unittest/case.py", line 940, in assertGreater
2014-02-19 06:55:33.646 | self.fail(self._formatMessage(msg, standardMsg))
2014-02-19 06:55:33.646 | File "/usr/lib/python2.7/unittest/case.py", line 408, in fail
2014-02-19 06:55:33.646 | raise self.failureException(msg)
2014-02-19 06:55:33.646 | AssertionError: datetime.datetime(2014, 2, 19, 6, 53, 14, 473836) not greater than datetime.datetime(2014, 2, 19, 6, 53, 14, 473836)

Changed in cinder:
assignee: nobody → Avishay Traeger (avishay-il)
importance: Undecided → Medium
milestone: none → icehouse-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

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

Reviewed: https://review.openstack.org/75944
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=115b6276ac3dd7b3e8c6a42e9d0d80709791b7a2
Submitter: Jenkins
Branch: master

commit 115b6276ac3dd7b3e8c6a42e9d0d80709791b7a2
Author: Avishay Traeger <email address hidden>
Date: Mon Feb 24 19:55:15 2014 +0200

    Fix race in test_delete_backup

    Unit test sporadically failed due to timing issue - the deletion
    timestamp on the backup was exactly the same as timeutils.utcnow(),
    causing the AssertGreater check to fail. Change to AssertGreaterEqual.

    Change-Id: Ia66d0d4bdae3242780a91f0d384cbd17caa8c197
    Closes-bug: #1284227

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: icehouse-3 → 2014.1
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.