From 85b6c90b3a74cf1592ad0b1159451e45e9e5a6ce Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Sat, 29 Aug 2015 18:56:05 +0000 Subject: [PATCH] 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 --- .../lucene/store/BaseLockFactoryTestCase.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lucene/test-framework/src/java/org/apache/lucene/store/BaseLockFactoryTestCase.java b/lucene/test-framework/src/java/org/apache/lucene/store/BaseLockFactoryTestCase.java index adff0cc1f9f..fc538283554 100644 --- a/lucene/test-framework/src/java/org/apache/lucene/store/BaseLockFactoryTestCase.java +++ b/lucene/test-framework/src/java/org/apache/lucene/store/BaseLockFactoryTestCase.java @@ -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; }