mirror of https://github.com/apache/lucene.git
tests: convert to junit4
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1024292 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ade778b533
commit
983ead3f8f
|
@ -5,18 +5,18 @@ import java.io.IOException;
|
||||||
import org.apache.lucene.index.IndexWriter;
|
import org.apache.lucene.index.IndexWriter;
|
||||||
import org.apache.lucene.index.LogDocMergePolicy;
|
import org.apache.lucene.index.LogDocMergePolicy;
|
||||||
import org.apache.lucene.index.SerialMergeScheduler;
|
import org.apache.lucene.index.SerialMergeScheduler;
|
||||||
|
import org.apache.solr.SolrTestCaseJ4;
|
||||||
import org.apache.solr.update.DirectUpdateHandler2;
|
import org.apache.solr.update.DirectUpdateHandler2;
|
||||||
import org.apache.solr.util.AbstractSolrTestCase;
|
import org.junit.BeforeClass;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
public class TestLegacyMergeSchedulerPolicyConfig extends AbstractSolrTestCase {
|
public class TestLegacyMergeSchedulerPolicyConfig extends SolrTestCaseJ4 {
|
||||||
public String getSchemaFile() {
|
@BeforeClass
|
||||||
return "schema.xml";
|
public static void beforeClass() throws Exception {
|
||||||
}
|
initCore("solrconfig-legacy.xml", "schema.xml");
|
||||||
|
|
||||||
public String getSolrConfigFile() {
|
|
||||||
return "solrconfig-legacy.xml";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testLegacy() throws Exception {
|
public void testLegacy() throws Exception {
|
||||||
IndexWriter writer = new ExposeWriterHandler().getWriter();
|
IndexWriter writer = new ExposeWriterHandler().getWriter();
|
||||||
assertTrue(writer.getMergePolicy().getClass().getName().equals(LogDocMergePolicy.class.getName()));
|
assertTrue(writer.getMergePolicy().getClass().getName().equals(LogDocMergePolicy.class.getName()));
|
||||||
|
|
Loading…
Reference in New Issue