mirror of https://github.com/apache/lucene.git
Cleanup on tearDown to really reset the TokenStream API to the default
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@806949 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
47ddf173a7
commit
22311453db
|
@ -58,6 +58,12 @@ public abstract class BaseTokenStreamTestCase extends LuceneTestCase {
|
|||
TokenStream.setOnlyUseNewAPI(onlyUseNewAPI);
|
||||
}
|
||||
|
||||
// @Override
|
||||
protected void tearDown() throws Exception {
|
||||
TokenStream.setOnlyUseNewAPI(false);
|
||||
super.tearDown();
|
||||
}
|
||||
|
||||
// @Override
|
||||
public void runBare() throws Throwable {
|
||||
// Do the test with onlyUseNewAPI=false (default)
|
||||
|
@ -65,7 +71,7 @@ public abstract class BaseTokenStreamTestCase extends LuceneTestCase {
|
|||
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 @@ public abstract class BaseTokenStreamTestCase extends LuceneTestCase {
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue