tests all passing again
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user