Пример #1
0
 def __init__(self):
     socket_options = SocketOptions(32768, 16, 32768, 16, 1024000, 1024000)
     HeronClient.__init__(self, None, self.HOST, self.PORT, {},
                          socket_options)
     self.on_connect_called = False
     self.on_response_status = None
     self.called_handle_packet = False
     self.dispatcher = MockDispatcher()
     self.incoming_msg = None
     self.on_error_called = False
Пример #2
0
 def __init__(self):
     socket_options = SocketOptions(32768, 16, 32768, 16, 1024000, 1024000)
     with patch(
             "heron.instance.src.python.utils.system_config.get_sys_config",
             side_effect=lambda:
         {constants.INSTANCE_RECONNECT_STREAMMGR_INTERVAL_SEC: 10}):
         SingleThreadStmgrClient.__init__(self, EventLooper(), None,
                                          self.HOST, self.PORT,
                                          "topology_name", "topology_id",
                                          mock_protobuf.get_mock_instance(),
                                          {}, None, socket_options)
     self.register_msg_called = False
     self.handle_register_response_called = False
Пример #3
0
 def __init__(self):
     socket_options = SocketOptions(32768, 16, 32768, 16, 1024000, 1024000)
     with patch(
             "heron.instance.src.python.utils.system_config.get_sys_config",
             side_effect=lambda: {
                 constants.INSTANCE_RECONNECT_METRICSMGR_INTERVAL_SEC: 10,
                 constants.INSTANCE_METRICS_SYSTEM_SAMPLE_INTERVAL_SEC: 10
             }):
         stream = HeronCommunicator(producer_cb=None, consumer_cb=None)
         MetricsManagerClient.__init__(self, EventLooper(), self.HOST,
                                       self.PORT,
                                       mock_protobuf.get_mock_instance(),
                                       HeronCommunicator(), stream, stream,
                                       {}, socket_options, Mock(), Mock())
     self.register_req_called = False