[ https://issues.apache.org/jira/browse/MAPREDUCE-7418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17924359#comment-17924359 ]
ASF GitHub Bot commented on MAPREDUCE-7418: ------------------------------------------- slfan1989 commented on code in PR #7350: URL: https://github.com/apache/hadoop/pull/7350#discussion_r1944053133 ########## hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapred/TestTaskAttemptListenerImpl.java: ########## @@ -257,12 +260,6 @@ public void testGetMapCompletionEvents() throws IOException { createTce(3, false, TaskAttemptCompletionEventStatus.FAILED) }; TaskAttemptCompletionEvent[] mapEvents = { taskEvents[0], taskEvents[2] }; Job mockJob = mock(Job.class); - when(mockJob.getTaskAttemptCompletionEvents(0, 100)) Review Comment: Thank you for your comment! We removed this part of the code based on the suggestion from Mockito, which indicated that this code was not called in the test and recommended its removal. The error messages are as follows: ``` org.mockito.exceptions.misusing.UnnecessaryStubbingException: Unnecessary stubbings detected. Clean & maintainable test code requires zero unnecessary code. Following stubbings are unnecessary (click to navigate to relevant line of code): 1. -> at org.apache.hadoop.mapred.TestTaskAttemptListenerImpl.testGetMapCompletionEvents(TestTaskAttemptListenerImpl.java:264) 2. -> at org.apache.hadoop.mapred.TestTaskAttemptListenerImpl.testGetMapCompletionEvents(TestTaskAttemptListenerImpl.java:266) 3. -> at org.apache.hadoop.mapred.TestTaskAttemptListenerImpl.testGetMapCompletionEvents(TestTaskAttemptListenerImpl.java:268) Please remove unnecessary stubbings or use 'lenient' strictness. More info: javadoc for UnnecessaryStubbingException class. ``` > Upgrade Junit 4 to 5 in hadoop-mapreduce-client-app > --------------------------------------------------- > > Key: MAPREDUCE-7418 > URL: https://issues.apache.org/jira/browse/MAPREDUCE-7418 > Project: Hadoop Map/Reduce > Issue Type: Sub-task > Components: test > Affects Versions: 3.3.4 > Reporter: Ashutosh Gupta > Assignee: Ashutosh Gupta > Priority: Major > Labels: pull-request-available > > Upgrade Junit 4 to 5 in hadoop-mapreduce-client-app -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: mapreduce-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: mapreduce-issues-h...@hadoop.apache.org