use of org.apache.geode.test.junit.IgnoreUntil in project geode by apache.
the class IgnoreUntilRule method throwOnIgnoreTest.
protected Statement throwOnIgnoreTest(Statement statement, Description description) {
if (isTest(description)) {
boolean ignoreTest = false;
String message = "";
IgnoreUntil testCaseAnnotation = description.getAnnotation(IgnoreUntil.class);
if (testCaseAnnotation != null) {
ignoreTest = evaluate(testCaseAnnotation, description);
message = testCaseAnnotation.value();
} else if (description.getTestClass().isAnnotationPresent(IgnoreUntil.class)) {
IgnoreUntil testClassAnnotation = description.getTestClass().getAnnotation(IgnoreUntil.class);
ignoreTest = evaluate(testClassAnnotation, description);
message = testClassAnnotation.value();
}
if (ignoreTest) {
throw new AssumptionViolatedException(format(message, description));
}
}
return statement;
}
Aggregations