mirror of https://github.com/apache/lucene.git
SOLR-2659: Moved src/test-files/** under src/test-files/<module-name>/** for all Solr modules except core
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1149600 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3100c0517a
commit
9772db3703
|
@ -30,11 +30,20 @@ use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
my @moves = (
|
my @moves = (
|
||||||
|
'solr/contrib/analysis-extras/src/test-files/solr-analysis-extras'
|
||||||
|
=> 'solr/contrib/analysis-extras/src/test-files/analysis-extras/solr',
|
||||||
|
|
||||||
|
'solr/contrib/analysis-extras/src/test-files'
|
||||||
|
=> 'solr/contrib/analysis-extras/src/test-files/analysis-extras',
|
||||||
|
|
||||||
'solr/contrib/clustering/src/test/java'
|
'solr/contrib/clustering/src/test/java'
|
||||||
=> 'solr/contrib/clustering/src/test',
|
=> 'solr/contrib/clustering/src/test',
|
||||||
|
|
||||||
|
'solr/contrib/clustering/src/test/resources/solr-clustering'
|
||||||
|
=> 'solr/contrib/clustering/src/test-files/clustering/solr',
|
||||||
|
|
||||||
'solr/contrib/clustering/src/test/resources'
|
'solr/contrib/clustering/src/test/resources'
|
||||||
=> 'solr/contrib/clustering/src/test-files',
|
=> 'solr/contrib/clustering/src/test-files/clustering',
|
||||||
|
|
||||||
'solr/contrib/clustering/src/main/java'
|
'solr/contrib/clustering/src/main/java'
|
||||||
=> 'solr/contrib/clustering/src/java',
|
=> 'solr/contrib/clustering/src/java',
|
||||||
|
@ -42,8 +51,11 @@ my @moves = (
|
||||||
'solr/contrib/dataimporthandler/src/test/java'
|
'solr/contrib/dataimporthandler/src/test/java'
|
||||||
=> 'solr/contrib/dataimporthandler/src/test',
|
=> 'solr/contrib/dataimporthandler/src/test',
|
||||||
|
|
||||||
|
'solr/contrib/dataimporthandler/src/test/resources/solr-dih'
|
||||||
|
=> 'solr/contrib/dataimporthandler/src/test-files/dih/solr',
|
||||||
|
|
||||||
'solr/contrib/dataimporthandler/src/test/resources'
|
'solr/contrib/dataimporthandler/src/test/resources'
|
||||||
=> 'solr/contrib/dataimporthandler/src/test-files',
|
=> 'solr/contrib/dataimporthandler/src/test-files/dih',
|
||||||
|
|
||||||
'solr/contrib/dataimporthandler/src/main/java'
|
'solr/contrib/dataimporthandler/src/main/java'
|
||||||
=> 'solr/contrib/dataimporthandler/src/java',
|
=> 'solr/contrib/dataimporthandler/src/java',
|
||||||
|
@ -54,8 +66,11 @@ my @moves = (
|
||||||
'solr/contrib/dataimporthandler/src/extras/test/java'
|
'solr/contrib/dataimporthandler/src/extras/test/java'
|
||||||
=> 'solr/contrib/dataimporthandler-extras/src/test',
|
=> 'solr/contrib/dataimporthandler-extras/src/test',
|
||||||
|
|
||||||
|
'solr/contrib/dataimporthandler/src/extras/test/resources/solr-dihextras'
|
||||||
|
=> 'solr/contrib/dataimporthandler-extras/src/test-files/dihextras/solr',
|
||||||
|
|
||||||
'solr/contrib/dataimporthandler/src/extras/test/resources'
|
'solr/contrib/dataimporthandler/src/extras/test/resources'
|
||||||
=> 'solr/contrib/dataimporthandler-extras/src/test-files',
|
=> 'solr/contrib/dataimporthandler-extras/src/test-files/dihextras',
|
||||||
|
|
||||||
'solr/contrib/dataimporthandler/src/extras/main/java'
|
'solr/contrib/dataimporthandler/src/extras/main/java'
|
||||||
=> 'solr/contrib/dataimporthandler-extras/src/java',
|
=> 'solr/contrib/dataimporthandler-extras/src/java',
|
||||||
|
@ -63,8 +78,11 @@ my @moves = (
|
||||||
'solr/contrib/extraction/src/test/java'
|
'solr/contrib/extraction/src/test/java'
|
||||||
=> 'solr/contrib/extraction/src/test',
|
=> 'solr/contrib/extraction/src/test',
|
||||||
|
|
||||||
|
'solr/contrib/extraction/src/test/resources/solr-extraction'
|
||||||
|
=> 'solr/contrib/extraction/src/test-files/extraction/solr',
|
||||||
|
|
||||||
'solr/contrib/extraction/src/test/resources'
|
'solr/contrib/extraction/src/test/resources'
|
||||||
=> 'solr/contrib/extraction/src/test-files',
|
=> 'solr/contrib/extraction/src/test-files/extraction',
|
||||||
|
|
||||||
'solr/contrib/extraction/src/main/java'
|
'solr/contrib/extraction/src/main/java'
|
||||||
=> 'solr/contrib/extraction/src/java',
|
=> 'solr/contrib/extraction/src/java',
|
||||||
|
@ -72,8 +90,11 @@ my @moves = (
|
||||||
'solr/contrib/uima/src/test/java'
|
'solr/contrib/uima/src/test/java'
|
||||||
=> 'solr/contrib/uima/src/test',
|
=> 'solr/contrib/uima/src/test',
|
||||||
|
|
||||||
|
'solr/contrib/uima/src/test/resources/solr-uima'
|
||||||
|
=> 'solr/contrib/uima/src/test-files/uima/solr',
|
||||||
|
|
||||||
'solr/contrib/uima/src/test/resources'
|
'solr/contrib/uima/src/test/resources'
|
||||||
=> 'solr/contrib/uima/src/test-files',
|
=> 'solr/contrib/uima/src/test-files/uima',
|
||||||
|
|
||||||
'solr/contrib/uima/src/main/java'
|
'solr/contrib/uima/src/main/java'
|
||||||
=> 'solr/contrib/uima/src/java',
|
=> 'solr/contrib/uima/src/java',
|
||||||
|
@ -82,13 +103,13 @@ my @moves = (
|
||||||
=> 'solr/contrib/uima/src/resources',
|
=> 'solr/contrib/uima/src/resources',
|
||||||
|
|
||||||
'solr/src/test-files/books.csv'
|
'solr/src/test-files/books.csv'
|
||||||
=> 'solr/solrj/src/test-files/books.csv',
|
=> 'solr/solrj/src/test-files/solrj/books.csv',
|
||||||
|
|
||||||
'solr/src/test-files/sampleDateFacetResponse.xml'
|
'solr/src/test-files/sampleDateFacetResponse.xml'
|
||||||
=> 'solr/solrj/src/test-files/sampleDateFacetResponse.xml',
|
=> 'solr/solrj/src/test-files/solrj/sampleDateFacetResponse.xml',
|
||||||
|
|
||||||
'solr/src/test-files/solr/shared'
|
'solr/src/test-files/solr/shared'
|
||||||
=> 'solr/solrj/src/test-files/solr/shared',
|
=> 'solr/solrj/src/test-files/solrj/solr/shared',
|
||||||
|
|
||||||
'solr/src/solrj'
|
'solr/src/solrj'
|
||||||
=> 'solr/solrj/src/java',
|
=> 'solr/solrj/src/java',
|
||||||
|
@ -150,19 +171,19 @@ my @moves = (
|
||||||
|
|
||||||
my @copies = (
|
my @copies = (
|
||||||
'solr/core/src/test-files/README'
|
'solr/core/src/test-files/README'
|
||||||
=> 'solr/solrj/src/test-files/README',
|
=> 'solr/solrj/src/test-files/solrj/README',
|
||||||
|
|
||||||
'solr/core/src/test-files/solr/crazy-path-to-schema.xml'
|
'solr/core/src/test-files/solr/crazy-path-to-schema.xml'
|
||||||
=> 'solr/solrj/src/test-files/solr/crazy-path-to-schema.xml',
|
=> 'solr/solrj/src/test-files/solrj/solr/crazy-path-to-schema.xml',
|
||||||
|
|
||||||
'solr/core/src/test-files/solr/conf/schema.xml'
|
'solr/core/src/test-files/solr/conf/schema.xml'
|
||||||
=> 'solr/solrj/src/test-files/solr/conf/schema.xml',
|
=> 'solr/solrj/src/test-files/solrj/solr/conf/schema.xml',
|
||||||
|
|
||||||
'solr/core/src/test-files/solr/conf/schema-replication1.xml'
|
'solr/core/src/test-files/solr/conf/schema-replication1.xml'
|
||||||
=> 'solr/solrj/src/test-files/solr/conf/schema-replication1.xml',
|
=> 'solr/solrj/src/test-files/solrj/solr/conf/schema-replication1.xml',
|
||||||
|
|
||||||
'solr/core/src/test-files/solr/conf/solrconfig-slave1.xml'
|
'solr/core/src/test-files/solr/conf/solrconfig-slave1.xml'
|
||||||
=> 'solr/solrj/src/test-files/solr/conf/solrconfig-slave1.xml',
|
=> 'solr/solrj/src/test-files/solrj/solr/conf/solrconfig-slave1.xml',
|
||||||
);
|
);
|
||||||
|
|
||||||
my $diff;
|
my $diff;
|
||||||
|
|
|
@ -373,11 +373,12 @@ Bug Fixes
|
||||||
Build
|
Build
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
* SOLR-2452: Rewrote the Solr build system:
|
* SOLR-2452,SOLR-2653,LUCENE-3323,SOLR-2659,LUCENE-3329,SOLR-2666:
|
||||||
|
Rewrote the Solr build system:
|
||||||
- Integrated more fully with the Lucene build system: generalized the
|
- Integrated more fully with the Lucene build system: generalized the
|
||||||
Lucene build system and eliminated duplication.
|
Lucene build system and eliminated duplication.
|
||||||
- Converted all Solr contribs to the Lucene/Solr conventional src/ layout:
|
- Converted all Solr contribs to the Lucene/Solr conventional src/ layout:
|
||||||
java/, resources/, test/, and test-files/.
|
java/, resources/, test/, and test-files/<contrib-name>.
|
||||||
- Created a new Solr-internal module named "core" by moving the java/,
|
- Created a new Solr-internal module named "core" by moving the java/,
|
||||||
test/, and test-files/ directories from solr/src/ to solr/core/src/.
|
test/, and test-files/ directories from solr/src/ to solr/core/src/.
|
||||||
- Merged solr/src/webapp/src/ into solr/core/src/java/.
|
- Merged solr/src/webapp/src/ into solr/core/src/java/.
|
||||||
|
|
|
@ -74,8 +74,8 @@ public class TestICUCollationField extends SolrTestCaseJ4 {
|
||||||
confDir.mkdir();
|
confDir.mkdir();
|
||||||
|
|
||||||
// copy over configuration files
|
// copy over configuration files
|
||||||
FileUtils.copyFile(getFile("solr-analysis-extras/conf/solrconfig-icucollate.xml"), new File(confDir, "solrconfig.xml"));
|
FileUtils.copyFile(getFile("analysis-extras/solr/conf/solrconfig-icucollate.xml"), new File(confDir, "solrconfig.xml"));
|
||||||
FileUtils.copyFile(getFile("solr-analysis-extras/conf/schema-icucollate.xml"), new File(confDir, "schema.xml"));
|
FileUtils.copyFile(getFile("analysis-extras/solr/conf/schema-icucollate.xml"), new File(confDir, "schema.xml"));
|
||||||
|
|
||||||
// generate custom collation rules (DIN 5007-2), saving to customrules.dat
|
// generate custom collation rules (DIN 5007-2), saving to customrules.dat
|
||||||
RuleBasedCollator baseCollator = (RuleBasedCollator) Collator.getInstance(new ULocale("de", "DE"));
|
RuleBasedCollator baseCollator = (RuleBasedCollator) Collator.getInstance(new ULocale("de", "DE"));
|
||||||
|
|
|
@ -28,7 +28,7 @@ public abstract class AbstractClusteringTestCase extends SolrTestCaseJ4 {
|
||||||
|
|
||||||
@BeforeClass
|
@BeforeClass
|
||||||
public static void beforeClass() throws Exception {
|
public static void beforeClass() throws Exception {
|
||||||
initCore("solrconfig.xml", "schema.xml", "solr-clustering");
|
initCore("solrconfig.xml", "schema.xml", "clustering/solr");
|
||||||
numberOfDocs = 0;
|
numberOfDocs = 0;
|
||||||
for (String[] doc : DOCUMENTS) {
|
for (String[] doc : DOCUMENTS) {
|
||||||
assertNull(h.validateUpdate(adoc("id", Integer.toString(numberOfDocs), "url", doc[0], "title", doc[1], "snippet", doc[2])));
|
assertNull(h.validateUpdate(adoc("id", Integer.toString(numberOfDocs), "url", doc[0], "title", doc[1], "snippet", doc[2])));
|
||||||
|
|
|
@ -25,8 +25,7 @@ public class DistributedClusteringComponentTest extends
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getSolrHome() {
|
public String getSolrHome() {
|
||||||
// TODO: this should work with just "solr-clustering"...
|
return "clustering/solr";
|
||||||
return getFile("solr-clustering").getAbsolutePath();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -40,7 +40,7 @@ public class TestTikaEntityProcessor extends AbstractDataImportHandlerTestCase {
|
||||||
"<dataConfig>" +
|
"<dataConfig>" +
|
||||||
" <dataSource type=\"BinFileDataSource\"/>" +
|
" <dataSource type=\"BinFileDataSource\"/>" +
|
||||||
" <document>" +
|
" <document>" +
|
||||||
" <entity processor=\"TikaEntityProcessor\" url=\"" + getFile("solr-word.pdf").getAbsolutePath() + "\" >" +
|
" <entity processor=\"TikaEntityProcessor\" url=\"" + getFile("dihextras/solr-word.pdf").getAbsolutePath() + "\" >" +
|
||||||
" <field column=\"Author\" meta=\"true\" name=\"author\"/>" +
|
" <field column=\"Author\" meta=\"true\" name=\"author\"/>" +
|
||||||
" <field column=\"title\" meta=\"true\" name=\"title\"/>" +
|
" <field column=\"title\" meta=\"true\" name=\"title\"/>" +
|
||||||
" <field column=\"text\"/>" +
|
" <field column=\"text\"/>" +
|
||||||
|
@ -58,7 +58,7 @@ public class TestTikaEntityProcessor extends AbstractDataImportHandlerTestCase {
|
||||||
|
|
||||||
@BeforeClass
|
@BeforeClass
|
||||||
public static void beforeClass() throws Exception {
|
public static void beforeClass() throws Exception {
|
||||||
initCore("dataimport-solrconfig.xml", "dataimport-schema-no-unique-key.xml", getFile("solr-dihextras").getAbsolutePath());
|
initCore("dataimport-solrconfig.xml", "dataimport-schema-no-unique-key.xml", getFile("dihextras/solr").getAbsolutePath());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -54,7 +54,7 @@ public abstract class AbstractDataImportHandlerTestCase extends
|
||||||
|
|
||||||
// note, a little twisted that we shadow this static method
|
// note, a little twisted that we shadow this static method
|
||||||
public static void initCore(String config, String schema) throws Exception {
|
public static void initCore(String config, String schema) throws Exception {
|
||||||
initCore(config, schema, getFile("solr-dih").getAbsolutePath());
|
initCore(config, schema, getFile("dih/solr").getAbsolutePath());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -39,7 +39,7 @@ import java.util.List;
|
||||||
* @since solr 1.4
|
* @since solr 1.4
|
||||||
*/
|
*/
|
||||||
public class TestContentStreamDataSource extends AbstractDataImportHandlerTestCase {
|
public class TestContentStreamDataSource extends AbstractDataImportHandlerTestCase {
|
||||||
private static final String CONF_DIR = "." + File.separator + "solr-dih" + File.separator + "conf" + File.separator;
|
private static final String CONF_DIR = "dih/solr/conf/";
|
||||||
SolrInstance instance = null;
|
SolrInstance instance = null;
|
||||||
JettySolrRunner jetty;
|
JettySolrRunner jetty;
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ import org.junit.Test;
|
||||||
public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
||||||
@BeforeClass
|
@BeforeClass
|
||||||
public static void beforeClass() throws Exception {
|
public static void beforeClass() throws Exception {
|
||||||
initCore("solrconfig.xml", "schema.xml", "solr-extraction");
|
initCore("solrconfig.xml", "schema.xml", getFile("extraction/solr").getAbsolutePath());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -56,7 +56,7 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
||||||
public void testExtraction() throws Exception {
|
public void testExtraction() throws Exception {
|
||||||
ExtractingRequestHandler handler = (ExtractingRequestHandler) h.getCore().getRequestHandler("/update/extract");
|
ExtractingRequestHandler handler = (ExtractingRequestHandler) h.getCore().getRequestHandler("/update/extract");
|
||||||
assertTrue("handler is null and it shouldn't be", handler != null);
|
assertTrue("handler is null and it shouldn't be", handler != null);
|
||||||
loadLocal("solr-word.pdf",
|
loadLocal("extraction/solr-word.pdf",
|
||||||
"fmap.created", "extractedDate",
|
"fmap.created", "extractedDate",
|
||||||
"fmap.producer", "extractedProducer",
|
"fmap.producer", "extractedProducer",
|
||||||
"fmap.creator", "extractedCreator", "fmap.Keywords", "extractedKeywords",
|
"fmap.creator", "extractedCreator", "fmap.Keywords", "extractedKeywords",
|
||||||
|
@ -73,7 +73,7 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
||||||
assertQ(req("title:solr-word"), "//*[@numFound='1']");
|
assertQ(req("title:solr-word"), "//*[@numFound='1']");
|
||||||
|
|
||||||
|
|
||||||
loadLocal("simple.html", "fmap.created", "extractedDate", "fmap.producer", "extractedProducer",
|
loadLocal("extraction/simple.html", "fmap.created", "extractedDate", "fmap.producer", "extractedProducer",
|
||||||
"fmap.creator", "extractedCreator", "fmap.Keywords", "extractedKeywords",
|
"fmap.creator", "extractedCreator", "fmap.Keywords", "extractedKeywords",
|
||||||
"fmap.Author", "extractedAuthor",
|
"fmap.Author", "extractedAuthor",
|
||||||
"fmap.language", "extractedLanguage",
|
"fmap.language", "extractedLanguage",
|
||||||
|
@ -86,7 +86,7 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
||||||
assertQ(req("title:Welcome"), "//*[@numFound='1']");
|
assertQ(req("title:Welcome"), "//*[@numFound='1']");
|
||||||
|
|
||||||
|
|
||||||
loadLocal("simple.html",
|
loadLocal("extraction/simple.html",
|
||||||
"literal.id","simple2",
|
"literal.id","simple2",
|
||||||
"uprefix", "t_",
|
"uprefix", "t_",
|
||||||
"lowernames", "true",
|
"lowernames", "true",
|
||||||
|
@ -105,7 +105,7 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
||||||
assertQ(req("+id:simple2 +t_abcxyz:[* TO *]"), "//*[@numFound='1']");
|
assertQ(req("+id:simple2 +t_abcxyz:[* TO *]"), "//*[@numFound='1']");
|
||||||
|
|
||||||
// load again in the exact same way, but boost one field
|
// load again in the exact same way, but boost one field
|
||||||
loadLocal("simple.html",
|
loadLocal("extraction/simple.html",
|
||||||
"literal.id","simple3",
|
"literal.id","simple3",
|
||||||
"uprefix", "t_",
|
"uprefix", "t_",
|
||||||
"lowernames", "true",
|
"lowernames", "true",
|
||||||
|
@ -120,7 +120,7 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
||||||
assertQ(req("+id:simple3 +t_content_type:[* TO *]"), "//*[@numFound='1']");//test lowercase and then uprefix
|
assertQ(req("+id:simple3 +t_content_type:[* TO *]"), "//*[@numFound='1']");//test lowercase and then uprefix
|
||||||
|
|
||||||
// test capture
|
// test capture
|
||||||
loadLocal("simple.html",
|
loadLocal("extraction/simple.html",
|
||||||
"literal.id","simple4",
|
"literal.id","simple4",
|
||||||
"uprefix", "t_",
|
"uprefix", "t_",
|
||||||
"capture","p", // capture only what is in the title element
|
"capture","p", // capture only what is in the title element
|
||||||
|
@ -129,7 +129,7 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
||||||
assertQ(req("+id:simple4 +t_content:Solr"), "//*[@numFound='1']");
|
assertQ(req("+id:simple4 +t_content:Solr"), "//*[@numFound='1']");
|
||||||
assertQ(req("+id:simple4 +t_p:\"here is some text\""), "//*[@numFound='1']");
|
assertQ(req("+id:simple4 +t_p:\"here is some text\""), "//*[@numFound='1']");
|
||||||
|
|
||||||
loadLocal("version_control.xml", "fmap.created", "extractedDate", "fmap.producer", "extractedProducer",
|
loadLocal("extraction/version_control.xml", "fmap.created", "extractedDate", "fmap.producer", "extractedProducer",
|
||||||
"fmap.creator", "extractedCreator", "fmap.Keywords", "extractedKeywords",
|
"fmap.creator", "extractedCreator", "fmap.Keywords", "extractedKeywords",
|
||||||
"fmap.Author", "extractedAuthor",
|
"fmap.Author", "extractedAuthor",
|
||||||
"literal.id", "three",
|
"literal.id", "three",
|
||||||
|
@ -152,7 +152,7 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
||||||
try {
|
try {
|
||||||
ignoreException("unknown field 'a'");
|
ignoreException("unknown field 'a'");
|
||||||
ignoreException("unknown field 'meta'"); // TODO: should this exception be happening?
|
ignoreException("unknown field 'meta'"); // TODO: should this exception be happening?
|
||||||
loadLocal("simple.html",
|
loadLocal("extraction/simple.html",
|
||||||
"literal.id","simple2",
|
"literal.id","simple2",
|
||||||
"lowernames", "true",
|
"lowernames", "true",
|
||||||
"captureAttr", "true",
|
"captureAttr", "true",
|
||||||
|
@ -168,7 +168,7 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
loadLocal("simple.html",
|
loadLocal("extraction/simple.html",
|
||||||
"literal.id","simple2",
|
"literal.id","simple2",
|
||||||
ExtractingParams.DEFAULT_FIELD, "defaultExtr",//test that unmapped fields go to the text field when no uprefix is specified
|
ExtractingParams.DEFAULT_FIELD, "defaultExtr",//test that unmapped fields go to the text field when no uprefix is specified
|
||||||
"lowernames", "true",
|
"lowernames", "true",
|
||||||
|
@ -180,7 +180,7 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
||||||
assertQ(req("defaultExtr:http\\://www.apache.org"), "//*[@numFound='1']");
|
assertQ(req("defaultExtr:http\\://www.apache.org"), "//*[@numFound='1']");
|
||||||
|
|
||||||
//Test when both uprefix and default are specified.
|
//Test when both uprefix and default are specified.
|
||||||
loadLocal("simple.html",
|
loadLocal("extraction/simple.html",
|
||||||
"literal.id","simple2",
|
"literal.id","simple2",
|
||||||
ExtractingParams.DEFAULT_FIELD, "defaultExtr",//test that unmapped fields go to the text field when no uprefix is specified
|
ExtractingParams.DEFAULT_FIELD, "defaultExtr",//test that unmapped fields go to the text field when no uprefix is specified
|
||||||
ExtractingParams.UNKNOWN_FIELD_PREFIX, "t_",
|
ExtractingParams.UNKNOWN_FIELD_PREFIX, "t_",
|
||||||
|
@ -198,7 +198,7 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
||||||
ExtractingRequestHandler handler = (ExtractingRequestHandler) h.getCore().getRequestHandler("/update/extract");
|
ExtractingRequestHandler handler = (ExtractingRequestHandler) h.getCore().getRequestHandler("/update/extract");
|
||||||
assertTrue("handler is null and it shouldn't be", handler != null);
|
assertTrue("handler is null and it shouldn't be", handler != null);
|
||||||
//test literal
|
//test literal
|
||||||
loadLocal("version_control.xml", "fmap.created", "extractedDate", "fmap.producer", "extractedProducer",
|
loadLocal("extraction/version_control.xml", "fmap.created", "extractedDate", "fmap.producer", "extractedProducer",
|
||||||
"fmap.creator", "extractedCreator", "fmap.Keywords", "extractedKeywords",
|
"fmap.creator", "extractedCreator", "fmap.Keywords", "extractedKeywords",
|
||||||
"fmap.Author", "extractedAuthor",
|
"fmap.Author", "extractedAuthor",
|
||||||
"fmap.content", "extractedContent",
|
"fmap.content", "extractedContent",
|
||||||
|
@ -217,7 +217,7 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
||||||
assertQ(req("extractionLiteralMV:two"), "//*[@numFound='1']");
|
assertQ(req("extractionLiteralMV:two"), "//*[@numFound='1']");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
loadLocal("version_control.xml", "fmap.created", "extractedDate", "fmap.producer", "extractedProducer",
|
loadLocal("extraction/version_control.xml", "fmap.created", "extractedDate", "fmap.producer", "extractedProducer",
|
||||||
"fmap.creator", "extractedCreator", "fmap.Keywords", "extractedKeywords",
|
"fmap.creator", "extractedCreator", "fmap.Keywords", "extractedKeywords",
|
||||||
"fmap.Author", "extractedAuthor",
|
"fmap.Author", "extractedAuthor",
|
||||||
"fmap.content", "extractedContent",
|
"fmap.content", "extractedContent",
|
||||||
|
@ -233,7 +233,7 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
||||||
//nothing to see here, move along
|
//nothing to see here, move along
|
||||||
}
|
}
|
||||||
|
|
||||||
loadLocal("version_control.xml", "fmap.created", "extractedDate", "fmap.producer", "extractedProducer",
|
loadLocal("extraction/version_control.xml", "fmap.created", "extractedDate", "fmap.producer", "extractedProducer",
|
||||||
"fmap.creator", "extractedCreator", "fmap.Keywords", "extractedKeywords",
|
"fmap.creator", "extractedCreator", "fmap.Keywords", "extractedKeywords",
|
||||||
"fmap.Author", "extractedAuthor",
|
"fmap.Author", "extractedAuthor",
|
||||||
"fmap.content", "extractedContent",
|
"fmap.content", "extractedContent",
|
||||||
|
@ -253,7 +253,7 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
||||||
assertTrue("handler is null and it shouldn't be", handler != null);
|
assertTrue("handler is null and it shouldn't be", handler != null);
|
||||||
|
|
||||||
// Load plain text specifying MIME type:
|
// Load plain text specifying MIME type:
|
||||||
loadLocal("version_control.txt", "fmap.created", "extractedDate", "fmap.producer", "extractedProducer",
|
loadLocal("extraction/version_control.txt", "fmap.created", "extractedDate", "fmap.producer", "extractedProducer",
|
||||||
"fmap.creator", "extractedCreator", "fmap.Keywords", "extractedKeywords",
|
"fmap.creator", "extractedCreator", "fmap.Keywords", "extractedKeywords",
|
||||||
"fmap.Author", "extractedAuthor",
|
"fmap.Author", "extractedAuthor",
|
||||||
"literal.id", "one",
|
"literal.id", "one",
|
||||||
|
@ -272,13 +272,13 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
||||||
assertTrue("handler is null and it shouldn't be", handler != null);
|
assertTrue("handler is null and it shouldn't be", handler != null);
|
||||||
|
|
||||||
// Load plain text specifying filename
|
// Load plain text specifying filename
|
||||||
loadLocal("version_control.txt", "fmap.created", "extractedDate", "fmap.producer", "extractedProducer",
|
loadLocal("extraction/version_control.txt", "fmap.created", "extractedDate", "fmap.producer", "extractedProducer",
|
||||||
"fmap.creator", "extractedCreator", "fmap.Keywords", "extractedKeywords",
|
"fmap.creator", "extractedCreator", "fmap.Keywords", "extractedKeywords",
|
||||||
"fmap.Author", "extractedAuthor",
|
"fmap.Author", "extractedAuthor",
|
||||||
"literal.id", "one",
|
"literal.id", "one",
|
||||||
"fmap.language", "extractedLanguage",
|
"fmap.language", "extractedLanguage",
|
||||||
"fmap.content", "extractedContent",
|
"fmap.content", "extractedContent",
|
||||||
ExtractingParams.RESOURCE_NAME, "version_control.txt"
|
ExtractingParams.RESOURCE_NAME, "extraction/version_control.txt"
|
||||||
);
|
);
|
||||||
assertQ(req("extractedContent:Apache"), "//*[@numFound='0']");
|
assertQ(req("extractedContent:Apache"), "//*[@numFound='0']");
|
||||||
assertU(commit());
|
assertU(commit());
|
||||||
|
@ -292,7 +292,7 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
||||||
public void testExtractOnly() throws Exception {
|
public void testExtractOnly() throws Exception {
|
||||||
ExtractingRequestHandler handler = (ExtractingRequestHandler) h.getCore().getRequestHandler("/update/extract");
|
ExtractingRequestHandler handler = (ExtractingRequestHandler) h.getCore().getRequestHandler("/update/extract");
|
||||||
assertTrue("handler is null and it shouldn't be", handler != null);
|
assertTrue("handler is null and it shouldn't be", handler != null);
|
||||||
SolrQueryResponse rsp = loadLocal("solr-word.pdf", ExtractingParams.EXTRACT_ONLY, "true");
|
SolrQueryResponse rsp = loadLocal("extraction/solr-word.pdf", ExtractingParams.EXTRACT_ONLY, "true");
|
||||||
assertTrue("rsp is null and it shouldn't be", rsp != null);
|
assertTrue("rsp is null and it shouldn't be", rsp != null);
|
||||||
NamedList list = rsp.getValues();
|
NamedList list = rsp.getValues();
|
||||||
|
|
||||||
|
@ -306,7 +306,7 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
||||||
assertTrue("title is null and it shouldn't be", title != null);
|
assertTrue("title is null and it shouldn't be", title != null);
|
||||||
assertTrue(extraction.indexOf("<?xml") != -1);
|
assertTrue(extraction.indexOf("<?xml") != -1);
|
||||||
|
|
||||||
rsp = loadLocal("solr-word.pdf", ExtractingParams.EXTRACT_ONLY, "true",
|
rsp = loadLocal("extraction/solr-word.pdf", ExtractingParams.EXTRACT_ONLY, "true",
|
||||||
ExtractingParams.EXTRACT_FORMAT, ExtractingDocumentLoader.TEXT_FORMAT);
|
ExtractingParams.EXTRACT_FORMAT, ExtractingDocumentLoader.TEXT_FORMAT);
|
||||||
assertTrue("rsp is null and it shouldn't be", rsp != null);
|
assertTrue("rsp is null and it shouldn't be", rsp != null);
|
||||||
list = rsp.getValues();
|
list = rsp.getValues();
|
||||||
|
@ -329,7 +329,7 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
||||||
public void testXPath() throws Exception {
|
public void testXPath() throws Exception {
|
||||||
ExtractingRequestHandler handler = (ExtractingRequestHandler) h.getCore().getRequestHandler("/update/extract");
|
ExtractingRequestHandler handler = (ExtractingRequestHandler) h.getCore().getRequestHandler("/update/extract");
|
||||||
assertTrue("handler is null and it shouldn't be", handler != null);
|
assertTrue("handler is null and it shouldn't be", handler != null);
|
||||||
SolrQueryResponse rsp = loadLocal("example.html",
|
SolrQueryResponse rsp = loadLocal("extraction/example.html",
|
||||||
ExtractingParams.XPATH_EXPRESSION, "/xhtml:html/xhtml:body/xhtml:a/descendant:node()",
|
ExtractingParams.XPATH_EXPRESSION, "/xhtml:html/xhtml:body/xhtml:a/descendant:node()",
|
||||||
ExtractingParams.EXTRACT_ONLY, "true"
|
ExtractingParams.EXTRACT_ONLY, "true"
|
||||||
);
|
);
|
||||||
|
@ -347,7 +347,7 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
||||||
h.getCore().getRequestHandler("/update/extract");
|
h.getCore().getRequestHandler("/update/extract");
|
||||||
assertTrue("handler is null and it shouldn't be", handler != null);
|
assertTrue("handler is null and it shouldn't be", handler != null);
|
||||||
|
|
||||||
loadLocal("arabic.pdf", "fmap.created", "extractedDate", "fmap.producer", "extractedProducer",
|
loadLocal("extraction/arabic.pdf", "fmap.created", "extractedDate", "fmap.producer", "extractedProducer",
|
||||||
"fmap.creator", "extractedCreator", "fmap.Keywords", "extractedKeywords",
|
"fmap.creator", "extractedCreator", "fmap.Keywords", "extractedKeywords",
|
||||||
"fmap.Creation-Date", "extractedDate",
|
"fmap.Creation-Date", "extractedDate",
|
||||||
"fmap.AAPL:Keywords", "ignored_a",
|
"fmap.AAPL:Keywords", "ignored_a",
|
||||||
|
@ -368,7 +368,7 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
||||||
assertTrue("handler is null and it shouldn't be", handler != null);
|
assertTrue("handler is null and it shouldn't be", handler != null);
|
||||||
|
|
||||||
try{
|
try{
|
||||||
loadLocal("password-is-solrcell.docx",
|
loadLocal("extraction/password-is-solrcell.docx",
|
||||||
"literal.id", "one");
|
"literal.id", "one");
|
||||||
fail("TikaException is expected because of trying to extract text from password protected word file.");
|
fail("TikaException is expected because of trying to extract text from password protected word file.");
|
||||||
}
|
}
|
||||||
|
@ -377,7 +377,7 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
||||||
assertQ(req("*:*"), "//result[@numFound=0]");
|
assertQ(req("*:*"), "//result[@numFound=0]");
|
||||||
|
|
||||||
try{
|
try{
|
||||||
loadLocal("password-is-solrcell.docx", "fmap.created", "extractedDate", "fmap.producer", "extractedProducer",
|
loadLocal("extraction/password-is-solrcell.docx", "fmap.created", "extractedDate", "fmap.producer", "extractedProducer",
|
||||||
"fmap.creator", "extractedCreator", "fmap.Keywords", "extractedKeywords",
|
"fmap.creator", "extractedCreator", "fmap.Keywords", "extractedKeywords",
|
||||||
"fmap.Creation-Date", "extractedDate",
|
"fmap.Creation-Date", "extractedDate",
|
||||||
"fmap.AAPL:Keywords", "ignored_a",
|
"fmap.AAPL:Keywords", "ignored_a",
|
||||||
|
|
|
@ -959,7 +959,7 @@
|
||||||
<lst name="runtimeParameters">
|
<lst name="runtimeParameters">
|
||||||
<int name="ngramsize">3</int>
|
<int name="ngramsize">3</int>
|
||||||
</lst>
|
</lst>
|
||||||
<str name="analysisEngine">/TestAE.xml</str>
|
<str name="analysisEngine">/uima/TestAE.xml</str>
|
||||||
<lst name="analyzeFields">
|
<lst name="analyzeFields">
|
||||||
<bool name="merge">false</bool>
|
<bool name="merge">false</bool>
|
||||||
<arr name="fields">
|
<arr name="fields">
|
||||||
|
@ -1001,7 +1001,7 @@
|
||||||
<lst name="runtimeParameters">
|
<lst name="runtimeParameters">
|
||||||
<int name="ngramsize">3</int>
|
<int name="ngramsize">3</int>
|
||||||
</lst>
|
</lst>
|
||||||
<str name="analysisEngine">/TestAE.xml</str>
|
<str name="analysisEngine">/uima/TestAE.xml</str>
|
||||||
<lst name="analyzeFields">
|
<lst name="analyzeFields">
|
||||||
<bool name="merge">false</bool>
|
<bool name="merge">false</bool>
|
||||||
<arr name="fields">
|
<arr name="fields">
|
||||||
|
@ -1031,7 +1031,7 @@
|
||||||
<lst name="runtimeParameters">
|
<lst name="runtimeParameters">
|
||||||
<int name="ngramsize">3</int>
|
<int name="ngramsize">3</int>
|
||||||
</lst>
|
</lst>
|
||||||
<str name="analysisEngine">/TestExceptionAE.xml</str>
|
<str name="analysisEngine">/uima/TestExceptionAE.xml</str>
|
||||||
<bool name="ignoreErrors">false</bool>
|
<bool name="ignoreErrors">false</bool>
|
||||||
<lst name="analyzeFields">
|
<lst name="analyzeFields">
|
||||||
<bool name="merge">false</bool>
|
<bool name="merge">false</bool>
|
||||||
|
@ -1051,7 +1051,7 @@
|
||||||
<lst name="runtimeParameters">
|
<lst name="runtimeParameters">
|
||||||
<int name="ngramsize">3</int>
|
<int name="ngramsize">3</int>
|
||||||
</lst>
|
</lst>
|
||||||
<str name="analysisEngine">/TestExceptionAE.xml</str>
|
<str name="analysisEngine">/uima/TestExceptionAE.xml</str>
|
||||||
<bool name="ignoreErrors">true</bool>
|
<bool name="ignoreErrors">true</bool>
|
||||||
<!-- This is optional. It is used for logging when text processing fails. Usually, set uniqueKey field name -->
|
<!-- This is optional. It is used for logging when text processing fails. Usually, set uniqueKey field name -->
|
||||||
<str name="logField">id</str>
|
<str name="logField">id</str>
|
|
@ -50,7 +50,7 @@ public class UIMAUpdateRequestProcessorTest extends SolrTestCaseJ4 {
|
||||||
|
|
||||||
@BeforeClass
|
@BeforeClass
|
||||||
public static void beforeClass() throws Exception {
|
public static void beforeClass() throws Exception {
|
||||||
initCore("solrconfig.xml", "schema.xml", "solr-uima");
|
initCore("solrconfig.xml", "schema.xml", getFile("uima/solr").getAbsolutePath());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -441,7 +441,7 @@ abstract public class SolrExampleTests extends SolrJettyTestBase
|
||||||
Assert.assertEquals( 0, rsp.getResults().getNumFound() );
|
Assert.assertEquals( 0, rsp.getResults().getNumFound() );
|
||||||
|
|
||||||
ContentStreamUpdateRequest up = new ContentStreamUpdateRequest("/update/csv");
|
ContentStreamUpdateRequest up = new ContentStreamUpdateRequest("/update/csv");
|
||||||
up.addFile(getFile("books.csv"));
|
up.addFile(getFile("solrj/books.csv"));
|
||||||
up.setAction(AbstractUpdateRequest.ACTION.COMMIT, true, true);
|
up.setAction(AbstractUpdateRequest.ACTION.COMMIT, true, true);
|
||||||
NamedList<Object> result = server.request(up);
|
NamedList<Object> result = server.request(up);
|
||||||
assertNotNull("Couldn't upload books.csv", result);
|
assertNotNull("Couldn't upload books.csv", result);
|
||||||
|
@ -458,8 +458,8 @@ abstract public class SolrExampleTests extends SolrJettyTestBase
|
||||||
Assert.assertEquals( 0, rsp.getResults().getNumFound() );
|
Assert.assertEquals( 0, rsp.getResults().getNumFound() );
|
||||||
|
|
||||||
ContentStreamUpdateRequest up = new ContentStreamUpdateRequest("/update");
|
ContentStreamUpdateRequest up = new ContentStreamUpdateRequest("/update");
|
||||||
up.addFile(getFile("docs1.xml")); // 2
|
up.addFile(getFile("solrj/docs1.xml")); // 2
|
||||||
up.addFile(getFile("docs2.xml")); // 3
|
up.addFile(getFile("solrj/docs2.xml")); // 3
|
||||||
up.setAction(AbstractUpdateRequest.ACTION.COMMIT, true, true);
|
up.setAction(AbstractUpdateRequest.ACTION.COMMIT, true, true);
|
||||||
NamedList<Object> result = server.request(up);
|
NamedList<Object> result = server.request(up);
|
||||||
assertNotNull("Couldn't upload xml files", result);
|
assertNotNull("Couldn't upload xml files", result);
|
||||||
|
|
|
@ -214,7 +214,7 @@ public class TestLBHttpSolrServer extends LuceneTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getSchemaFile() {
|
public String getSchemaFile() {
|
||||||
return "." + File.separator + "solr" + File.separator + "conf" + File.separator + "schema-replication1.xml";
|
return "solrj/solr/conf/schema-replication1.xml";
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getConfDir() {
|
public String getConfDir() {
|
||||||
|
@ -226,9 +226,7 @@ public class TestLBHttpSolrServer extends LuceneTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getSolrConfigFile() {
|
public String getSolrConfigFile() {
|
||||||
String fname = "";
|
return "solrj/solr/conf/solrconfig-slave1.xml";
|
||||||
fname = "." + File.separator + "solr" + File.separator + "conf" + File.separator + "solrconfig-slave1.xml";
|
|
||||||
return fname;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUp() throws Exception {
|
public void setUp() throws Exception {
|
||||||
|
|
|
@ -62,7 +62,7 @@ public class TestSolrProperties extends LuceneTestCase {
|
||||||
private static final XPathFactory xpathFactory = XPathFactory.newInstance();
|
private static final XPathFactory xpathFactory = XPathFactory.newInstance();
|
||||||
|
|
||||||
public String getSolrHome() {
|
public String getSolrHome() {
|
||||||
return "solr/shared";
|
return "solrj/solr/shared";
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getOrigSolrXml() {
|
public String getOrigSolrXml() {
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class QueryResponseTest extends LuceneTestCase {
|
||||||
@Test
|
@Test
|
||||||
public void testDateFacets() throws Exception {
|
public void testDateFacets() throws Exception {
|
||||||
XMLResponseParser parser = new XMLResponseParser();
|
XMLResponseParser parser = new XMLResponseParser();
|
||||||
InputStream is = new SolrResourceLoader(null, null).openResource("sampleDateFacetResponse.xml");
|
InputStream is = new SolrResourceLoader(null, null).openResource("solrj/sampleDateFacetResponse.xml");
|
||||||
assertNotNull(is);
|
assertNotNull(is);
|
||||||
Reader in = new InputStreamReader(is, "UTF-8");
|
Reader in = new InputStreamReader(is, "UTF-8");
|
||||||
NamedList<Object> response = parser.processResponse(in);
|
NamedList<Object> response = parser.processResponse(in);
|
||||||
|
|
|
@ -49,7 +49,7 @@ public class ContentStreamTest extends LuceneTestCase
|
||||||
|
|
||||||
public void testFileStream() throws IOException
|
public void testFileStream() throws IOException
|
||||||
{
|
{
|
||||||
InputStream is = new SolrResourceLoader(null, null).openResource( "README" );
|
InputStream is = new SolrResourceLoader(null, null).openResource( "solrj/README" );
|
||||||
assertNotNull( is );
|
assertNotNull( is );
|
||||||
File file = new File(TEMP_DIR, "README");
|
File file = new File(TEMP_DIR, "README");
|
||||||
FileOutputStream os = new FileOutputStream(file);
|
FileOutputStream os = new FileOutputStream(file);
|
||||||
|
|
|
@ -38,9 +38,10 @@ public class TestSystemIdResolver extends LuceneTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testResolving() throws Exception {
|
public void testResolving() throws Exception {
|
||||||
final ResourceLoader loader = new SolrResourceLoader(SolrTestCaseJ4.TEST_HOME(), this.getClass().getClassLoader());
|
final String testHome = SolrTestCaseJ4.getFile("solrj/solr/conf").getParent();
|
||||||
|
final ResourceLoader loader = new SolrResourceLoader(testHome, this.getClass().getClassLoader());
|
||||||
final SystemIdResolver resolver = new SystemIdResolver(loader);
|
final SystemIdResolver resolver = new SystemIdResolver(loader);
|
||||||
final String fileUri = new File(SolrTestCaseJ4.TEST_HOME()+"/crazy-path-to-config.xml").toURI().toASCIIString();
|
final String fileUri = new File(testHome+"/crazy-path-to-config.xml").toURI().toASCIIString();
|
||||||
|
|
||||||
assertEquals("solrres:/test.xml", SystemIdResolver.createSystemIdFromResourceName("test.xml"));
|
assertEquals("solrres:/test.xml", SystemIdResolver.createSystemIdFromResourceName("test.xml"));
|
||||||
assertEquals("solrres://@/usr/local/etc/test.xml", SystemIdResolver.createSystemIdFromResourceName("/usr/local/etc/test.xml"));
|
assertEquals("solrres://@/usr/local/etc/test.xml", SystemIdResolver.createSystemIdFromResourceName("/usr/local/etc/test.xml"));
|
||||||
|
@ -60,10 +61,10 @@ public class TestSystemIdResolver extends LuceneTestCase {
|
||||||
assertEntityResolving(resolver, "solrres:/schema.xml", "solrres:/solrconfig.xml", "schema.xml");
|
assertEntityResolving(resolver, "solrres:/schema.xml", "solrres:/solrconfig.xml", "schema.xml");
|
||||||
assertEntityResolving(resolver, "solrres:/org/apache/solr/common/util/TestSystemIdResolver.class",
|
assertEntityResolving(resolver, "solrres:/org/apache/solr/common/util/TestSystemIdResolver.class",
|
||||||
"solrres:/org/apache/solr/common/ResourceLoader.class", "util/TestSystemIdResolver.class");
|
"solrres:/org/apache/solr/common/ResourceLoader.class", "util/TestSystemIdResolver.class");
|
||||||
assertEntityResolving(resolver, SystemIdResolver.createSystemIdFromResourceName(SolrTestCaseJ4.TEST_HOME()+"/conf/schema.xml"),
|
assertEntityResolving(resolver, SystemIdResolver.createSystemIdFromResourceName(testHome+"/conf/schema.xml"),
|
||||||
SystemIdResolver.createSystemIdFromResourceName(SolrTestCaseJ4.TEST_HOME()+"/conf/solrconfig.xml"), "schema.xml");
|
SystemIdResolver.createSystemIdFromResourceName(testHome+"/conf/solrconfig.xml"), "schema.xml");
|
||||||
assertEntityResolving(resolver, SystemIdResolver.createSystemIdFromResourceName(SolrTestCaseJ4.TEST_HOME()+"/crazy-path-to-schema.xml"),
|
assertEntityResolving(resolver, SystemIdResolver.createSystemIdFromResourceName(testHome+"/crazy-path-to-schema.xml"),
|
||||||
SystemIdResolver.createSystemIdFromResourceName(SolrTestCaseJ4.TEST_HOME()+"/crazy-path-to-config.xml"), "crazy-path-to-schema.xml");
|
SystemIdResolver.createSystemIdFromResourceName(testHome+"/crazy-path-to-config.xml"), "crazy-path-to-schema.xml");
|
||||||
|
|
||||||
// test, that resolving works if somebody uses an absolute file:-URI in a href attribute, the resolver should return null (default fallback)
|
// test, that resolving works if somebody uses an absolute file:-URI in a href attribute, the resolver should return null (default fallback)
|
||||||
assertNull(resolver.resolveEntity(null, null, "solrres:/solrconfig.xml", fileUri));
|
assertNull(resolver.resolveEntity(null, null, "solrres:/solrconfig.xml", fileUri));
|
||||||
|
|
Loading…
Reference in New Issue