busbey commented on a change in pull request #1052: HBASE-23695 Fail gracefully 
if no category is present
URL: https://github.com/apache/hbase/pull/1052#discussion_r367200547
 
 

 ##########
 File path: 
hbase-common/src/test/java/org/apache/hadoop/hbase/HBaseClassTestRuleChecker.java
 ##########
 @@ -41,9 +41,12 @@
   @Override
   public void testStarted(Description description) throws Exception {
     Category[] categories = 
description.getTestClass().getAnnotationsByType(Category.class);
-    for (Class<?> c : categories[0].value()) {
-      if (c == IntegrationTests.class) {
-        return;
+    // Don't fail if there is a missing category
+    if (categories.length > 0) {
+      for (Class<?> c : categories[0].value()) {
 
 Review comment:
   Shouldn't we check all the categories instead of the first?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to