From 45b9c24ee9402a810284934dbad4d29cd7c201f8 Mon Sep 17 00:00:00 2001 From: Yonik Seeley Date: Wed, 20 Oct 2010 01:51:40 +0000 Subject: [PATCH] tests: convert to junit4 git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1024486 13f79535-47bb-0310-9956-ffa450edef68 --- .../solr/analysis/TestLuceneMatchVersion.java | 15 ++++++--------- .../test/org/apache/solr/core/SOLR749Test.java | 13 ++++++------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/solr/src/test/org/apache/solr/analysis/TestLuceneMatchVersion.java b/solr/src/test/org/apache/solr/analysis/TestLuceneMatchVersion.java index 2c4649fed54..493997ca8aa 100644 --- a/solr/src/test/org/apache/solr/analysis/TestLuceneMatchVersion.java +++ b/solr/src/test/org/apache/solr/analysis/TestLuceneMatchVersion.java @@ -20,6 +20,7 @@ import java.io.StringReader; import java.lang.reflect.Field; import org.apache.lucene.analysis.standard.StandardTokenizer; +import org.apache.solr.SolrTestCaseJ4; import org.apache.solr.core.Config; import org.apache.solr.schema.IndexSchema; import org.apache.solr.schema.FieldType; @@ -27,20 +28,16 @@ import org.apache.solr.util.AbstractSolrTestCase; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.standard.StandardAnalyzer; import org.apache.lucene.util.Version; +import org.junit.BeforeClass; /** * Tests for luceneMatchVersion property for analyzers */ -public class TestLuceneMatchVersion extends AbstractSolrTestCase { +public class TestLuceneMatchVersion extends SolrTestCaseJ4 { - @Override - public String getSchemaFile() { - return "schema-luceneMatchVersion.xml"; - } - - @Override - public String getSolrConfigFile() { - return "solrconfig.xml"; + @BeforeClass + public static void beforeClass() throws Exception { + initCore("solrconfig.xml","schema-luceneMatchVersion.xml"); } // this must match the solrconfig.xml version for this test diff --git a/solr/src/test/org/apache/solr/core/SOLR749Test.java b/solr/src/test/org/apache/solr/core/SOLR749Test.java index 6507f2d3bfb..5ce56079a0e 100644 --- a/solr/src/test/org/apache/solr/core/SOLR749Test.java +++ b/solr/src/test/org/apache/solr/core/SOLR749Test.java @@ -16,23 +16,22 @@ package org.apache.solr.core; * limitations under the License. */ +import org.apache.solr.SolrTestCaseJ4; import org.apache.solr.util.AbstractSolrTestCase; import org.apache.solr.search.QParserPlugin; import org.apache.solr.search.FooQParserPlugin; import org.apache.solr.search.ValueSourceParser; +import org.junit.BeforeClass; /** * Test for https://issues.apache.org/jira/browse/SOLR-749 * **/ -public class SOLR749Test extends AbstractSolrTestCase{ - public String getSchemaFile() { - return "schema.xml"; - } - - public String getSolrConfigFile() { - return "solrconfig-SOLR-749.xml"; +public class SOLR749Test extends SolrTestCaseJ4 { + @BeforeClass + public static void beforeClass() throws Exception { + initCore("solrconfig-SOLR-749.xml","schema.xml"); } public void testConstruction() throws Exception {