diff --git a/solr/src/test/org/apache/solr/search/TestIndexSearcher.java b/solr/src/test/org/apache/solr/search/TestIndexSearcher.java index da9d715a27c..8b0f0edecf6 100755 --- a/solr/src/test/org/apache/solr/search/TestIndexSearcher.java +++ b/solr/src/test/org/apache/solr/search/TestIndexSearcher.java @@ -16,20 +16,22 @@ */ package org.apache.solr.search; -import org.apache.solr.util.AbstractSolrTestCase; +import org.apache.solr.SolrTestCaseJ4; import org.apache.solr.request.SolrQueryRequest; import org.apache.solr.schema.SchemaField; import org.apache.solr.search.function.ValueSource; import org.apache.solr.search.function.DocValues; +import org.junit.BeforeClass; import java.util.Map; import java.io.IOException; -public class TestIndexSearcher extends AbstractSolrTestCase { +public class TestIndexSearcher extends SolrTestCaseJ4 { - public String getSchemaFile() { return "schema11.xml"; } - public String getSolrConfigFile() { return "solrconfig.xml"; } - public String getCoreName() { return "basic"; } + @BeforeClass + public static void beforeClass() throws Exception { + initCore("solrconfig.xml","schema.xml"); + } private String getStringVal(SolrQueryRequest sqr, String field, int doc) throws IOException { SchemaField sf = sqr.getSchema().getField(field); @@ -109,7 +111,7 @@ public class TestIndexSearcher extends AbstractSolrTestCase { assertU(delI("1")); assertU(commit()); SolrQueryRequest sr6 = req("q","foo"); - SolrIndexReader r6 = sr4.getSearcher().getReader(); + SolrIndexReader r6 = sr6.getSearcher().getReader(); assertEquals(1, r6.getLeafReaders()[0].numDocs()); // only a single doc left in the first segment assertTrue( !r5.getLeafReaders()[0].equals(r6.getLeafReaders()[0]) ); // readers now different