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;
|
||||
|
||||
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',
|
||||
|
||||
'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-files',
|
||||
=> 'solr/contrib/clustering/src/test-files/clustering',
|
||||
|
||||
'solr/contrib/clustering/src/main/java'
|
||||
=> 'solr/contrib/clustering/src/java',
|
||||
|
@ -42,8 +51,11 @@ my @moves = (
|
|||
'solr/contrib/dataimporthandler/src/test/java'
|
||||
=> '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-files',
|
||||
=> 'solr/contrib/dataimporthandler/src/test-files/dih',
|
||||
|
||||
'solr/contrib/dataimporthandler/src/main/java'
|
||||
=> 'solr/contrib/dataimporthandler/src/java',
|
||||
|
@ -54,8 +66,11 @@ my @moves = (
|
|||
'solr/contrib/dataimporthandler/src/extras/test/java'
|
||||
=> '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-extras/src/test-files',
|
||||
=> 'solr/contrib/dataimporthandler-extras/src/test-files/dihextras',
|
||||
|
||||
'solr/contrib/dataimporthandler/src/extras/main/java'
|
||||
=> 'solr/contrib/dataimporthandler-extras/src/java',
|
||||
|
@ -63,8 +78,11 @@ my @moves = (
|
|||
'solr/contrib/extraction/src/test/java'
|
||||
=> '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-files',
|
||||
=> 'solr/contrib/extraction/src/test-files/extraction',
|
||||
|
||||
'solr/contrib/extraction/src/main/java'
|
||||
=> 'solr/contrib/extraction/src/java',
|
||||
|
@ -72,8 +90,11 @@ my @moves = (
|
|||
'solr/contrib/uima/src/test/java'
|
||||
=> '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-files',
|
||||
=> 'solr/contrib/uima/src/test-files/uima',
|
||||
|
||||
'solr/contrib/uima/src/main/java'
|
||||
=> 'solr/contrib/uima/src/java',
|
||||
|
@ -82,13 +103,13 @@ my @moves = (
|
|||
=> 'solr/contrib/uima/src/resources',
|
||||
|
||||
'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/solrj/src/test-files/sampleDateFacetResponse.xml',
|
||||
=> 'solr/solrj/src/test-files/solrj/sampleDateFacetResponse.xml',
|
||||
|
||||
'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/solrj/src/java',
|
||||
|
@ -150,19 +171,19 @@ my @moves = (
|
|||
|
||||
my @copies = (
|
||||
'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/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/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/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/solrj/src/test-files/solr/conf/solrconfig-slave1.xml',
|
||||
=> 'solr/solrj/src/test-files/solrj/solr/conf/solrconfig-slave1.xml',
|
||||
);
|
||||
|
||||
my $diff;
|
||||
|
|
|
@ -373,11 +373,12 @@ Bug Fixes
|
|||
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
|
||||
Lucene build system and eliminated duplication.
|
||||
- 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/,
|
||||
test/, and test-files/ directories from solr/src/ to solr/core/src/.
|
||||
- Merged solr/src/webapp/src/ into solr/core/src/java/.
|
||||
|
|
|
@ -74,8 +74,8 @@ public class TestICUCollationField extends SolrTestCaseJ4 {
|
|||
confDir.mkdir();
|
||||
|
||||
// copy over configuration files
|
||||
FileUtils.copyFile(getFile("solr-analysis-extras/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/solrconfig-icucollate.xml"), new File(confDir, "solrconfig.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
|
||||
RuleBasedCollator baseCollator = (RuleBasedCollator) Collator.getInstance(new ULocale("de", "DE"));
|
||||
|
|
|
@ -28,7 +28,7 @@ public abstract class AbstractClusteringTestCase extends SolrTestCaseJ4 {
|
|||
|
||||
@BeforeClass
|
||||
public static void beforeClass() throws Exception {
|
||||
initCore("solrconfig.xml", "schema.xml", "solr-clustering");
|
||||
initCore("solrconfig.xml", "schema.xml", "clustering/solr");
|
||||
numberOfDocs = 0;
|
||||
for (String[] doc : DOCUMENTS) {
|
||||
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
|
||||
public String getSolrHome() {
|
||||
// TODO: this should work with just "solr-clustering"...
|
||||
return getFile("solr-clustering").getAbsolutePath();
|
||||
return "clustering/solr";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -40,7 +40,7 @@ public class TestTikaEntityProcessor extends AbstractDataImportHandlerTestCase {
|
|||
"<dataConfig>" +
|
||||
" <dataSource type=\"BinFileDataSource\"/>" +
|
||||
" <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=\"title\" meta=\"true\" name=\"title\"/>" +
|
||||
" <field column=\"text\"/>" +
|
||||
|
@ -58,7 +58,7 @@ public class TestTikaEntityProcessor extends AbstractDataImportHandlerTestCase {
|
|||
|
||||
@BeforeClass
|
||||
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
|
||||
|
|
|
@ -54,7 +54,7 @@ public abstract class AbstractDataImportHandlerTestCase extends
|
|||
|
||||
// note, a little twisted that we shadow this static method
|
||||
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
|
||||
|
|
|
@ -39,7 +39,7 @@ import java.util.List;
|
|||
* @since solr 1.4
|
||||
*/
|
||||
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;
|
||||
JettySolrRunner jetty;
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ import org.junit.Test;
|
|||
public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
||||
@BeforeClass
|
||||
public static void beforeClass() throws Exception {
|
||||
initCore("solrconfig.xml", "schema.xml", "solr-extraction");
|
||||
initCore("solrconfig.xml", "schema.xml", getFile("extraction/solr").getAbsolutePath());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -56,7 +56,7 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
|||
public void testExtraction() throws Exception {
|
||||
ExtractingRequestHandler handler = (ExtractingRequestHandler) h.getCore().getRequestHandler("/update/extract");
|
||||
assertTrue("handler is null and it shouldn't be", handler != null);
|
||||
loadLocal("solr-word.pdf",
|
||||
loadLocal("extraction/solr-word.pdf",
|
||||
"fmap.created", "extractedDate",
|
||||
"fmap.producer", "extractedProducer",
|
||||
"fmap.creator", "extractedCreator", "fmap.Keywords", "extractedKeywords",
|
||||
|
@ -73,7 +73,7 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
|||
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.Author", "extractedAuthor",
|
||||
"fmap.language", "extractedLanguage",
|
||||
|
@ -86,7 +86,7 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
|||
assertQ(req("title:Welcome"), "//*[@numFound='1']");
|
||||
|
||||
|
||||
loadLocal("simple.html",
|
||||
loadLocal("extraction/simple.html",
|
||||
"literal.id","simple2",
|
||||
"uprefix", "t_",
|
||||
"lowernames", "true",
|
||||
|
@ -105,7 +105,7 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
|||
assertQ(req("+id:simple2 +t_abcxyz:[* TO *]"), "//*[@numFound='1']");
|
||||
|
||||
// load again in the exact same way, but boost one field
|
||||
loadLocal("simple.html",
|
||||
loadLocal("extraction/simple.html",
|
||||
"literal.id","simple3",
|
||||
"uprefix", "t_",
|
||||
"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
|
||||
|
||||
// test capture
|
||||
loadLocal("simple.html",
|
||||
loadLocal("extraction/simple.html",
|
||||
"literal.id","simple4",
|
||||
"uprefix", "t_",
|
||||
"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_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.Author", "extractedAuthor",
|
||||
"literal.id", "three",
|
||||
|
@ -152,7 +152,7 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
|||
try {
|
||||
ignoreException("unknown field 'a'");
|
||||
ignoreException("unknown field 'meta'"); // TODO: should this exception be happening?
|
||||
loadLocal("simple.html",
|
||||
loadLocal("extraction/simple.html",
|
||||
"literal.id","simple2",
|
||||
"lowernames", "true",
|
||||
"captureAttr", "true",
|
||||
|
@ -168,7 +168,7 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
|||
}
|
||||
|
||||
|
||||
loadLocal("simple.html",
|
||||
loadLocal("extraction/simple.html",
|
||||
"literal.id","simple2",
|
||||
ExtractingParams.DEFAULT_FIELD, "defaultExtr",//test that unmapped fields go to the text field when no uprefix is specified
|
||||
"lowernames", "true",
|
||||
|
@ -180,7 +180,7 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
|||
assertQ(req("defaultExtr:http\\://www.apache.org"), "//*[@numFound='1']");
|
||||
|
||||
//Test when both uprefix and default are specified.
|
||||
loadLocal("simple.html",
|
||||
loadLocal("extraction/simple.html",
|
||||
"literal.id","simple2",
|
||||
ExtractingParams.DEFAULT_FIELD, "defaultExtr",//test that unmapped fields go to the text field when no uprefix is specified
|
||||
ExtractingParams.UNKNOWN_FIELD_PREFIX, "t_",
|
||||
|
@ -198,7 +198,7 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
|||
ExtractingRequestHandler handler = (ExtractingRequestHandler) h.getCore().getRequestHandler("/update/extract");
|
||||
assertTrue("handler is null and it shouldn't be", handler != null);
|
||||
//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.Author", "extractedAuthor",
|
||||
"fmap.content", "extractedContent",
|
||||
|
@ -217,7 +217,7 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
|||
assertQ(req("extractionLiteralMV:two"), "//*[@numFound='1']");
|
||||
|
||||
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.Author", "extractedAuthor",
|
||||
"fmap.content", "extractedContent",
|
||||
|
@ -233,7 +233,7 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
|||
//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.Author", "extractedAuthor",
|
||||
"fmap.content", "extractedContent",
|
||||
|
@ -253,7 +253,7 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
|||
assertTrue("handler is null and it shouldn't be", handler != null);
|
||||
|
||||
// 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.Author", "extractedAuthor",
|
||||
"literal.id", "one",
|
||||
|
@ -272,13 +272,13 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
|||
assertTrue("handler is null and it shouldn't be", handler != null);
|
||||
|
||||
// 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.Author", "extractedAuthor",
|
||||
"literal.id", "one",
|
||||
"fmap.language", "extractedLanguage",
|
||||
"fmap.content", "extractedContent",
|
||||
ExtractingParams.RESOURCE_NAME, "version_control.txt"
|
||||
ExtractingParams.RESOURCE_NAME, "extraction/version_control.txt"
|
||||
);
|
||||
assertQ(req("extractedContent:Apache"), "//*[@numFound='0']");
|
||||
assertU(commit());
|
||||
|
@ -292,7 +292,7 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
|||
public void testExtractOnly() throws Exception {
|
||||
ExtractingRequestHandler handler = (ExtractingRequestHandler) h.getCore().getRequestHandler("/update/extract");
|
||||
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);
|
||||
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(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);
|
||||
assertTrue("rsp is null and it shouldn't be", rsp != null);
|
||||
list = rsp.getValues();
|
||||
|
@ -329,7 +329,7 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
|||
public void testXPath() throws Exception {
|
||||
ExtractingRequestHandler handler = (ExtractingRequestHandler) h.getCore().getRequestHandler("/update/extract");
|
||||
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.EXTRACT_ONLY, "true"
|
||||
);
|
||||
|
@ -347,7 +347,7 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
|||
h.getCore().getRequestHandler("/update/extract");
|
||||
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.Creation-Date", "extractedDate",
|
||||
"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);
|
||||
|
||||
try{
|
||||
loadLocal("password-is-solrcell.docx",
|
||||
loadLocal("extraction/password-is-solrcell.docx",
|
||||
"literal.id", "one");
|
||||
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]");
|
||||
|
||||
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.Creation-Date", "extractedDate",
|
||||
"fmap.AAPL:Keywords", "ignored_a",
|
||||
|
|
|
@ -959,7 +959,7 @@
|
|||
<lst name="runtimeParameters">
|
||||
<int name="ngramsize">3</int>
|
||||
</lst>
|
||||
<str name="analysisEngine">/TestAE.xml</str>
|
||||
<str name="analysisEngine">/uima/TestAE.xml</str>
|
||||
<lst name="analyzeFields">
|
||||
<bool name="merge">false</bool>
|
||||
<arr name="fields">
|
||||
|
@ -1001,7 +1001,7 @@
|
|||
<lst name="runtimeParameters">
|
||||
<int name="ngramsize">3</int>
|
||||
</lst>
|
||||
<str name="analysisEngine">/TestAE.xml</str>
|
||||
<str name="analysisEngine">/uima/TestAE.xml</str>
|
||||
<lst name="analyzeFields">
|
||||
<bool name="merge">false</bool>
|
||||
<arr name="fields">
|
||||
|
@ -1031,7 +1031,7 @@
|
|||
<lst name="runtimeParameters">
|
||||
<int name="ngramsize">3</int>
|
||||
</lst>
|
||||
<str name="analysisEngine">/TestExceptionAE.xml</str>
|
||||
<str name="analysisEngine">/uima/TestExceptionAE.xml</str>
|
||||
<bool name="ignoreErrors">false</bool>
|
||||
<lst name="analyzeFields">
|
||||
<bool name="merge">false</bool>
|
||||
|
@ -1051,7 +1051,7 @@
|
|||
<lst name="runtimeParameters">
|
||||
<int name="ngramsize">3</int>
|
||||
</lst>
|
||||
<str name="analysisEngine">/TestExceptionAE.xml</str>
|
||||
<str name="analysisEngine">/uima/TestExceptionAE.xml</str>
|
||||
<bool name="ignoreErrors">true</bool>
|
||||
<!-- This is optional. It is used for logging when text processing fails. Usually, set uniqueKey field name -->
|
||||
<str name="logField">id</str>
|
|
@ -50,7 +50,7 @@ public class UIMAUpdateRequestProcessorTest extends SolrTestCaseJ4 {
|
|||
|
||||
@BeforeClass
|
||||
public static void beforeClass() throws Exception {
|
||||
initCore("solrconfig.xml", "schema.xml", "solr-uima");
|
||||
initCore("solrconfig.xml", "schema.xml", getFile("uima/solr").getAbsolutePath());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -441,7 +441,7 @@ abstract public class SolrExampleTests extends SolrJettyTestBase
|
|||
Assert.assertEquals( 0, rsp.getResults().getNumFound() );
|
||||
|
||||
ContentStreamUpdateRequest up = new ContentStreamUpdateRequest("/update/csv");
|
||||
up.addFile(getFile("books.csv"));
|
||||
up.addFile(getFile("solrj/books.csv"));
|
||||
up.setAction(AbstractUpdateRequest.ACTION.COMMIT, true, true);
|
||||
NamedList<Object> result = server.request(up);
|
||||
assertNotNull("Couldn't upload books.csv", result);
|
||||
|
@ -458,8 +458,8 @@ abstract public class SolrExampleTests extends SolrJettyTestBase
|
|||
Assert.assertEquals( 0, rsp.getResults().getNumFound() );
|
||||
|
||||
ContentStreamUpdateRequest up = new ContentStreamUpdateRequest("/update");
|
||||
up.addFile(getFile("docs1.xml")); // 2
|
||||
up.addFile(getFile("docs2.xml")); // 3
|
||||
up.addFile(getFile("solrj/docs1.xml")); // 2
|
||||
up.addFile(getFile("solrj/docs2.xml")); // 3
|
||||
up.setAction(AbstractUpdateRequest.ACTION.COMMIT, true, true);
|
||||
NamedList<Object> result = server.request(up);
|
||||
assertNotNull("Couldn't upload xml files", result);
|
||||
|
|
|
@ -214,7 +214,7 @@ public class TestLBHttpSolrServer extends LuceneTestCase {
|
|||
}
|
||||
|
||||
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() {
|
||||
|
@ -226,9 +226,7 @@ public class TestLBHttpSolrServer extends LuceneTestCase {
|
|||
}
|
||||
|
||||
public String getSolrConfigFile() {
|
||||
String fname = "";
|
||||
fname = "." + File.separator + "solr" + File.separator + "conf" + File.separator + "solrconfig-slave1.xml";
|
||||
return fname;
|
||||
return "solrj/solr/conf/solrconfig-slave1.xml";
|
||||
}
|
||||
|
||||
public void setUp() throws Exception {
|
||||
|
|
|
@ -62,7 +62,7 @@ public class TestSolrProperties extends LuceneTestCase {
|
|||
private static final XPathFactory xpathFactory = XPathFactory.newInstance();
|
||||
|
||||
public String getSolrHome() {
|
||||
return "solr/shared";
|
||||
return "solrj/solr/shared";
|
||||
}
|
||||
|
||||
public String getOrigSolrXml() {
|
||||
|
|
|
@ -39,7 +39,7 @@ public class QueryResponseTest extends LuceneTestCase {
|
|||
@Test
|
||||
public void testDateFacets() throws Exception {
|
||||
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);
|
||||
Reader in = new InputStreamReader(is, "UTF-8");
|
||||
NamedList<Object> response = parser.processResponse(in);
|
||||
|
|
|
@ -49,7 +49,7 @@ public class ContentStreamTest extends LuceneTestCase
|
|||
|
||||
public void testFileStream() throws IOException
|
||||
{
|
||||
InputStream is = new SolrResourceLoader(null, null).openResource( "README" );
|
||||
InputStream is = new SolrResourceLoader(null, null).openResource( "solrj/README" );
|
||||
assertNotNull( is );
|
||||
File file = new File(TEMP_DIR, "README");
|
||||
FileOutputStream os = new FileOutputStream(file);
|
||||
|
|
|
@ -38,9 +38,10 @@ public class TestSystemIdResolver extends LuceneTestCase {
|
|||
}
|
||||
|
||||
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 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://@/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:/org/apache/solr/common/util/TestSystemIdResolver.class",
|
||||
"solrres:/org/apache/solr/common/ResourceLoader.class", "util/TestSystemIdResolver.class");
|
||||
assertEntityResolving(resolver, SystemIdResolver.createSystemIdFromResourceName(SolrTestCaseJ4.TEST_HOME()+"/conf/schema.xml"),
|
||||
SystemIdResolver.createSystemIdFromResourceName(SolrTestCaseJ4.TEST_HOME()+"/conf/solrconfig.xml"), "schema.xml");
|
||||
assertEntityResolving(resolver, SystemIdResolver.createSystemIdFromResourceName(SolrTestCaseJ4.TEST_HOME()+"/crazy-path-to-schema.xml"),
|
||||
SystemIdResolver.createSystemIdFromResourceName(SolrTestCaseJ4.TEST_HOME()+"/crazy-path-to-config.xml"), "crazy-path-to-schema.xml");
|
||||
assertEntityResolving(resolver, SystemIdResolver.createSystemIdFromResourceName(testHome+"/conf/schema.xml"),
|
||||
SystemIdResolver.createSystemIdFromResourceName(testHome+"/conf/solrconfig.xml"), "schema.xml");
|
||||
assertEntityResolving(resolver, SystemIdResolver.createSystemIdFromResourceName(testHome+"/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)
|
||||
assertNull(resolver.resolveEntity(null, null, "solrres:/solrconfig.xml", fileUri));
|
||||
|
|
Loading…
Reference in New Issue