You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@lucene.apache.org by us...@apache.org on 2009/08/23 12:17:09 UTC

svn commit: r806949 - /lucene/java/trunk/src/test/org/apache/lucene/analysis/BaseTokenStreamTestCase.java

Author: uschindler
Date: Sun Aug 23 10:17:09 2009
New Revision: 806949

URL: http://svn.apache.org/viewvc?rev=806949&view=rev
Log:
Cleanup on tearDown to really reset the TokenStream API to the default

Modified:
    lucene/java/trunk/src/test/org/apache/lucene/analysis/BaseTokenStreamTestCase.java

Modified: lucene/java/trunk/src/test/org/apache/lucene/analysis/BaseTokenStreamTestCase.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/analysis/BaseTokenStreamTestCase.java?rev=806949&r1=806948&r2=806949&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/analysis/BaseTokenStreamTestCase.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/analysis/BaseTokenStreamTestCase.java Sun Aug 23 10:17:09 2009
@@ -59,13 +59,19 @@
   }
 
   // @Override
+  protected void tearDown() throws Exception {
+    TokenStream.setOnlyUseNewAPI(false);
+    super.tearDown();
+  }
+
+  // @Override
   public void runBare() throws Throwable {
     // Do the test with onlyUseNewAPI=false (default)
     try {
       onlyUseNewAPI = false;
       super.runBare();
     } catch (Throwable e) {
-      System.out.println("Test failure of "+getName()+" occurred with onlyUseNewAPI=false");
+      System.out.println("Test failure of '"+getName()+"' occurred with onlyUseNewAPI=false");
       throw e;
     }
 
@@ -75,7 +81,7 @@
         onlyUseNewAPI = true;
         super.runBare();
       } catch (Throwable e) {
-        System.out.println("Test failure of "+getName()+" occurred with onlyUseNewAPI=true");
+        System.out.println("Test failure of '"+getName()+"' occurred with onlyUseNewAPI=true");
         throw e;
       }
     }