mirror of https://github.com/apache/lucene.git
Made DataImporter#loadDataConfig private and tests changed to use DataImporter#loadAndInt instead
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@826074 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ff3fd6f77f
commit
461757eb14
|
@ -63,7 +63,7 @@ public class TestMailEntityProcessor {
|
|||
paramMap.put("recurse", "false");
|
||||
paramMap.put("processAttachement", "false");
|
||||
DataImporter di = new DataImporter();
|
||||
di.loadDataConfig(getConfigFromMap(paramMap));
|
||||
di.loadAndInit(getConfigFromMap(paramMap));
|
||||
DataConfig.Entity ent = di.getConfig().document.entities.get(0);
|
||||
ent.isDocRoot = true;
|
||||
DataImporter.RequestParams rp = new DataImporter.RequestParams();
|
||||
|
@ -80,7 +80,7 @@ public class TestMailEntityProcessor {
|
|||
paramMap.put("recurse", "true");
|
||||
paramMap.put("processAttachement", "false");
|
||||
DataImporter di = new DataImporter();
|
||||
di.loadDataConfig(getConfigFromMap(paramMap));
|
||||
di.loadAndInit(getConfigFromMap(paramMap));
|
||||
DataConfig.Entity ent = di.getConfig().document.entities.get(0);
|
||||
ent.isDocRoot = true;
|
||||
DataImporter.RequestParams rp = new DataImporter.RequestParams();
|
||||
|
@ -98,7 +98,7 @@ public class TestMailEntityProcessor {
|
|||
paramMap.put("processAttachement", "false");
|
||||
paramMap.put("exclude", ".*grandchild.*");
|
||||
DataImporter di = new DataImporter();
|
||||
di.loadDataConfig(getConfigFromMap(paramMap));
|
||||
di.loadAndInit(getConfigFromMap(paramMap));
|
||||
DataConfig.Entity ent = di.getConfig().document.entities.get(0);
|
||||
ent.isDocRoot = true;
|
||||
DataImporter.RequestParams rp = new DataImporter.RequestParams();
|
||||
|
@ -116,7 +116,7 @@ public class TestMailEntityProcessor {
|
|||
paramMap.put("processAttachement", "false");
|
||||
paramMap.put("include", ".*grandchild.*");
|
||||
DataImporter di = new DataImporter();
|
||||
di.loadDataConfig(getConfigFromMap(paramMap));
|
||||
di.loadAndInit(getConfigFromMap(paramMap));
|
||||
DataConfig.Entity ent = di.getConfig().document.entities.get(0);
|
||||
ent.isDocRoot = true;
|
||||
DataImporter.RequestParams rp = new DataImporter.RequestParams();
|
||||
|
@ -135,7 +135,7 @@ public class TestMailEntityProcessor {
|
|||
paramMap.put("exclude", ".*top1.*");
|
||||
paramMap.put("include", ".*grandchild.*");
|
||||
DataImporter di = new DataImporter();
|
||||
di.loadDataConfig(getConfigFromMap(paramMap));
|
||||
di.loadAndInit(getConfigFromMap(paramMap));
|
||||
DataConfig.Entity ent = di.getConfig().document.entities.get(0);
|
||||
ent.isDocRoot = true;
|
||||
DataImporter.RequestParams rp = new DataImporter.RequestParams();
|
||||
|
@ -153,7 +153,7 @@ public class TestMailEntityProcessor {
|
|||
paramMap.put("processAttachement", "false");
|
||||
paramMap.put("fetchMailsSince", "2008-12-26 00:00:00");
|
||||
DataImporter di = new DataImporter();
|
||||
di.loadDataConfig(getConfigFromMap(paramMap));
|
||||
di.loadAndInit(getConfigFromMap(paramMap));
|
||||
DataConfig.Entity ent = di.getConfig().document.entities.get(0);
|
||||
ent.isDocRoot = true;
|
||||
DataImporter.RequestParams rp = new DataImporter.RequestParams();
|
||||
|
|
|
@ -164,7 +164,7 @@ public class DataImporter {
|
|||
|
||||
}
|
||||
|
||||
void loadDataConfig(String configFile) {
|
||||
private void loadDataConfig(String configFile) {
|
||||
|
||||
try {
|
||||
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
|
||||
|
|
|
@ -43,7 +43,7 @@ public class TestDocBuilder {
|
|||
public void singleEntityNoRows() {
|
||||
try {
|
||||
DataImporter di = new DataImporter();
|
||||
di.loadDataConfig(dc_singleEntity);
|
||||
di.loadAndInit(dc_singleEntity);
|
||||
DataConfig cfg = di.getConfig();
|
||||
DataConfig.Entity ent = cfg.document.entities.get(0);
|
||||
MockDataSource.setIterator("select * from x", new ArrayList().iterator());
|
||||
|
@ -71,7 +71,7 @@ public class TestDocBuilder {
|
|||
public void testDeltaImportNoRows_MustNotCommit() {
|
||||
try {
|
||||
DataImporter di = new DataImporter();
|
||||
di.loadDataConfig(dc_deltaConfig);
|
||||
di.loadAndInit(dc_deltaConfig);
|
||||
DataConfig cfg = di.getConfig();
|
||||
DataConfig.Entity ent = cfg.document.entities.get(0);
|
||||
MockDataSource.setIterator("select * from x", new ArrayList().iterator());
|
||||
|
@ -96,7 +96,7 @@ public class TestDocBuilder {
|
|||
public void singleEntityOneRow() {
|
||||
try {
|
||||
DataImporter di = new DataImporter();
|
||||
di.loadDataConfig(dc_singleEntity);
|
||||
di.loadAndInit(dc_singleEntity);
|
||||
DataConfig cfg = di.getConfig();
|
||||
DataConfig.Entity ent = cfg.document.entities.get(0);
|
||||
List l = new ArrayList();
|
||||
|
@ -135,7 +135,7 @@ public class TestDocBuilder {
|
|||
public void testImportCommand() {
|
||||
try {
|
||||
DataImporter di = new DataImporter();
|
||||
di.loadDataConfig(dc_singleEntity);
|
||||
di.loadAndInit(dc_singleEntity);
|
||||
DataConfig cfg = di.getConfig();
|
||||
DataConfig.Entity ent = cfg.document.entities.get(0);
|
||||
List l = new ArrayList();
|
||||
|
@ -173,7 +173,7 @@ public class TestDocBuilder {
|
|||
public void singleEntityMultipleRows() {
|
||||
try {
|
||||
DataImporter di = new DataImporter();
|
||||
di.loadDataConfig(dc_singleEntity);
|
||||
di.loadAndInit(dc_singleEntity);
|
||||
DataConfig cfg = di.getConfig();
|
||||
DataConfig.Entity ent = cfg.document.entities.get(0);
|
||||
ent.isDocRoot = true;
|
||||
|
|
Loading…
Reference in New Issue