Example #1
0
 def __init__(self):
   socket_options = SocketOptions(32768, 16, 32768, 16, 1024000, 1024000)
   sys_config = {constants.INSTANCE_RECONNECT_METRICSMGR_INTERVAL_SEC: 10}
   MetricsManagerClient.__init__(self, EventLooper(), self.HOST, self.PORT,
                                 mock_protobuf.get_mock_instance(), HeronCommunicator(), {},
                                 socket_options, sys_config)
   self.register_req_called = False
Example #2
0
 def __init__(self):
   socket_options = SocketOptions(32768, 16, 32768, 16, 1024000, 1024000)
   with patch("heron.common.src.python.config.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
Example #3
0
 def __init__(self):
     socket_options = SocketOptions(32768, 16, 32768, 16, 1024000, 1024000)
     sys_config = {
         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(), sys_config)
     self.register_req_called = False
Example #4
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