|
@@ -45,7 +45,6 @@ import org.apache.log4j.Layout;
|
|
|
import org.apache.log4j.Level;
|
|
|
import org.apache.log4j.Logger;
|
|
|
import org.apache.log4j.WriterAppender;
|
|
|
-import org.mockito.invocation.InvocationOnMock;
|
|
|
import org.mockito.stubbing.Answer;
|
|
|
|
|
|
/**
|
|
@@ -81,15 +80,9 @@ public class TestJobMonitorAndPrint {
|
|
|
1f, 1f, State.SUCCEEDED, JobPriority.HIGH, "tmp-user", "tmp-jobname",
|
|
|
"tmp-queue", "tmp-jobfile", "tmp-url", true);
|
|
|
|
|
|
- doAnswer(
|
|
|
- new Answer<TaskCompletionEvent[]>() {
|
|
|
- @Override
|
|
|
- public TaskCompletionEvent[] answer(InvocationOnMock invocation)
|
|
|
- throws Throwable {
|
|
|
- return new TaskCompletionEvent[0];
|
|
|
- }
|
|
|
- }
|
|
|
- ).when(job).getTaskCompletionEvents(anyInt(), anyInt());
|
|
|
+ doAnswer((Answer<TaskCompletionEvent[]>) invocation ->
|
|
|
+ TaskCompletionEvent.EMPTY_ARRAY).when(job)
|
|
|
+ .getTaskCompletionEvents(anyInt(), anyInt());
|
|
|
|
|
|
doReturn(new TaskReport[5]).when(job).getTaskReports(isA(TaskType.class));
|
|
|
when(clientProtocol.getJobStatus(any(JobID.class))).thenReturn(jobStatus_1, jobStatus_2);
|