summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Yeoh <cyeoh@au1.ibm.com>2013-04-29 20:18:25 +0930
committerChris Yeoh <cyeoh@au1.ibm.com>2013-04-29 20:18:25 +0930
commit52d3ff067e7e145c73ef768fca5bfb71e89b054c (patch)
treeaeaafcfd095f9490899fac3d9f85262430d66b8b
parent25541a5c08a8e2559b48b4614bd30e249577f974 (diff)
downloadnova-52d3ff067e7e145c73ef768fca5bfb71e89b054c.tar.gz
nova-52d3ff067e7e145c73ef768fca5bfb71e89b054c.tar.xz
nova-52d3ff067e7e145c73ef768fca5bfb71e89b054c.zip
Fix flakey TestS3ImageService bug
test_show_translates_image_state_correctly sometimes fails on some systems. This is caused because the ec2utils cache is reset after the test rather than before the test (but after the images are manually added to the db in setUp). This change resets the ec2utils cache in the correct place Fixes bug 1174266 Change-Id: I2ff9b71c932c913ca0423b1de4c04ca7d9de59cf
-rw-r--r--nova/tests/image/test_s3.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/tests/image/test_s3.py b/nova/tests/image/test_s3.py
index 1775fe131..8cdde1dc6 100644
--- a/nova/tests/image/test_s3.py
+++ b/nova/tests/image/test_s3.py
@@ -98,7 +98,7 @@ class TestS3ImageService(test.TestCase):
fake.stub_out_image_service(self.stubs)
self.image_service = s3.S3ImageService()
- self.addCleanup(ec2utils.reset_cache)
+ ec2utils.reset_cache()
def tearDown(self):
super(TestS3ImageService, self).tearDown()