def test_method_timeout_increases_on_timeout_exception(self):
    rpc._BackingOffContextWrapper._METHOD_TIMEOUTS['method_1'] = 1
    for i in range(4):
        with testtools.ExpectedException(messaging.MessagingTimeout):
            self.client.call(self.call_context, 'method_1')
    timeouts = [call[1]['timeout'] for call in rpc.TRANSPORT._send.call_args_list]
    self.assertEqual([1, 2, 4, 8], timeouts)
def test_method_timeout_increases_on_timeout_exception(self):
    rpc._BackingOffContextWrapper._METHOD_TIMEOUTS['method_1'] = 1
    for i in range(4):
        with testtools.ExpectedException(messaging.MessagingTimeout):
            self.client.call(self.call_context, 'method_1')
    timeouts = [call[1]['timeout'] for call in rpc.TRANSPORT._send.call_args_list]
    self.assertEqual([1, 2, 4, 8], timeouts)