lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r921427 - /lucene/solr/trunk/src/test/org/apache/solr/analysis/
Date Wed, 10 Mar 2010 16:19:38 GMT
Author: markrmiller
Date: Wed Mar 10 16:19:37 2010
New Revision: 921427

URL: http://svn.apache.org/viewvc?rev=921427&view=rev
Log:
SOLR-1674: speed up analysis tests (thanks Robert Muir!)

Removed:
    lucene/solr/trunk/src/test/org/apache/solr/analysis/AnalysisTestCase.java
Modified:
    lucene/solr/trunk/src/test/org/apache/solr/analysis/BaseTokenTestCase.java
    lucene/solr/trunk/src/test/org/apache/solr/analysis/CommonGramsFilterFactoryTest.java
    lucene/solr/trunk/src/test/org/apache/solr/analysis/CommonGramsQueryFilterFactoryTest.java
    lucene/solr/trunk/src/test/org/apache/solr/analysis/SnowballPorterFilterFactoryTest.java
    lucene/solr/trunk/src/test/org/apache/solr/analysis/TestDelimitedPayloadTokenFilterFactory.java
    lucene/solr/trunk/src/test/org/apache/solr/analysis/TestDictionaryCompoundWordTokenFilterFactory.java
    lucene/solr/trunk/src/test/org/apache/solr/analysis/TestElisionFilterFactory.java
    lucene/solr/trunk/src/test/org/apache/solr/analysis/TestKeepFilterFactory.java
    lucene/solr/trunk/src/test/org/apache/solr/analysis/TestKeepWordFilter.java
    lucene/solr/trunk/src/test/org/apache/solr/analysis/TestReversedWildcardFilterFactory.java
    lucene/solr/trunk/src/test/org/apache/solr/analysis/TestStopFilterFactory.java
    lucene/solr/trunk/src/test/org/apache/solr/analysis/TestSynonymMap.java
    lucene/solr/trunk/src/test/org/apache/solr/analysis/TestWordDelimiterFilter.java

Modified: lucene/solr/trunk/src/test/org/apache/solr/analysis/BaseTokenTestCase.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/org/apache/solr/analysis/BaseTokenTestCase.java?rev=921427&r1=921426&r2=921427&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/org/apache/solr/analysis/BaseTokenTestCase.java (original)
+++ lucene/solr/trunk/src/test/org/apache/solr/analysis/BaseTokenTestCase.java Wed Mar 10
16:19:37 2010
@@ -20,6 +20,8 @@ package org.apache.solr.analysis;
 import java.io.IOException;
 import java.io.StringReader;
 
+import junit.framework.TestCase;
+
 import org.apache.lucene.analysis.Analyzer;
 import org.apache.lucene.analysis.TokenStream;
 import org.apache.lucene.analysis.tokenattributes.OffsetAttribute;
@@ -30,7 +32,7 @@ import org.apache.lucene.analysis.tokena
 /**
  * General token testing helper functions
  */
