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