LUCENE-5635: don't try to use CrankyTokenFilter in TestRandomChains

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1591629 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2014-05-01 12:04:38 +00:00
parent e6582aa850
commit 9ee1dcf40a
2 changed files with 4 additions and 1 deletions

View File

@ -47,6 +47,7 @@ import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.BaseTokenStreamTestCase;
import org.apache.lucene.analysis.CachingTokenFilter;
import org.apache.lucene.analysis.CharFilter;
import org.apache.lucene.analysis.CrankyTokenFilter;
import org.apache.lucene.analysis.MockGraphTokenFilter;
import org.apache.lucene.analysis.MockRandomLookaheadTokenFilter;
import org.apache.lucene.analysis.MockTokenFilter;
@ -141,6 +142,8 @@ public class TestRandomChains extends BaseTokenStreamTestCase {
// offsets offenders?
// doesn't actual reset itself!
CachingTokenFilter.class,
// Not broken, simulates brokenness:
CrankyTokenFilter.class,
// Not broken: we forcefully add this, so we shouldn't
// also randomly pick it:
ValidatingTokenFilter.class)) {

View File

@ -26,7 +26,7 @@ import java.util.Random;
* This can be used to simulate a buggy analyzer in IndexWriter,
* where we must delete the document but not abort everything in the buffer.
*/
public class CrankyTokenFilter extends TokenFilter {
public final class CrankyTokenFilter extends TokenFilter {
final Random random;
int thingToDo;