def get_mock_stmgr(id="Stmgr_id", host="127.0.0.1", port=9999, endpoint="hello"): """Returns a mock protobuf StMgr object from physical_plan_pb2""" stmgr = physical_plan_pb2.StMgr() stmgr.id = id stmgr.host_name = host stmgr.data_port = port stmgr.local_endpoint = endpoint return stmgr
def create_mock_stream_manager(self): stmgr = protoPPlan.StMgr() stmgr.id = "mock_stream1" stmgr.host_name = "local" stmgr.local_endpoint = ":1000" stmgr.local_data_port = 1001 stmgr.shell_port = 1002 stmgr.data_port = 1003 stmgr.cwd = "" stmgr.pid = 1 return stmgr