Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-713

Need to properly check the type of the test class from an aspect

    Details

    • Type: Test Test
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.22.0
    • Fix Version/s: 0.21.0
    • Component/s: None
    • Labels:
      None

      Description

      While the number of test cases using injection is constantly increasing it brings in more and more new test classes. In the current pipeline testing infrastructure inheritance of the classes becomes more complicated as well.

      The aspect for hflush() fault injection tests need to be more careful about casting of a test object and make sure that it is of a proper type beforehand.

      1. HDFS-713.patch
        1 kB
        Konstantin Boudnik
      2. HDFS-713.patch
        1 kB
        Konstantin Boudnik
      3. HDFS-713.patch
        1 kB
        Konstantin Boudnik

        Issue Links

          Activity

          Konstantin Boudnik created issue -
          Konstantin Boudnik made changes -
          Field Original Value New Value
          Link This issue relates to HDFS-518 [ HDFS-518 ]
          Hide
          Konstantin Boudnik added a comment -

          Patch forces a type validation in advance

          Show
          Konstantin Boudnik added a comment - Patch forces a type validation in advance
          Konstantin Boudnik made changes -
          Attachment HDFS-713.patch [ 12422418 ]
          Konstantin Boudnik made changes -
          Assignee Konstantin Boudnik [ cos ]
          Hide
          Konstantin Boudnik added a comment -

          One liner trivial fix

          Show
          Konstantin Boudnik added a comment - One liner trivial fix
          Konstantin Boudnik made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Hide
          Konstantin Boudnik added a comment -

          Slightly better version of the same patch

          Show
          Konstantin Boudnik added a comment - Slightly better version of the same patch
          Konstantin Boudnik made changes -
          Attachment HDFS-713.patch [ 12422590 ]
          Hide
          Konstantin Boudnik added a comment -

          Here's the result of test-patch run:

          There appear to be 104 release audit warnings before the patch and 104 release audit warnings after applying the patch.
          
          +1 overall.  
              +1 @author.  The patch does not contain any @author tags.
              +1 tests included.  The patch appears to include 3 new or modified tests.
              +1 javadoc.  The javadoc tool did not generate any warning messages.
              +1 javac.  The applied patch does not increase the total number of javac compiler warnings.
              +1 findbugs.  The patch does not introduce any new Findbugs warnings.
              +1 release audit.  The applied patch does not increase the total number of release audit warnings.
          
          Show
          Konstantin Boudnik added a comment - Here's the result of test-patch run: There appear to be 104 release audit warnings before the patch and 104 release audit warnings after applying the patch. +1 overall. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings.
          Hide
          Konstantin Boudnik added a comment -

          Also, have ran fault injection tests - everything works as expected:

              [junit] Running org.apache.hadoop.hdfs.TestFiHFlush
              [junit] Tests run: 9, Failures: 0, Errors: 0, Time elapsed: 19.173 sec
              [junit] Running org.apache.hadoop.hdfs.server.datanode.TestFiDataTransferProtocol
              [junit] Tests run: 16, Failures: 0, Errors: 0, Time elapsed: 207.648 sec
          
          Show
          Konstantin Boudnik added a comment - Also, have ran fault injection tests - everything works as expected: [junit] Running org.apache.hadoop.hdfs.TestFiHFlush [junit] Tests run: 9, Failures: 0, Errors: 0, Time elapsed: 19.173 sec [junit] Running org.apache.hadoop.hdfs.server.datanode.TestFiDataTransferProtocol [junit] Tests run: 16, Failures: 0, Errors: 0, Time elapsed: 207.648 sec
          Hide
          Tsz Wo Nicholas Sze added a comment -

          +1 patch looks good.

          Some thought: since hft may not be an instanceof HFlushTest, the variable name (hft, acronym of HFlushTest) may be misleading.

          Show
          Tsz Wo Nicholas Sze added a comment - +1 patch looks good. Some thought: since hft may not be an instanceof HFlushTest, the variable name (hft, acronym of HFlushTest) may be misleading.
          Hide
          Konstantin Boudnik added a comment -

          Thanks, Nicholas. I've renamed the variable - it makes sense.

          Show
          Konstantin Boudnik added a comment - Thanks, Nicholas. I've renamed the variable - it makes sense.
          Konstantin Boudnik made changes -
          Attachment HDFS-713.patch [ 12422613 ]
          Hide
          Konstantin Boudnik added a comment -

          I have just committed it.

          Show
          Konstantin Boudnik added a comment - I have just committed it.
          Konstantin Boudnik made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Fix Version/s 0.21.0 [ 12314046 ]
          Resolution Fixed [ 1 ]
          Hide
          Hudson added a comment -

          Integrated in Hdfs-Patch-h2.grid.sp2.yahoo.net #47 (See http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h2.grid.sp2.yahoo.net/47/)

          Show
          Hudson added a comment - Integrated in Hdfs-Patch-h2.grid.sp2.yahoo.net #47 (See http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h2.grid.sp2.yahoo.net/47/ )
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Hdfs-trunk-Commit #79 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Hdfs-trunk-Commit/79/)

          Show
          Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #79 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Hdfs-trunk-Commit/79/ )
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Hdfs-trunk #120 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Hdfs-trunk/120/)

          Show
          Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #120 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Hdfs-trunk/120/ )
          Hide
          Hudson added a comment -

          Integrated in Hdfs-Patch-h5.grid.sp2.yahoo.net #78 (See http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h5.grid.sp2.yahoo.net/78/)

          Show
          Hudson added a comment - Integrated in Hdfs-Patch-h5.grid.sp2.yahoo.net #78 (See http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h5.grid.sp2.yahoo.net/78/ )
          Tom White made changes -
          Fix Version/s 0.22.0 [ 12314241 ]
          Tom White made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development