def setUp(self):
    super(TimeoutTestCase, self).setUp()
    self.messaging_conf = messaging_conffixture.ConfFixture(CONF)
    self.messaging_conf.transport_driver = 'fake'
    self.messaging_conf.response_timeout = 0
    self.useFixture(self.messaging_conf)
    self.addCleanup(rpc.cleanup)
    rpc.init(CONF)
    rpc.TRANSPORT = mock.MagicMock()
    rpc.TRANSPORT._send.side_effect = messaging.MessagingTimeout
    target = messaging.Target(version='1.0', topic='testing')
    self.client = rpc.get_client(target)
    self.call_context = mock.Mock()
    self.sleep = mock.patch('time.sleep').start()
    rpc.TRANSPORT.conf.rpc_response_timeout = 10
def setUp(self):
    super(TimeoutTestCase, self).setUp()
    self.messaging_conf = messaging_conffixture.ConfFixture(CONF)
    self.messaging_conf.transport_driver = 'fake'
    self.messaging_conf.response_timeout = 0
    self.useFixture(self.messaging_conf)
    self.addCleanup(rpc.cleanup)
    rpc.init(CONF)
    rpc.TRANSPORT = mock.MagicMock()
    rpc.TRANSPORT._send.side_effect = messaging.MessagingTimeout
    target = messaging.Target(version='1.0', topic='testing')
    self.client = rpc.get_client(target)
    self.call_context = mock.Mock()
    self.sleep = mock.patch('time.sleep').start()
    rpc.TRANSPORT.conf.rpc_response_timeout = 10