don't suppress CMS exception details

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@951355 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2010-06-04 10:46:54 +00:00
parent efaaed44bd
commit 5189558edb
1 changed files with 10 additions and 8 deletions

View File

@ -193,6 +193,16 @@ public class LuceneTestCaseJ4 {
public void tearDown() throws Exception {
BooleanQuery.setMaxClauseCount(savedBoolMaxClauseCount);
try {
if (!uncaughtExceptions.isEmpty()) {
System.err.println("The following exceptions were thrown by threads:");
for (UncaughtExceptionEntry entry : uncaughtExceptions) {
System.err.println("*** Thread: " + entry.thread.getName() + " ***");
entry.exception.printStackTrace(System.err);
}
fail("Some threads threw uncaught exceptions!");
}
// calling assertSaneFieldCaches here isn't as useful as having test
// classes call it directly from the scope where the index readers
// are used, because they could be gc'ed just before this tearDown
@ -218,14 +228,6 @@ public class LuceneTestCaseJ4 {
}
Thread.setDefaultUncaughtExceptionHandler(savedUncaughtExceptionHandler);
if (!uncaughtExceptions.isEmpty()) {
System.err.println("The following exceptions were thrown by threads:");
for (UncaughtExceptionEntry entry : uncaughtExceptions) {
System.err.println("*** Thread: " + entry.thread.getName() + " ***");
entry.exception.printStackTrace(System.err);
}
fail("Some threads throwed uncaught exceptions!");
}
}
/**