summaryrefslogtreecommitdiffstats
path: root/nova/tests/conductor
diff options
context:
space:
mode:
authorDan Smith <danms@us.ibm.com>2013-06-18 09:49:38 -0700
committerDan Smith <danms@us.ibm.com>2013-06-18 17:39:03 -0700
commit824b49d5bd6262b2b16103a850d3e58b9ee14009 (patch)
tree659ac38b66ecf72eeb02d07378d1590b07f6a6c6 /nova/tests/conductor
parent086ec7a5b857fa1b88877c10991801761d819c98 (diff)
downloadnova-824b49d5bd6262b2b16103a850d3e58b9ee14009.tar.gz
nova-824b49d5bd6262b2b16103a850d3e58b9ee14009.tar.xz
nova-824b49d5bd6262b2b16103a850d3e58b9ee14009.zip
Remove db session hack from conductor's vol_usage_update()
Commit 3cf4cb2534c387f287f118d4185d54b1435d3bc0 made the vol_usage_update() in conductor hack around a stale sqlalchemy object issue by keeping session active in the current context until the notification was completed. This layering violation led to some "creative" tests to try to verify this behavior. This removes that and refreshes the object before letting it out of the db/api layer so that all the attributes are present, thus avoiding the dynamic load during notification. Change-Id: Ia6ef5cb7f462ff72d170f3af33f2d020ee4d3e3c
Diffstat (limited to 'nova/tests/conductor')
-rw-r--r--nova/tests/conductor/test_conductor.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/tests/conductor/test_conductor.py b/nova/tests/conductor/test_conductor.py
index 7a33cfbb9..9bb2c00ec 100644
--- a/nova/tests/conductor/test_conductor.py
+++ b/nova/tests/conductor/test_conductor.py
@@ -389,7 +389,7 @@ class _BaseTestCase(object):
fake_inst['project_id'],
fake_inst['user_id'],
fake_inst['availability_zone'],
- False, mox.IgnoreArg()).AndReturn('fake-usage')
+ False).AndReturn('fake-usage')
compute_utils.usage_volume_info('fake-usage').AndReturn('fake-info')
notifier_api.notify(self.context,
'conductor.%s' % self.conductor_manager.host,