org.apache.solr.handler.dataimport
Class AbstractDataImportHandlerTest
java.lang.Object
TestCase
org.apache.solr.util.AbstractSolrTestCase
org.apache.solr.handler.dataimport.AbstractDataImportHandlerTest
public abstract class AbstractDataImportHandlerTest
- extends AbstractSolrTestCase
Abstract base class for DataImportHandler tests
This API is experimental and subject to change
- Since:
- solr 1.3
- Version:
- $Id: AbstractDataImportHandlerTest.java 681182 2008-07-30 19:35:58Z shalin $
|
Method Summary |
static Map |
createMap(Object... args)
Strings at even index are keys, odd-index strings are values in the
returned map |
static Context |
getContext(DataConfig.Entity parentEntity,
VariableResolverImpl resolver,
DataSource parentDataSource,
int currProcess,
List<Map<String,String>> entityFields,
Map<String,String> entityAttrs)
Helper for creating a Context instance. |
protected String |
loadDataConfig(String dataConfigFileName)
|
protected void |
runDeltaImport(String dataConfig)
|
protected void |
runFullImport(String dataConfig)
|
void |
setUp()
Initializes things your test might need
Creates a dataDir in the "java.io.tmpdir"
initializes the TestHarness h using this data directory, and getSchemaPath()
initializes the LocalRequestFactory lrf using sensible defaults.
|
void |
tearDown()
Shuts down the test harness, and makes the best attempt possible
to delete dataDir, unless the system property "solr.test.leavedatadir"
is set. |
| Methods inherited from class org.apache.solr.util.AbstractSolrTestCase |
add, adoc, assertFailedU, assertFailedU, assertQ, assertQ, assertQEx, assertU, assertU, commit, delI, delQ, doc, getSchemaFile, getSolrConfigFile, optimize, recurseDelete, req, req |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractDataImportHandlerTest
public AbstractDataImportHandlerTest()
setUp
public void setUp()
throws Exception
- Description copied from class:
AbstractSolrTestCase
- Initializes things your test might need
- Creates a dataDir in the "java.io.tmpdir"
- initializes the TestHarness h using this data directory, and getSchemaPath()
- initializes the LocalRequestFactory lrf using sensible defaults.
- Overrides:
setUp in class AbstractSolrTestCase
- Throws:
Exception
tearDown
public void tearDown()
throws Exception
- Description copied from class:
AbstractSolrTestCase
- Shuts down the test harness, and makes the best attempt possible
to delete dataDir, unless the system property "solr.test.leavedatadir"
is set.
- Overrides:
tearDown in class AbstractSolrTestCase
- Throws:
Exception
loadDataConfig
protected String loadDataConfig(String dataConfigFileName)
runFullImport
protected void runFullImport(String dataConfig)
throws Exception
- Throws:
Exception
runDeltaImport
protected void runDeltaImport(String dataConfig)
throws Exception
- Throws:
Exception
getContext
public static Context getContext(DataConfig.Entity parentEntity,
VariableResolverImpl resolver,
DataSource parentDataSource,
int currProcess,
List<Map<String,String>> entityFields,
Map<String,String> entityAttrs)
- Helper for creating a Context instance. Useful for testing Transformers
createMap
public static Map createMap(Object... args)
- Strings at even index are keys, odd-index strings are values in the
returned map
Copyright © 2009 Apache Software Foundation. All Rights Reserved.