def test_retry_with_method_call_error(self):
"""
If a retried L{MethodCall} request fails due to a L{MethodCallError},
the L{RemoteObject} will properly propagate the error to the original
caller.
"""
self.methods.remove("method")
self.client.factor = 0.01 # Try reconnecting very quickly
self.client.retryOnReconnect = True
connector = reactor.connectUNIX(self.socket, self.client)
remote = yield self.client.getRemoteObject()
# Disconnect
connector.disconnect()
# A method call error is not retried
yield self.assertFailure(remote.method(), MethodCallError)
self.client.stopTrying()
connector.disconnect()
评论列表
文章目录