mirror of https://github.com/apache/lucene.git
Don't print seed notes on assumption errors.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1303578 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9bff9fd790
commit
0e3af80452
|
@ -23,6 +23,7 @@ import java.lang.Thread.UncaughtExceptionHandler;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.junit.internal.AssumptionViolatedException;
|
||||||
import org.junit.rules.TestRule;
|
import org.junit.rules.TestRule;
|
||||||
import org.junit.runner.Description;
|
import org.junit.runner.Description;
|
||||||
import org.junit.runners.model.MultipleFailureException;
|
import org.junit.runners.model.MultipleFailureException;
|
||||||
|
@ -85,7 +86,7 @@ public class UncaughtExceptionsRule implements TestRule {
|
||||||
uncaughtExceptions.clear();
|
uncaughtExceptions.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!errors.isEmpty()) {
|
if (hasNonAssumptionErrors(errors)) {
|
||||||
if (ltc == null) {
|
if (ltc == null) {
|
||||||
// class level failure (e.g. afterclass)
|
// class level failure (e.g. afterclass)
|
||||||
LuceneTestCase.reportPartialFailureInfo();
|
LuceneTestCase.reportPartialFailureInfo();
|
||||||
|
@ -99,6 +100,15 @@ public class UncaughtExceptionsRule implements TestRule {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean hasNonAssumptionErrors(ArrayList<Throwable> errors) {
|
||||||
|
for (Throwable t : errors) {
|
||||||
|
if (!(t instanceof AssumptionViolatedException)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Just a check if anything's been caught.
|
* Just a check if anything's been caught.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue