def __init__(self): socket_options = SocketOptions(32768, 16, 32768, 16, 1024000, 1024000) sys_config = {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, sys_config) self.register_msg_called = False self.handle_register_response_called = False
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_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
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
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
def setUp(self): self.looper = EventLooper() self.global_value = 6