mirror of https://github.com/apache/lucene.git
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:
parent
e6582aa850
commit
9ee1dcf40a
|
@ -47,6 +47,7 @@ import org.apache.lucene.analysis.Analyzer;
|
||||||
import org.apache.lucene.analysis.BaseTokenStreamTestCase;
|
import org.apache.lucene.analysis.BaseTokenStreamTestCase;
|
||||||
import org.apache.lucene.analysis.CachingTokenFilter;
|
import org.apache.lucene.analysis.CachingTokenFilter;
|
||||||
import org.apache.lucene.analysis.CharFilter;
|
import org.apache.lucene.analysis.CharFilter;
|
||||||
|
import org.apache.lucene.analysis.CrankyTokenFilter;
|
||||||
import org.apache.lucene.analysis.MockGraphTokenFilter;
|
import org.apache.lucene.analysis.MockGraphTokenFilter;
|
||||||
import org.apache.lucene.analysis.MockRandomLookaheadTokenFilter;
|
import org.apache.lucene.analysis.MockRandomLookaheadTokenFilter;
|
||||||
import org.apache.lucene.analysis.MockTokenFilter;
|
import org.apache.lucene.analysis.MockTokenFilter;
|
||||||
|
@ -141,6 +142,8 @@ public class TestRandomChains extends BaseTokenStreamTestCase {
|
||||||
// offsets offenders?
|
// offsets offenders?
|
||||||
// doesn't actual reset itself!
|
// doesn't actual reset itself!
|
||||||
CachingTokenFilter.class,
|
CachingTokenFilter.class,
|
||||||
|
// Not broken, simulates brokenness:
|
||||||
|
CrankyTokenFilter.class,
|
||||||
// Not broken: we forcefully add this, so we shouldn't
|
// Not broken: we forcefully add this, so we shouldn't
|
||||||
// also randomly pick it:
|
// also randomly pick it:
|
||||||
ValidatingTokenFilter.class)) {
|
ValidatingTokenFilter.class)) {
|
||||||
|
|
|
@ -26,7 +26,7 @@ import java.util.Random;
|
||||||
* This can be used to simulate a buggy analyzer in IndexWriter,
|
* This can be used to simulate a buggy analyzer in IndexWriter,
|
||||||
* where we must delete the document but not abort everything in the buffer.
|
* 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;
|
final Random random;
|
||||||
int thingToDo;
|
int thingToDo;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue