use of org.apache.tez.dag.app.TaskCommunicatorWrapper in project tez by apache.
the class TestTaskAttempt method createMockTaskAttemptListener.
private TaskCommunicatorManagerInterface createMockTaskAttemptListener() throws ServicePluginException {
TaskCommunicatorManagerInterface taListener = mock(TaskCommunicatorManagerInterface.class);
TaskCommunicator taskComm = mock(TaskCommunicator.class);
doReturn(new InetSocketAddress("localhost", 0)).when(taskComm).getAddress();
doReturn(new TaskCommunicatorWrapper(taskComm)).when(taListener).getTaskCommunicator(0);
return taListener;
}
Aggregations