Hadoop Common
  1. Hadoop Common
  2. HADOOP-6971

Clover build doesn't generate per-test coverage

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.20.3, 0.21.1, 0.22.0
    • Fix Version/s: 0.21.1
    • Component/s: build, test
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Release Note:
      This fix requires that test coverage is running under Clover 3.0+

      Description

      Because of the way the structure of Hadoop's builds is done Clover can't properly detect test classes among the sources. As the result clover reports are incomplete and do not provide viral per-test coverage info.

      1. HADOOP-6971.y20S.patch
        0.5 kB
        Konstantin Boudnik
      2. HADOOP-6971.patch
        0.4 kB
        Konstantin Boudnik

        Issue Links

          Activity

          Hide
          Konstantin Boudnik added a comment -

          Code coverage reports provided by Clover runs (e.g. here show the information about covered classes, methods, and so on.
          However, no tests info is shown. It simply says

          Test Results   0 / 0 tests 0 secs
          No test results could be found. Please ensure that you have instrumented your unit tests correctly.
          

          Apparently, Clover can't find and instrumented any tests classes in the source code.
          Same issues is found in HDFS and MR.

          Show
          Konstantin Boudnik added a comment - Code coverage reports provided by Clover runs (e.g. here show the information about covered classes, methods, and so on. However, no tests info is shown. It simply says Test Results 0 / 0 tests 0 secs No test results could be found. Please ensure that you have instrumented your unit tests correctly. Apparently, Clover can't find and instrumented any tests classes in the source code. Same issues is found in HDFS and MR.
          Hide
          Konstantin Boudnik added a comment -

          Fix for the problem

          Show
          Konstantin Boudnik added a comment - Fix for the problem
          Hide
          Konstantin Boudnik added a comment -

          Patch for y20-security (should work for 0.20 branch as well).

          Show
          Konstantin Boudnik added a comment - Patch for y20-security (should work for 0.20 branch as well).
          Hide
          Konstantin Boudnik added a comment -

          I have ran patched build and can confirm that it works both for 0.20 branch and 0.22 Common - all tests are running as expected (some are failing, but they are failing for a long time). There's no way to verify it via test-patch so I think it just has to be committed as is.

          Show
          Konstantin Boudnik added a comment - I have ran patched build and can confirm that it works both for 0.20 branch and 0.22 Common - all tests are running as expected (some are failing, but they are failing for a long time). There's no way to verify it via test-patch so I think it just has to be committed as is.
          Hide
          Giridharan Kesavan added a comment -

          +1 Looks good.
          Tested on 0.21 and 0.22

          Show
          Giridharan Kesavan added a comment - +1 Looks good. Tested on 0.21 and 0.22
          Hide
          Konstantin Boudnik added a comment -

          I have committed this to the trunk and 0.21.

          This chance requires Clover 3.0+ to be used for test coverage runs.

          Show
          Konstantin Boudnik added a comment - I have committed this to the trunk and 0.21. This chance requires Clover 3.0+ to be used for test coverage runs.
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Common-trunk-Commit #395 (See https://hudson.apache.org/hudson/job/Hadoop-Common-trunk-Commit/395/)

          Show
          Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #395 (See https://hudson.apache.org/hudson/job/Hadoop-Common-trunk-Commit/395/ )
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Common-trunk #489 (See https://hudson.apache.org/hudson/job/Hadoop-Common-trunk/489/)

          Show
          Hudson added a comment - Integrated in Hadoop-Common-trunk #489 (See https://hudson.apache.org/hudson/job/Hadoop-Common-trunk/489/ )

            People

            • Assignee:
              Konstantin Boudnik
              Reporter:
              Konstantin Boudnik
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development