HBASE-19956 Remove category as a consideration timing out tests; set all test to timeout at 10minutes regardless
This commit is contained in:
parent
8f1e01b6e5
commit
c93ba37dfc
|
@ -57,20 +57,9 @@ public final class HBaseClassTestRule implements TestRule {
|
||||||
|
|
||||||
private static long getTimeoutInSeconds(Class<?> clazz) {
|
private static long getTimeoutInSeconds(Class<?> clazz) {
|
||||||
Category[] categories = clazz.getAnnotationsByType(Category.class);
|
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()) {
|
for (Class<?> c : categories[0].value()) {
|
||||||
if (c == SmallTests.class) {
|
if (c == SmallTests.class || c == MediumTests.class || c == LargeTests.class) {
|
||||||
// See SmallTests. Supposed to run 15 seconds.
|
// All tests have a 10minute timeout.
|
||||||
// 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.
|
|
||||||
return TimeUnit.MINUTES.toSeconds(10);
|
return TimeUnit.MINUTES.toSeconds(10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
<license.bundles.jquery>true</license.bundles.jquery>
|
<license.bundles.jquery>true</license.bundles.jquery>
|
||||||
</properties>
|
</properties>
|
||||||
<build>
|
<build>
|
||||||
<!-- Makes sure the resources get added before they are processed
|
<!-- Make sure resources get added before they are processed
|
||||||
by placing this first -->
|
by placing this first -->
|
||||||
<resources>
|
<resources>
|
||||||
<!-- Add the build webabpps to the classpth -->
|
<!-- Add the build webabpps to the classpth -->
|
||||||
|
|
Loading…
Reference in New Issue