-public abstract class BaseTokenTestCase extends AnalysisTestCase
+public abstract class BaseTokenTestCase extends TestCase
 {
   // some helpers to test Analyzers and TokenStreams:
   // these are taken from Lucene's BaseTokenStreamTestCase

Modified: lucene/solr/trunk/src/test/org/apache/solr/analysis/CommonGramsFilterFactoryTest.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/org/apache/solr/analysis/CommonGramsFilterFactoryTest.java?rev=921427&r1=921426&r2=921427&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/org/apache/solr/analysis/CommonGramsFilterFactoryTest.java
(original)
+++ lucene/solr/trunk/src/test/org/apache/solr/analysis/CommonGramsFilterFactoryTest.java
Wed Mar 10 16:19:37 2010
@@ -20,8 +20,8 @@ package org.apache.solr.analysis;
 import org.apache.lucene.analysis.TokenStream;
 import org.apache.lucene.analysis.Tokenizer;
 import org.apache.lucene.analysis.WhitespaceTokenizer;
-import org.apache.solr.util.AbstractSolrTestCase;
 import org.apache.solr.common.ResourceLoader;
+import org.apache.solr.core.SolrResourceLoader;
 
 import java.io.StringReader;
 import java.util.Set;
@@ -34,16 +34,9 @@ import java.util.HashMap;
  * so this won't break if stop filter test files change
  **/
 public class CommonGramsFilterFactoryTest extends BaseTokenTestCase {
-  public String getSchemaFile() {
-    return "schema-stop-keep.xml";
-  }
-
-  public String getSolrConfigFile() {
-    return "solrconfig.xml";
-  }
 
   public void testInform() throws Exception {
-    ResourceLoader loader = solrConfig.getResourceLoader();
+    ResourceLoader loader = new SolrResourceLoader(null, null);
     assertTrue("loader is null and it shouldn't be", loader != null);
     CommonGramsFilterFactory factory = new CommonGramsFilterFactory();
     Map<String, String> args = new HashMap<String, String>();
@@ -75,7 +68,7 @@ public class CommonGramsFilterFactoryTes
    * If no words are provided, then a set of english default stopwords is used.
    */
   public void testDefaults() throws Exception {
-    ResourceLoader loader = solrConfig.getResourceLoader();
+    ResourceLoader loader = new SolrResourceLoader(null, null);
     assertTrue("loader is null and it shouldn't be", loader != null);
     CommonGramsFilterFactory factory = new CommonGramsFilterFactory();
     Map<String, String> args = new HashMap<String, String>();

Modified: lucene/solr/trunk/src/test/org/apache/solr/analysis/CommonGramsQueryFilterFactoryTest.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/org/apache/solr/analysis/CommonGramsQueryFilterFactoryTest.java?rev=921427&r1=921426&r2=921427&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/org/apache/solr/analysis/CommonGramsQueryFilterFactoryTest.java
(original)
+++ lucene/solr/trunk/src/test/org/apache/solr/analysis/CommonGramsQueryFilterFactoryTest.java
Wed Mar 10 16:19:37 2010
@@ -20,6 +20,7 @@ import org.apache.lucene.analysis.TokenS
 import org.apache.lucene.analysis.Tokenizer;
 import org.apache.lucene.analysis.WhitespaceTokenizer;
 import org.apache.solr.common.ResourceLoader;
+import org.apache.solr.core.SolrResourceLoader;
 
 import java.io.StringReader;
 import java.util.Set;
@@ -32,16 +33,9 @@ import java.util.HashMap;
  * so this won't break if stop filter test files change
  **/
 public class CommonGramsQueryFilterFactoryTest extends BaseTokenTestCase {
-  public String getSchemaFile() {
-    return "schema-stop-keep.xml";
-  }
-
-  public String getSolrConfigFile() {
-    return "solrconfig.xml";
-  }
 
   public void testInform() throws Exception {
-    ResourceLoader loader = solrConfig.getResourceLoader();
+    ResourceLoader loader = new SolrResourceLoader(null, null);
     assertTrue("loader is null and it shouldn't be", loader != null);
     CommonGramsQueryFilterFactory factory = new CommonGramsQueryFilterFactory();
     Map<String, String> args = new HashMap<String, String>();
@@ -73,7 +67,7 @@ public class CommonGramsQueryFilterFacto
    * If no words are provided, then a set of english default stopwords is used.
    */
   public void testDefaults() throws Exception {
-    ResourceLoader loader = solrConfig.getResourceLoader();
+    ResourceLoader loader = new SolrResourceLoader(null, null);
     assertTrue("loader is null and it shouldn't be", loader != null);
     CommonGramsQueryFilterFactory factory = new CommonGramsQueryFilterFactory();
     Map<String, String> args = new HashMap<String, String>();

Modified: lucene/solr/trunk/src/test/org/apache/solr/analysis/SnowballPorterFilterFactoryTest.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/org/apache/solr/analysis/SnowballPorterFilterFactoryTest.java?rev=921427&r1=921426&r2=921427&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/org/apache/solr/analysis/SnowballPorterFilterFactoryTest.java
(original)
+++ lucene/solr/trunk/src/test/org/apache/solr/analysis/SnowballPorterFilterFactoryTest.java
Wed Mar 10 16:19:37 2010
@@ -21,6 +21,7 @@ import org.apache.lucene.analysis.Tokeni
 import org.apache.lucene.analysis.WhitespaceTokenizer;
 import org.apache.solr.common.ResourceLoader;
 import org.apache.solr.common.util.StrUtils;
+import org.apache.solr.core.SolrResourceLoader;
 import org.tartarus.snowball.ext.EnglishStemmer;
 
 import java.io.IOException;
@@ -114,7 +115,7 @@ public class SnowballPorterFilterFactory
    */
   public void testProtected() throws Exception {
     SnowballPorterFilterFactory factory = new SnowballPorterFilterFactory();
-    ResourceLoader loader = solrConfig.getResourceLoader();
+    ResourceLoader loader = new SolrResourceLoader(null, null);
     Map<String,String> args = new HashMap<String,String>();
     args.put("protected", "protwords.txt");
     args.put("language", "English");

Modified: lucene/solr/trunk/src/test/org/apache/solr/analysis/TestDelimitedPayloadTokenFilterFactory.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/org/apache/solr/analysis/TestDelimitedPayloadTokenFilterFactory.java?rev=921427&r1=921426&r2=921427&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/org/apache/solr/analysis/TestDelimitedPayloadTokenFilterFactory.java
(original)
+++ lucene/solr/trunk/src/test/org/apache/solr/analysis/TestDelimitedPayloadTokenFilterFactory.java
Wed Mar 10 16:19:37 2010
@@ -23,36 +23,23 @@ import java.util.Map;
 
 import junit.framework.TestCase;
 
-import org.apache.lucene.analysis.Token;
 import org.apache.lucene.analysis.TokenStream;
 import org.apache.lucene.analysis.WhitespaceTokenizer;
-import org.apache.lucene.analysis.tokenattributes.PayloadAttribute;
-import org.apache.lucene.analysis.payloads.FloatEncoder;
 import org.apache.lucene.analysis.payloads.DelimitedPayloadTokenFilter;
+import org.apache.lucene.analysis.payloads.FloatEncoder;
 import org.apache.lucene.analysis.payloads.PayloadHelper;
-import org.apache.lucene.util.Attribute;
-import org.apache.solr.core.SolrCore;
-import org.apache.solr.core.SolrResourceLoader;
+import org.apache.lucene.analysis.tokenattributes.PayloadAttribute;
 import org.apache.solr.common.ResourceLoader;
-import org.apache.solr.util.AbstractSolrTestCase;
-
-public class TestDelimitedPayloadTokenFilterFactory extends AbstractSolrTestCase{
-
-
-  public String getSchemaFile() {
-    return "schema.xml";
-  }
+import org.apache.solr.core.SolrResourceLoader;
 
-  public String getSolrConfigFile() {
-    return "solrconfig.xml";
-  }
+public class TestDelimitedPayloadTokenFilterFactory extends TestCase {
 
   public void testEncoder() throws Exception {
     Map<String,String> args = new HashMap<String, String>();
     args.put(DelimitedPayloadTokenFilterFactory.ENCODER_ATTR, "float");
     DelimitedPayloadTokenFilterFactory factory = new DelimitedPayloadTokenFilterFactory();
     factory.init(args);
-    ResourceLoader loader = h.getCore().getResourceLoader();
+    ResourceLoader loader = new SolrResourceLoader(null, null);
     factory.inform(loader);
 
     TokenStream input = new WhitespaceTokenizer(new StringReader("the|0.1 quick|0.1 red|0.1"));
@@ -74,7 +61,7 @@ public class TestDelimitedPayloadTokenFi
     args.put(DelimitedPayloadTokenFilterFactory.DELIMITER_ATTR, "*");
     DelimitedPayloadTokenFilterFactory factory = new DelimitedPayloadTokenFilterFactory();
     factory.init(args);
-    ResourceLoader loader = h.getCore().getResourceLoader();
+    ResourceLoader loader = new SolrResourceLoader(null, null);
     factory.inform(loader);
 
     TokenStream input = new WhitespaceTokenizer(new StringReader("the*0.1 quick*0.1 red*0.1"));

Modified: lucene/solr/trunk/src/test/org/apache/solr/analysis/TestDictionaryCompoundWordTokenFilterFactory.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/org/apache/solr/analysis/TestDictionaryCompoundWordTokenFilterFactory.java?rev=921427&r1=921426&r2=921427&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/org/apache/solr/analysis/TestDictionaryCompoundWordTokenFilterFactory.java
(original)
+++ lucene/solr/trunk/src/test/org/apache/solr/analysis/TestDictionaryCompoundWordTokenFilterFactory.java
Wed Mar 10 16:19:37 2010
@@ -26,6 +26,7 @@ import org.apache.lucene.analysis.TokenS
 import org.apache.lucene.analysis.Tokenizer;
 import org.apache.lucene.analysis.WhitespaceTokenizer;
 import org.apache.solr.common.ResourceLoader;
+import org.apache.solr.core.SolrResourceLoader;
 
 /**
  * Simple tests to ensure the Dictionary compound filter factory is working.
@@ -38,7 +39,7 @@ public class TestDictionaryCompoundWordT
     Reader reader = new StringReader("I like to play softball");
     Tokenizer tokenizer = new WhitespaceTokenizer(reader);
     DictionaryCompoundWordTokenFilterFactory factory = new DictionaryCompoundWordTokenFilterFactory();
-    ResourceLoader loader = solrConfig.getResourceLoader();
+    ResourceLoader loader = new SolrResourceLoader(null, null);
     Map<String,String> args = new HashMap<String,String>();
     args.put("dictionary", "compoundDictionary.txt");
     factory.init(args);

Modified: lucene/solr/trunk/src/test/org/apache/solr/analysis/TestElisionFilterFactory.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/org/apache/solr/analysis/TestElisionFilterFactory.java?rev=921427&r1=921426&r2=921427&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/org/apache/solr/analysis/TestElisionFilterFactory.java (original)
+++ lucene/solr/trunk/src/test/org/apache/solr/analysis/TestElisionFilterFactory.java Wed
Mar 10 16:19:37 2010
@@ -26,6 +26,7 @@ import org.apache.lucene.analysis.TokenS
 import org.apache.lucene.analysis.Tokenizer;
 import org.apache.lucene.analysis.WhitespaceTokenizer;
 import org.apache.solr.common.ResourceLoader;
+import org.apache.solr.core.SolrResourceLoader;
 
 /**
  * Simple tests to ensure the French elision filter factory is working.
@@ -38,7 +39,7 @@ public class TestElisionFilterFactory ex
     Reader reader = new StringReader("l'avion");
     Tokenizer tokenizer = new WhitespaceTokenizer(reader);
     ElisionFilterFactory factory = new ElisionFilterFactory();
-    ResourceLoader loader = solrConfig.getResourceLoader();
+    ResourceLoader loader = new SolrResourceLoader(null, null);
     Map<String,String> args = new HashMap<String,String>();
     args.put("articles", "frenchArticles.txt");
     factory.init(args);

Modified: lucene/solr/trunk/src/test/org/apache/solr/analysis/TestKeepFilterFactory.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/org/apache/solr/analysis/TestKeepFilterFactory.java?rev=921427&r1=921426&r2=921427&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/org/apache/solr/analysis/TestKeepFilterFactory.java (original)
+++ lucene/solr/trunk/src/test/org/apache/solr/analysis/TestKeepFilterFactory.java Wed Mar
10 16:19:37 2010
@@ -16,29 +16,24 @@ package org.apache.solr.analysis;
  * limitations under the License.
  */
 
-import org.apache.solr.util.AbstractSolrTestCase;
 import org.apache.solr.common.ResourceLoader;
+import org.apache.solr.core.SolrResourceLoader;
 
 import java.util.Set;
 import java.util.Map;
 import java.util.HashMap;
 
+import junit.framework.TestCase;
+
 
 /**
  *
  *
  **/
-public class TestKeepFilterFactory extends AbstractSolrTestCase{
-  public String getSchemaFile() {
-    return "schema-stop-keep.xml";
-  }
-
-  public String getSolrConfigFile() {
-    return "solrconfig.xml";
-  }
+public class TestKeepFilterFactory extends TestCase{
 
   public void testInform() throws Exception {
-    ResourceLoader loader = solrConfig.getResourceLoader();
+    ResourceLoader loader = new SolrResourceLoader(null, null);
     assertTrue("loader is null and it shouldn't be", loader != null);
     KeepWordFilterFactory factory = new KeepWordFilterFactory();
     Map<String, String> args = new HashMap<String, String>();

Modified: lucene/solr/trunk/src/test/org/apache/solr/analysis/TestKeepWordFilter.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/org/apache/solr/analysis/TestKeepWordFilter.java?rev=921427&r1=921426&r2=921427&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/org/apache/solr/analysis/TestKeepWordFilter.java (original)
+++ lucene/solr/trunk/src/test/org/apache/solr/analysis/TestKeepWordFilter.java Wed Mar 10
16:19:37 2010
@@ -25,6 +25,8 @@ import java.util.Set;
 
 import org.apache.lucene.analysis.TokenStream;
 import org.apache.lucene.analysis.WhitespaceTokenizer;
+import org.apache.solr.common.ResourceLoader;
+import org.apache.solr.core.SolrResourceLoader;
 
 
 /**
@@ -40,13 +42,13 @@ public class TestKeepWordFilter extends 
     
     String input = "aaa BBB ccc ddd EEE";
     Map<String,String> args = new HashMap<String, String>();
-
+    ResourceLoader loader = new SolrResourceLoader(null, null);
     
     // Test Stopwords
     KeepWordFilterFactory factory = new KeepWordFilterFactory();
     args.put( "ignoreCase", "true" );
     factory.init( args );
-    factory.inform( solrConfig.getResourceLoader() );
+    factory.inform( loader );
     factory.setWords( words );
     assertTrue(factory.isIgnoreCase());
     TokenStream stream = factory.create(new WhitespaceTokenizer(new StringReader(input)));
@@ -56,7 +58,7 @@ public class TestKeepWordFilter extends 
     factory = new KeepWordFilterFactory();
     args = new HashMap<String, String>();
     factory.init( args );
-    factory.inform( solrConfig.getResourceLoader() );
+    factory.inform( loader );
     factory.setIgnoreCase(true);
     factory.setWords( words );
     assertTrue(factory.isIgnoreCase());
@@ -67,7 +69,7 @@ public class TestKeepWordFilter extends 
     args = new HashMap<String, String>();
     args.put( "ignoreCase", "false" );
     factory.init( args );
-    factory.inform( solrConfig.getResourceLoader() );
+    factory.inform( loader );
     assertFalse(factory.isIgnoreCase());
     stream = factory.create(new WhitespaceTokenizer(new StringReader(input)));
     assertTokenStreamContents(stream, new String[] { "aaa" });

Modified: lucene/solr/trunk/src/test/org/apache/solr/analysis/TestReversedWildcardFilterFactory.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/org/apache/solr/analysis/TestReversedWildcardFilterFactory.java?rev=921427&r1=921426&r2=921427&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/org/apache/solr/analysis/TestReversedWildcardFilterFactory.java
(original)
+++ lucene/solr/trunk/src/test/org/apache/solr/analysis/TestReversedWildcardFilterFactory.java
Wed Mar 10 16:19:37 2010
@@ -30,8 +30,11 @@ import org.apache.lucene.queryParser.Par
 import org.apache.lucene.search.Query;
 import org.apache.solr.schema.IndexSchema;
 import org.apache.solr.search.SolrQueryParser;
+import org.apache.solr.util.AbstractSolrTestCase;
 
-public class TestReversedWildcardFilterFactory extends BaseTokenTestCase {
+import static org.apache.solr.analysis.BaseTokenTestCase.*;
+
+public class TestReversedWildcardFilterFactory extends AbstractSolrTestCase {
   Map<String,String> args = new HashMap<String, String>();
   ReversedWildcardFilterFactory factory = new ReversedWildcardFilterFactory();
   IndexSchema schema;

Modified: lucene/solr/trunk/src/test/org/apache/solr/analysis/TestStopFilterFactory.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/org/apache/solr/analysis/TestStopFilterFactory.java?rev=921427&r1=921426&r2=921427&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/org/apache/solr/analysis/TestStopFilterFactory.java (original)
+++ lucene/solr/trunk/src/test/org/apache/solr/analysis/TestStopFilterFactory.java Wed Mar
10 16:19:37 2010
@@ -17,29 +17,24 @@ package org.apache.solr.analysis;
  */
 
 
-import org.apache.solr.util.AbstractSolrTestCase;
 import org.apache.solr.common.ResourceLoader;
+import org.apache.solr.core.SolrResourceLoader;
 
 import java.util.Set;
 import java.util.Map;
 import java.util.HashMap;
 
+import junit.framework.TestCase;
+
 
 /**
  *
  *
  **/
-public class TestStopFilterFactory extends AbstractSolrTestCase{
-  public String getSchemaFile() {
-    return "schema-stop-keep.xml";
-  }
-
-  public String getSolrConfigFile() {
-    return "solrconfig.xml";
-  }
+public class TestStopFilterFactory extends TestCase {
 
   public void testInform() throws Exception {
-    ResourceLoader loader = solrConfig.getResourceLoader();
+    ResourceLoader loader = new SolrResourceLoader(null, null);
     assertTrue("loader is null and it shouldn't be", loader != null);
     StopFilterFactory factory = new StopFilterFactory();
     Map<String, String> args = new HashMap<String, String>();

Modified: lucene/solr/trunk/src/test/org/apache/solr/analysis/TestSynonymMap.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/org/apache/solr/analysis/TestSynonymMap.java?rev=921427&r1=921426&r2=921427&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/org/apache/solr/analysis/TestSynonymMap.java (original)
+++ lucene/solr/trunk/src/test/org/apache/solr/analysis/TestSynonymMap.java Wed Mar 10 16:19:37
2010
@@ -22,9 +22,11 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import junit.framework.TestCase;
+
 import org.apache.lucene.analysis.Token;
 
-public class TestSynonymMap extends AnalysisTestCase {
+public class TestSynonymMap extends TestCase {
 
   public void testInvalidMappingRules() throws Exception {
     SynonymMap synMap = new SynonymMap( true );

Modified: lucene/solr/trunk/src/test/org/apache/solr/analysis/TestWordDelimiterFilter.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/org/apache/solr/analysis/TestWordDelimiterFilter.java?rev=921427&r1=921426&r2=921427&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/org/apache/solr/analysis/TestWordDelimiterFilter.java (original)
+++ lucene/solr/trunk/src/test/org/apache/solr/analysis/TestWordDelimiterFilter.java Wed Mar
10 16:19:37 2010
@@ -27,21 +27,25 @@ import org.apache.lucene.analysis.Whites
 import org.apache.lucene.analysis.miscellaneous.SingleTokenTokenStream;
 import org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute;
 import org.apache.lucene.analysis.tokenattributes.TermAttribute;
+import org.apache.solr.util.AbstractSolrTestCase;
+
+import static org.apache.solr.analysis.BaseTokenTestCase.*;
 
 import java.io.IOException;
 import java.io.Reader;
 import java.io.StringReader;
 import java.util.Arrays;
+import java.util.HashMap;
 import java.util.HashSet;
+import java.util.Map;
 
 /**
  * New WordDelimiterFilter tests... most of the tests are in ConvertedLegacyTest
  */
-public class TestWordDelimiterFilter extends BaseTokenTestCase {
+public class TestWordDelimiterFilter extends AbstractSolrTestCase {
   public String getSchemaFile() { return "solr/conf/schema.xml"; }
   public String getSolrConfigFile() { return "solr/conf/solrconfig.xml"; }
 
-
   public void posTst(String v1, String v2, String s1, String s2) {
     assertU(adoc("id",  "42",
                  "subword", v1,



Mime
View raw message