mirror of https://github.com/apache/lucene.git
fix test to catch any Throwable, not just IOExc, and then print the IW infoStream
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1700068 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5b6f1390ba
commit
85b6c90b3a
|
@ -228,29 +228,29 @@ public abstract class BaseLockFactoryTestCase extends LuceneTestCase {
|
|||
// obtains, across IndexReader &
|
||||
// IndexWriters should be "fair" (ie
|
||||
// FIFO).
|
||||
} catch (Exception e) {
|
||||
} catch (Throwable t) {
|
||||
hitException = true;
|
||||
System.out.println("Stress Test Index Writer: creation hit unexpected exception: " + e.toString());
|
||||
e.printStackTrace(System.out);
|
||||
System.out.println("Stress Test Index Writer: creation hit unexpected exception: " + t.toString());
|
||||
t.printStackTrace(System.out);
|
||||
System.out.println(toString(baos));
|
||||
break;
|
||||
}
|
||||
if (writer != null) {
|
||||
try {
|
||||
addDoc(writer);
|
||||
} catch (IOException e) {
|
||||
} catch (Throwable t) {
|
||||
hitException = true;
|
||||
System.out.println("Stress Test Index Writer: addDoc hit unexpected exception: " + e.toString());
|
||||
e.printStackTrace(System.out);
|
||||
System.out.println("Stress Test Index Writer: addDoc hit unexpected exception: " + t.toString());
|
||||
t.printStackTrace(System.out);
|
||||
System.out.println(toString(baos));
|
||||
break;
|
||||
}
|
||||
try {
|
||||
writer.close();
|
||||
} catch (IOException e) {
|
||||
} catch (Throwable t) {
|
||||
hitException = true;
|
||||
System.out.println("Stress Test Index Writer: close hit unexpected exception: " + e.toString());
|
||||
e.printStackTrace(System.out);
|
||||
System.out.println("Stress Test Index Writer: close hit unexpected exception: " + t.toString());
|
||||
t.printStackTrace(System.out);
|
||||
System.out.println(toString(baos));
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue