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:
|
except Exception as e:
|
||||||
if type(e) in errors_to_ignore:
|
if type(e) in errors_to_ignore:
|
||||||
return None
|
return None
|
||||||
# TODO (dabo) - want to be able to re-raise here.
|
raise e
|
||||||
# Returning a string now; raising was causing issues.
|
|
||||||
# raise e
|
|
||||||
return "ERROR", "%s" % e
|
|
||||||
|
|
||||||
res = pool.spawn(_error_trap, *args, **kwargs)
|
res = pool.spawn(_error_trap, *args, **kwargs)
|
||||||
results.append((zone, res))
|
results.append((zone, res))
|
||||||
|
|||||||
@@ -1109,10 +1109,4 @@ class CallZoneMethodTest(test.TestCase):
|
|||||||
def test_call_zone_method_generates_exception(self):
|
def test_call_zone_method_generates_exception(self):
|
||||||
context = {}
|
context = {}
|
||||||
method = 'raises_exception'
|
method = 'raises_exception'
|
||||||
results = api.call_zone_method(context, method)
|
self.assertRaises(Exception, 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)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user