tests all passing again

This commit is contained in:
Sandy Walsh
2011-06-01 17:49:49 -07:00
parent cae593e602
commit a81c3078be
2 changed files with 2 additions and 11 deletions

View File

@@ -148,10 +148,7 @@ def call_zone_method(context, method_name, errors_to_ignore=None,
except Exception as e:
if type(e) in errors_to_ignore:
return None
# TODO (dabo) - want to be able to re-raise here.
# Returning a string now; raising was causing issues.
# raise e
return "ERROR", "%s" % e
raise e
res = pool.spawn(_error_trap, *args, **kwargs)
results.append((zone, res))

View File

@@ -1109,10 +1109,4 @@ class CallZoneMethodTest(test.TestCase):
def test_call_zone_method_generates_exception(self):
context = {}
method = 'raises_exception'
results = api.call_zone_method(context, method)
# FIXME(sirp): for now the _error_trap code is catching errors and
# converting them to a ("ERROR", "string") tuples. The code (and this
# test) should eventually handle real exceptions.
expected = [(1, ('ERROR', 'testing'))]
self.assertEqual(expected, results)
self.assertRaises(Exception, api.call_zone_method, context, method)