Hadoop Common
  1. Hadoop Common
  2. HADOOP-7589

Prefer mvn test -DskipTests over mvn compile in test-patch.sh

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.23.0, 0.24.0
    • Fix Version/s: 0.23.0, 0.24.0
    • Component/s: build
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      I got a failure running test-patch with a clean .m2 directory.

      To quote Alejandro:

      The reason for this failure is because of how Maven reactor/dependency
      resolution works (IMO a bug).

      Maven reactor/dependency resolution is smart enough to create the classpath
      using the classes from all modules being built.

      However, this smartness falls short just a bit. The dependencies are
      resolved using the deepest maven phase used by current mvn invocation. If
      you are doing 'mvn compile' you don't get to the test compile phase. This
      means that the TEST classes are not resolved from the build but from the
      cache/repo.

      The solution is to run 'mvn test -DskipTests' instead 'mvn compile'. This
      will include the TEST classes from the build.

      So this is to replace mvn compile in test-patch.sh with mvn test -DskipTests

      1. HADOOP-7589-V1.patch
        4 kB
        Robert Joseph Evans

        Activity

        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk #801 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/801/)
        HADOOP-7589. Prefer mvn test -DskipTests over mvn compile in test-patch.sh (Robert Evans via mahadev)

        mahadev : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1162928
        Files :

        • /hadoop/common/trunk/dev-support/test-patch.sh
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #801 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/801/ ) HADOOP-7589 . Prefer mvn test -DskipTests over mvn compile in test-patch.sh (Robert Evans via mahadev) mahadev : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1162928 Files : /hadoop/common/trunk/dev-support/test-patch.sh
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk #776 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/776/)
        HADOOP-7589. Prefer mvn test -DskipTests over mvn compile in test-patch.sh (Robert Evans via mahadev)

        mahadev : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1162928
        Files :

        • /hadoop/common/trunk/dev-support/test-patch.sh
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #776 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/776/ ) HADOOP-7589 . Prefer mvn test -DskipTests over mvn compile in test-patch.sh (Robert Evans via mahadev) mahadev : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1162928 Files : /hadoop/common/trunk/dev-support/test-patch.sh
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk-Commit #812 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/812/)
        HADOOP-7589. Prefer mvn test -DskipTests over mvn compile in test-patch.sh (Robert Evans via mahadev)

        mahadev : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1162928
        Files :

        • /hadoop/common/trunk/dev-support/test-patch.sh
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #812 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/812/ ) HADOOP-7589 . Prefer mvn test -DskipTests over mvn compile in test-patch.sh (Robert Evans via mahadev) mahadev : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1162928 Files : /hadoop/common/trunk/dev-support/test-patch.sh
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk-Commit #879 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/879/)
        HADOOP-7589. Prefer mvn test -DskipTests over mvn compile in test-patch.sh (Robert Evans via mahadev)

        mahadev : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1162928
        Files :

        • /hadoop/common/trunk/dev-support/test-patch.sh
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #879 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/879/ ) HADOOP-7589 . Prefer mvn test -DskipTests over mvn compile in test-patch.sh (Robert Evans via mahadev) mahadev : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1162928 Files : /hadoop/common/trunk/dev-support/test-patch.sh
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-trunk-Commit #802 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/802/)
        HADOOP-7589. Prefer mvn test -DskipTests over mvn compile in test-patch.sh (Robert Evans via mahadev)

        mahadev : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1162928
        Files :

        • /hadoop/common/trunk/dev-support/test-patch.sh
        Show
        Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #802 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/802/ ) HADOOP-7589 . Prefer mvn test -DskipTests over mvn compile in test-patch.sh (Robert Evans via mahadev) mahadev : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1162928 Files : /hadoop/common/trunk/dev-support/test-patch.sh
        Hide
        Mahadev konar added a comment -

        I just pushed this. Thanks Bobby!

        Show
        Mahadev konar added a comment - I just pushed this. Thanks Bobby!
        Hide
        Alejandro Abdelnur added a comment -

        It looks good.

        Show
        Alejandro Abdelnur added a comment - It looks good.
        Hide
        Scott Carey added a comment -

        Doesn't using 'mvn test-compile' the same as 'mvn test -DskipTests' ?

        Show
        Scott Carey added a comment - Doesn't using 'mvn test-compile' the same as 'mvn test -DskipTests' ?
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12492106/HADOOP-7589-V1.patch
        against trunk revision .

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 4 new or modified tests.

        -1 patch. The patch command could not apply the patch.

        Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/95//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12492106/HADOOP-7589-V1.patch against trunk revision . +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 4 new or modified tests. -1 patch. The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/95//console This message is automatically generated.
        Hide
        Robert Joseph Evans added a comment -

        This patch should apply to both trunk and 0.23.0 with no changes.

        Show
        Robert Joseph Evans added a comment - This patch should apply to both trunk and 0.23.0 with no changes.
        Hide
        Robert Joseph Evans added a comment -

        Quick patch to replace compile with test -DskipTests

        Show
        Robert Joseph Evans added a comment - Quick patch to replace compile with test -DskipTests

          People

          • Assignee:
            Robert Joseph Evans
            Reporter:
            Robert Joseph Evans
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development