Skip to content

Commit 020fb8d

Browse files
committed
removed lenient strictness and the unstubbed lines
Change-Id: Idd52f05750eaedaacc009ed8a5fc0dc645351714
1 parent d3d685a commit 020fb8d

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapred/TestTaskAttemptListenerImpl.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
import java.io.IOException;
2121
import java.util.ArrayList;
22-
import java.util.Arrays;
2322
import java.util.List;
2423
import java.util.concurrent.ConcurrentMap;
2524
import java.util.concurrent.atomic.AtomicReference;
@@ -79,7 +78,6 @@
7978
import static org.mockito.Mockito.any;
8079
import static org.mockito.Mockito.doReturn;
8180
import static org.mockito.Mockito.eq;
82-
import static org.mockito.Mockito.lenient;
8381
import static org.mockito.Mockito.mock;
8482
import static org.mockito.Mockito.never;
8583
import static org.mockito.Mockito.times;
@@ -262,12 +260,6 @@ public void testGetMapCompletionEvents() throws IOException {
262260
createTce(3, false, TaskAttemptCompletionEventStatus.FAILED) };
263261
TaskAttemptCompletionEvent[] mapEvents = { taskEvents[0], taskEvents[2] };
264262
Job mockJob = mock(Job.class);
265-
lenient().when(mockJob.getTaskAttemptCompletionEvents(0, 100))
266-
.thenReturn(taskEvents);
267-
lenient().when(mockJob.getTaskAttemptCompletionEvents(0, 2))
268-
.thenReturn(Arrays.copyOfRange(taskEvents, 0, 2));
269-
lenient().when(mockJob.getTaskAttemptCompletionEvents(2, 100))
270-
.thenReturn(Arrays.copyOfRange(taskEvents, 2, 4));
271263
when(mockJob.getMapAttemptCompletionEvents(0, 100)).thenReturn(
272264
TypeConverter.fromYarn(mapEvents));
273265
when(mockJob.getMapAttemptCompletionEvents(0, 2)).thenReturn(

hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/job/impl/TestMapReduceChildJVM.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public class TestMapReduceChildJVM {
4848
LoggerFactory.getLogger(TestMapReduceChildJVM.class);
4949

5050
@Test
51+
@Timeout(30000)
5152
public void testCommandLine() throws Exception {
5253
MyMRApp app = new MyMRApp(1, 0, true, this.getClass().getName(), true);
5354
Configuration conf = new Configuration();

hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/rm/TestRMCommunicator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ public void testRMContainerAllocatorExceptionIsHandled() throws Exception {
6969
}
7070

7171
@Test
72+
@Timeout(2000)
7273
public void testRMContainerAllocatorYarnRuntimeExceptionIsHandled()
7374
throws Exception {
7475
ClientService mockClientService = mock(ClientService.class);

0 commit comments

Comments
 (0)