Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-20136

TestKeyValue misses ClassRule and Category annotations

    XMLWordPrintableJSON

    Details

    • Type: Test
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.0, 2.2.0, 2.1.2, 2.0.4
    • Component/s: None
    • Labels:
    • Hadoop Flags:
      Reviewed

      Description

      hbase-common/src/test/java/org/apache/hadoop/hbase/TestKeyValue.java misses ClassRule and Category annotations.

      TestKeyValue was flagged by internal RE which used mvn command that is different from what Apache Jenkins uses.

      mvn -B -nsu test -Dtest=TestKeyValue --projects :hbase-common
      

      ArrayIndexOutOfBoundsException from HBaseClassTestRuleChecker was observed in snippet from dump file:

      # Created on 2018-03-05T22:25:50.252
      org.apache.maven.surefire.testset.TestSetFailedException: Test mechanism :: 0
      	at org.apache.maven.surefire.common.junit4.JUnit4RunListener.rethrowAnyTestMechanismFailures(JUnit4RunListener.java:223)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:168)
      	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:373)
      	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:334)
      	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:119)
      	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:407)
      Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
      	at org.apache.hadoop.hbase.HBaseClassTestRuleChecker.testStarted(HBaseClassTestRuleChecker.java:45)
      	at org.junit.runner.notification.RunNotifier$3.notifyListener(RunNotifier.java:121)
      	at org.junit.runner.notification.RunNotifier$SafeNotifier.run(RunNotifier.java:72)
      	at org.junit.runner.notification.RunNotifier.fireTestStarted(RunNotifier.java:118)
      

      This issue adds the annotations to this test.
      The test passes with annotations added.

      I have searched code base but didn't find other test which misses test category.

        Attachments

        1. 20136.addendum
          0.8 kB
          Ted Yu
        2. 20136.v1.txt
          1 kB
          Ted Yu
        3. 20136.v2.txt
          7 kB
          Ted Yu
        4. HBASE-20136.branch-2.001.patch
          8 kB
          Michael Stack

          Issue Links

            Activity

              People

              • Assignee:
                yuzhihong@gmail.com Ted Yu
                Reporter:
                yuzhihong@gmail.com Ted Yu
              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: