Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-8084 Sundry mapreduce improvements
  3. HBASE-8094

TestTableInputFormatScan doesn't assert anything

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.98.0, 0.95.0
    • mapreduce, test
    • None
    • Reviewed

    Description

      This test makes assertions from within the Reducer. These tests are not respected because the control harness asserts only that jobs complete, not that they succeed.

      Verify this is true by adding a failure to the reducer:

      $ git diff 
      diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableInputFormatScan.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableInputFormatScan.java
      index bab9633..322cb4f 100644
      --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableInputFormatScan.java
      +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableInputFormatScan.java
      @@ -160,6 +160,7 @@ public class TestTableInputFormatScan {
             if (lastRow != null && lastRow.length() > 0) {
               assertEquals(lastRow, last);
             }
      +      assertTrue(false);
           }
       
         }
      

      The test still passes.

      Attachments

        Issue Links

          Activity

            People

              ndimiduk Nick Dimiduk
              ndimiduk Nick Dimiduk
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: