summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorVishvananda Ishaya <vishvananda@gmail.com>2011-03-09 21:43:35 +0000
committerVishvananda Ishaya <vishvananda@gmail.com>2011-03-09 21:43:35 +0000
commit3e61bf9963d7e98e8152d2eacfc4461d8cda309c (patch)
tree015bf22d5e66d16233d142702222b438d978b22e /nova/tests
parentddeab2da30bb2f74109854d982c6681e78e7a4ce (diff)
remove the semaphore when there is no one waiting on it
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/test_virt.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/nova/tests/test_virt.py b/nova/tests/test_virt.py
index 113632a0c..56a271365 100644
--- a/nova/tests/test_virt.py
+++ b/nova/tests/test_virt.py
@@ -23,7 +23,6 @@ from xml.dom.minidom import parseString as xml_to_dom
from nova import context
from nova import db
from nova import flags
-from nova import log as logging
from nova import test
from nova import utils
from nova.api.ec2 import cloud
@@ -70,11 +69,13 @@ class CacheConcurrencyTestCase(test.TestCase):
eventlet.sleep(0)
try:
self.assertFalse(done2.ready())
+ self.assertTrue('fname' in conn._image_sems)
finally:
wait1.send()
done1.wait()
eventlet.sleep(0)
self.assertTrue(done2.ready())
+ self.assertFalse('fname' in conn._image_sems)
def test_different_fname_concurrency(self):
"""Ensures that two different fname caches are concurrent"""