Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.9.0, 3.0.0-beta1
    • Component/s: test
    • Labels:
      None

      Description

      I would remove MockitoMaker class and use the standard way to mock objects.
      For developers it's harder to read and misleading since it's using the deprecated syntax.
      In addition, it is only used at only some places so we using Mockito on a not-unified way.

        Issue Links

          Activity

          Hide
          boky01 Andras Bokor added a comment -

          Attaching 1st patch.

          Show
          boky01 Andras Bokor added a comment - Attaching 1st patch.
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 15s Docker mode activated.
                Prechecks
          +1 @author 0m 0s The patch does not contain any @author tags.
          +1 test4tests 0m 0s The patch appears to include 6 new or modified test files.
                trunk Compile Tests
          0 mvndep 1m 19s Maven dependency ordering for branch
          +1 mvninstall 14m 55s trunk passed
          +1 compile 15m 33s trunk passed
          +1 checkstyle 1m 59s trunk passed
          +1 mvnsite 3m 51s trunk passed
          +1 findbugs 4m 42s trunk passed
          +1 javadoc 2m 37s trunk passed
                Patch Compile Tests
          0 mvndep 0m 17s Maven dependency ordering for patch
          +1 mvninstall 2m 55s the patch passed
          +1 compile 11m 5s the patch passed
          +1 javac 11m 5s the patch passed
          +1 checkstyle 2m 3s root: The patch generated 0 new + 164 unchanged - 11 fixed = 164 total (was 175)
          +1 mvnsite 3m 56s the patch passed
          +1 whitespace 0m 0s The patch has no whitespace issues.
          +1 findbugs 5m 40s the patch passed
          +1 javadoc 2m 46s the patch passed
                Other Tests
          -1 unit 9m 25s hadoop-common in the patch failed.
          -1 unit 45m 40s hadoop-yarn-server-resourcemanager in the patch failed.
          +1 unit 0m 36s hadoop-mapreduce-client-shuffle in the patch passed.
          +1 unit 9m 43s hadoop-mapreduce-client-app in the patch passed.
          -1 unit 104m 28s hadoop-mapreduce-client-jobclient in the patch failed.
          +1 asflicense 0m 50s The patch does not generate ASF License warnings.
          267m 11s



          Reason Tests
          Failed junit tests hadoop.ha.TestZKFailoverController
            hadoop.security.TestKDiag
            hadoop.yarn.server.resourcemanager.TestRMRestart
            hadoop.mapreduce.security.TestUmbilicalProtocolWithJobToken
          Timed out junit tests org.apache.hadoop.yarn.server.resourcemanager.recovery.TestZKRMStateStore



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:14b5c93
          JIRA Issue HADOOP-14681
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12878620/HADOOP-14681.01.patch
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux 442d5a0fa6b8 3.13.0-117-generic #164-Ubuntu SMP Fri Apr 7 11:05:26 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
          git revision trunk / 770cc46
          Default Java 1.8.0_131
          findbugs v3.1.0-RC1
          unit https://builds.apache.org/job/PreCommit-HADOOP-Build/12845/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common.txt
          unit https://builds.apache.org/job/PreCommit-HADOOP-Build/12845/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager.txt
          unit https://builds.apache.org/job/PreCommit-HADOOP-Build/12845/artifact/patchprocess/patch-unit-hadoop-mapreduce-project_hadoop-mapreduce-client_hadoop-mapreduce-client-jobclient.txt
          Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/12845/testReport/
          modules C: hadoop-common-project/hadoop-common hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient U: .
          Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/12845/console
          Powered by Apache Yetus 0.6.0-SNAPSHOT http://yetus.apache.org

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 15s Docker mode activated.       Prechecks +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 6 new or modified test files.       trunk Compile Tests 0 mvndep 1m 19s Maven dependency ordering for branch +1 mvninstall 14m 55s trunk passed +1 compile 15m 33s trunk passed +1 checkstyle 1m 59s trunk passed +1 mvnsite 3m 51s trunk passed +1 findbugs 4m 42s trunk passed +1 javadoc 2m 37s trunk passed       Patch Compile Tests 0 mvndep 0m 17s Maven dependency ordering for patch +1 mvninstall 2m 55s the patch passed +1 compile 11m 5s the patch passed +1 javac 11m 5s the patch passed +1 checkstyle 2m 3s root: The patch generated 0 new + 164 unchanged - 11 fixed = 164 total (was 175) +1 mvnsite 3m 56s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 5m 40s the patch passed +1 javadoc 2m 46s the patch passed       Other Tests -1 unit 9m 25s hadoop-common in the patch failed. -1 unit 45m 40s hadoop-yarn-server-resourcemanager in the patch failed. +1 unit 0m 36s hadoop-mapreduce-client-shuffle in the patch passed. +1 unit 9m 43s hadoop-mapreduce-client-app in the patch passed. -1 unit 104m 28s hadoop-mapreduce-client-jobclient in the patch failed. +1 asflicense 0m 50s The patch does not generate ASF License warnings. 267m 11s Reason Tests Failed junit tests hadoop.ha.TestZKFailoverController   hadoop.security.TestKDiag   hadoop.yarn.server.resourcemanager.TestRMRestart   hadoop.mapreduce.security.TestUmbilicalProtocolWithJobToken Timed out junit tests org.apache.hadoop.yarn.server.resourcemanager.recovery.TestZKRMStateStore Subsystem Report/Notes Docker Image:yetus/hadoop:14b5c93 JIRA Issue HADOOP-14681 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12878620/HADOOP-14681.01.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 442d5a0fa6b8 3.13.0-117-generic #164-Ubuntu SMP Fri Apr 7 11:05:26 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 770cc46 Default Java 1.8.0_131 findbugs v3.1.0-RC1 unit https://builds.apache.org/job/PreCommit-HADOOP-Build/12845/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common.txt unit https://builds.apache.org/job/PreCommit-HADOOP-Build/12845/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager.txt unit https://builds.apache.org/job/PreCommit-HADOOP-Build/12845/artifact/patchprocess/patch-unit-hadoop-mapreduce-project_hadoop-mapreduce-client_hadoop-mapreduce-client-jobclient.txt Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/12845/testReport/ modules C: hadoop-common-project/hadoop-common hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient U: . Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/12845/console Powered by Apache Yetus 0.6.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          Hide
          ajisakaa Akira Ajisaka added a comment -

          +1, checking this in.

          Show
          ajisakaa Akira Ajisaka added a comment - +1, checking this in.
          Hide
          ajisakaa Akira Ajisaka added a comment -

          Committed this to trunk and branch-2. Thanks Andras Bokor for the contribution!

          Show
          ajisakaa Akira Ajisaka added a comment - Committed this to trunk and branch-2. Thanks Andras Bokor for the contribution!
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #12052 (See https://builds.apache.org/job/Hadoop-trunk-Commit/12052/)
          HADOOP-14681. Remove MockitoMaker class. Contributed by Andras Bokor. (aajisaka: rev cca51e916b7387ea358688e8f8188ead948fbdcc)

          • (edit) hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/lib/input/TestMRCJCFileInputFormat.java
          • (edit) hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestDiskChecker.java
          • (edit) hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/metrics/TestMRAppMetrics.java
          • (edit) hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/TestQueueMetrics.java
          • (edit) hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle/src/test/java/org/apache/hadoop/mapred/TestShuffleHandler.java
          • (delete) hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/test/MockitoMaker.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #12052 (See https://builds.apache.org/job/Hadoop-trunk-Commit/12052/ ) HADOOP-14681 . Remove MockitoMaker class. Contributed by Andras Bokor. (aajisaka: rev cca51e916b7387ea358688e8f8188ead948fbdcc) (edit) hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/lib/input/TestMRCJCFileInputFormat.java (edit) hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestDiskChecker.java (edit) hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/metrics/TestMRAppMetrics.java (edit) hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/TestQueueMetrics.java (edit) hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle/src/test/java/org/apache/hadoop/mapred/TestShuffleHandler.java (delete) hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/test/MockitoMaker.java
          Hide
          boky01 Andras Bokor added a comment -

          Thanks a lot Akira Ajisaka!

          Show
          boky01 Andras Bokor added a comment - Thanks a lot Akira Ajisaka !

            People

            • Assignee:
              boky01 Andras Bokor
              Reporter:
              boky01 Andras Bokor
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development