[ https://issues.apache.org/jira/browse/HBASE-20136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16390358#comment-16390358 ]
Josh Elser commented on HBASE-20136: ------------------------------------ {noformat} Caused by: java.lang.ArrayIndexOutOfBoundsException: 0 at org.apache.hadoop.hbase.HBaseClassTestRuleChecker.testStarted(HBaseClassTestRuleChecker.java:45){noformat} This was caused by the addition in HBASE-20031. We should expand the RuleChecker to fail outwardly when there are no Categories for a test class (Because we *know* that should never be the case). I'm looking through the last PreCommit result for 20031 and think I see how we got here: [https://builds.apache.org/job/PreCommit-HBASE-Build/11600/console] * Yetus unit tests activate {{-PrunAllTests}} * TestKeyValue is skipped because it doesn't have a Test category * The HBaseClassTestRuleChecker doesn't see it (and fail) because the test isn't run This approach to checking for test-categories might just have some limitations to it... > TestKeyValue misses ClassRule and Category annotations > ------------------------------------------------------ > > Key: HBASE-20136 > URL: https://issues.apache.org/jira/browse/HBASE-20136 > Project: HBase > Issue Type: Test > Reporter: Ted Yu > Assignee: Ted Yu > Priority: Minor > Labels: CE > Attachments: 20136.v1.txt, 20136.v2.txt > > > 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. > {code} > mvn -B -nsu test -Dtest=TestKeyValue --projects :hbase-common > {code} > ArrayIndexOutOfBoundsException from HBaseClassTestRuleChecker was observed in > snippet from dump file: > {code} > # 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) > {code} > 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. -- This message was sent by Atlassian JIRA (v7.6.3#76005)