From cc28c58079f94b2b9a6ad99e4474790251b9971e Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Wed, 7 Feb 2018 19:27:49 -0800 Subject: [PATCH] HBASE-19956 Remove category as a consideration timing out tests; set all test to timeout at 10minutes regardless --- .../java/org/apache/hadoop/hbase/HBaseClassTestRule.java | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/hbase-common/src/test/java/org/apache/hadoop/hbase/HBaseClassTestRule.java b/hbase-common/src/test/java/org/apache/hadoop/hbase/HBaseClassTestRule.java index 734ce3f241..bcde826020 100644 --- a/hbase-common/src/test/java/org/apache/hadoop/hbase/HBaseClassTestRule.java +++ b/hbase-common/src/test/java/org/apache/hadoop/hbase/HBaseClassTestRule.java @@ -57,20 +57,9 @@ public final class HBaseClassTestRule implements TestRule { private static long getTimeoutInSeconds(Class clazz) { Category[] categories = clazz.getAnnotationsByType(Category.class); - if (categories.length == 0) { - throw new IllegalArgumentException(clazz.getName() + " is not annotated with @Category"); - } for (Class c : categories[0].value()) { - if (c == SmallTests.class) { - // See SmallTests. Supposed to run 15 seconds. - // Lots of these timeout on Jenkins... a stall of ten or twenty seconds mess up what looks - // fine when run local. - return 60; - } else if (c == MediumTests.class) { - // See MediumTests. Supposed to run 50 seconds. - return 180; - } else if (c == LargeTests.class) { - // Let large tests have a ten minute timeout. + if (c == SmallTests.class || c == MediumTests.class || c == LargeTests.class) { + // All tests have a 10minute timeout. return TimeUnit.MINUTES.toSeconds(10); } } -- 2.11.0 (Apple Git-81)