ndimiduk commented on a change in pull request #1057: HBASE-23701 Try to 
converge automated checks around Category
URL: https://github.com/apache/hbase/pull/1057#discussion_r368194720
 
 

 ##########
 File path: 
hbase-common/src/test/java/org/apache/hadoop/hbase/HBaseClassTestRule.java
 ##########
 @@ -59,13 +65,17 @@ private HBaseClassTestRule(Class<?> clazz, Timeout 
timeout) {
 
   private static long getTimeoutInSeconds(Class<?> clazz) {
     Category[] categories = clazz.getAnnotationsByType(Category.class);
-    for (Class<?> c : categories[0].value()) {
-      if (c == SmallTests.class || c == MediumTests.class || c == 
LargeTests.class) {
-        // All tests have a 13 minutes timeout.
-        return TimeUnit.MINUTES.toSeconds(13);
-      }
-      if (c == IntegrationTests.class) {
-        return TimeUnit.MINUTES.toSeconds(Long.MAX_VALUE);
+
+    // @Category is not repeatable -- it is only possible to get an array of 
length zero or one.
+    if (categories.length == 1) {
 
 Review comment:
   nit: using `ArrayUtils.notEmpty` protects against an NPE.

----------------------------------------------------------------
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