Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

LUCENE-3795: use MockAnalyzer for testing

Robert Muir22b145e43edb
diff --git a/modules/spatial/build.xml b/modules/spatial/build.xml
index 9ce58d4f19f..53535b56a3f 100644
--- a/modules/spatial/build.xml
+++ b/modules/spatial/build.xml
@@ -28,7 +28,6 @@
<path id="test.classpath">
<path refid="test.base.classpath" />
<path refid="base.classpath"/>
- <pathelement path="${analyzers-common.jar}" />
<pathelement path="src/test-files" />
</path>
@@ -36,6 +35,6 @@
<target name="init" depends="contrib-build.init"/>
<target name="dist-maven" depends="jar-core,javadocs,common.dist-maven"/>
<target name="compile" depends="jar-queries,common.compile-core" />
- <target name="test" depends="jar-analyzers-common,compile-test,validate,junit-mkdir,junit-sequential,junit-parallel" description="Runs unit tests"/>
+ <target name="test" depends="compile-test,validate,junit-mkdir,junit-sequential,junit-parallel" description="Runs unit tests"/>
</project>
diff --git a/modules/spatial/src/test/org/apache/lucene/spatial/SpatialTestCase.java b/modules/spatial/src/test/org/apache/lucene/spatial/SpatialTestCase.java
index fa79eed85d5..bebbbf764f2 100644
--- a/modules/spatial/src/test/org/apache/lucene/spatial/SpatialTestCase.java
+++ b/modules/spatial/src/test/org/apache/lucene/spatial/SpatialTestCase.java
@@ -17,7 +17,7 @@
package org.apache.lucene.spatial;
-import org.apache.lucene.analysis.core.WhitespaceAnalyzer;
+import org.apache.lucene.analysis.MockAnalyzer;
import org.apache.lucene.document.Document;
import org.apache.lucene.index.DirectoryReader;
import org.apache.lucene.index.IndexWriter;
@@ -49,7 +49,7 @@ public abstract class SpatialTestCase extends LuceneTestCase {
directory = newDirectory();
- IndexWriterConfig writerConfig = newIndexWriterConfig(random, TEST_VERSION_CURRENT, new WhitespaceAnalyzer(TEST_VERSION_CURRENT));
+ IndexWriterConfig writerConfig = newIndexWriterConfig(random, TEST_VERSION_CURRENT, new MockAnalyzer(random));
indexWriter = new IndexWriter(directory, writerConfig);
}