From: Avishay Traeger Date: Mon, 24 Feb 2014 17:55:15 +0000 (+0200) Subject: Fix race in test_delete_backup X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=115b6276ac3dd7b3e8c6a42e9d0d80709791b7a2;p=openstack-build%2Fcinder-build.git 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 --- diff --git a/cinder/tests/test_backup.py b/cinder/tests/test_backup.py index 310326bd0..8d615cc31 100644 --- a/cinder/tests/test_backup.py +++ b/cinder/tests/test_backup.py @@ -357,7 +357,7 @@ class BackupTestCase(test.TestCase): ctxt_read_deleted = context.get_admin_context('yes') backup = db.backup_get(ctxt_read_deleted, backup_id) self.assertEqual(backup.deleted, True) - self.assertGreater(timeutils.utcnow(), backup.deleted_at) + self.assertGreaterEqual(timeutils.utcnow(), backup.deleted_at) self.assertEqual(backup.status, 'deleted') def test_list_backup(self):