SOLR-4858: increase ulog test coverage

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1488365 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2013-05-31 19:40:51 +00:00
parent 145772accb
commit b3acf03c7e
35 changed files with 44 additions and 2 deletions

View File

@ -394,6 +394,7 @@
termVectors="true" termPositions="true" termOffsets="true"/>
<field name="signatureField" type="string" indexed="true" stored="false"/>
<field name="_version_" type="long" indexed="true" stored="true" multiValued="false" />
<!-- Dynamic field definitions. If a field name is not found, dynamicFields

View File

@ -17,6 +17,7 @@
-->
<schema name="luceneMatchVersionTest" version="1.1">
<types>
<fieldtype name="long" class="solr.TrieLongField"/>
<fieldtype name="string" class="solr.StrField"/>
<fieldtype name="text40" class="solr.TextField">
<analyzer>
@ -50,6 +51,7 @@
<field name="textDefault" type="textDefault" indexed="true" stored="false" />
<field name="textStandardAnalyzer40" type="textStandardAnalyzer40" indexed="true" stored="false" />
<field name="textStandardAnalyzerDefault" type="textStandardAnalyzerDefault" indexed="true" stored="false" />
<field name="_version_" type="long" indexed="true" stored="true" multiValued="false" />
<dynamicField name="*_sS" type="string" indexed="false" stored="true"/>
</fields>
<uniqueKey>id</uniqueKey>

View File

@ -376,7 +376,7 @@
<field name="intDefault" type="sint" indexed="true" stored="true" default="42" multiValued="false"/>
<field name="signatureField" type="string" indexed="true" stored="false"/>
<field name="_version_" type="long" indexed="true" stored="true" multiValued="false" />
<!-- Dynamic field definitions. If a field name is not found, dynamicFields
will be used if the name matches any of the patterns.

View File

@ -25,6 +25,7 @@
<types>
<fieldtype name="long" class="solr.TrieLongField" />
<fieldtype name="integer" class="solr.IntField" />
<fieldtype name="string" class="solr.StrField" />
@ -73,6 +74,8 @@
<field name="two" type="rev" indexed="true" stored="false"/>
<field name="three" type="text" indexed="true" stored="false"/>
<field name="_version_" type="long" indexed="true" stored="true" multiValued="false" />
<field name="signatureField" type="string" indexed="true" stored="false"/>
<dynamicField name="*_sS" type="string" indexed="false" stored="true"/>

View File

@ -282,6 +282,8 @@
<field name="tdate" type="tdate" indexed="true" stored="true" />
<field name="_version_" type="long" indexed="true" stored="true" multiValued="false" />
<!-- Dynamic field definitions. If a field name is not found, dynamicFields
will be used if the name matches any of the patterns.
RESTRICTION: the glob-like pattern in the name attribute must have

View File

@ -322,6 +322,8 @@ valued. -->
<field name="text_no_analyzer" type="text_no_analyzer" indexed="true" />
<field name="_version_" type="long" indexed="true" stored="true" multiValued="false" />
<!-- Dynamic field definitions. If a field name is not found, dynamicFields
will be used if the name matches any of the patterns.
RESTRICTION: the glob-like pattern in the name attribute must have

View File

@ -539,6 +539,8 @@
<field name="uniq3" type="string" indexed="true" stored="true"/>
<field name="nouniq" type="string" indexed="true" stored="true" multiValued="true"/>
<field name="_version_" type="long" indexed="true" stored="true" multiValued="false" />
<dynamicField name="*_coordinate" type="tdouble" indexed="true" stored="false"/>

View File

@ -94,7 +94,7 @@
</listener>
-->
<updateLog enable="${enable.update.log:false}">
<updateLog enable="${enable.update.log:true}">
<str name="dir">${solr.ulog.dir:}</str>
</updateLog>

View File

@ -123,6 +123,7 @@ public class TestDistributedSearch extends BaseDistributedSearchTestCase {
handle.clear();
handle.put("QTime", SKIPVAL);
handle.put("timestamp", SKIPVAL);
handle.put("_version_", SKIPVAL); // not a cloud test, but may use updateLog
// random value sort
for (String f : fieldNames) {

View File

@ -54,6 +54,7 @@ public class TestGroupingSearch extends SolrTestCaseJ4 {
@BeforeClass
public static void beforeTests() throws Exception {
System.setProperty("enable.update.log", "false"); // schema12 doesn't support _version_
initCore("solrconfig.xml", "schema12.xml");
}

View File

@ -37,6 +37,7 @@ public class TestJoin extends SolrTestCaseJ4 {
@BeforeClass
public static void beforeTests() throws Exception {
System.setProperty("enable.update.log", "false"); // schema12 doesn't support _version_
initCore("solrconfig.xml","schema12.xml");
}

View File

@ -37,6 +37,7 @@ public class TestRandomFaceting extends SolrTestCaseJ4 {
@BeforeClass
public static void beforeTests() throws Exception {
System.setProperty("enable.update.log", "false"); // schema12 doesn't support _version_
initCore("solrconfig.xml","schema12.xml");
}

View File

@ -50,6 +50,7 @@ public class TestArbitraryIndexDir extends AbstractSolrTestCase{
static String savedFactory;
@BeforeClass
public static void beforeClass() {
System.setProperty("enable.update.log", "false"); // schema12 doesn't support _version_
savedFactory = System.getProperty("solr.DirectoryFactory");
System.setProperty("solr.directoryFactory", "org.apache.solr.core.MockFSDirectoryFactory");
}

View File

@ -35,6 +35,7 @@ public class TestCSVLoader extends SolrTestCaseJ4 {
@BeforeClass
public static void beforeClass() throws Exception {
System.setProperty("enable.update.log", "false"); // schema12 doesn't support _version_
initCore("solrconfig.xml","schema12.xml");
}

View File

@ -35,6 +35,7 @@ public class LukeRequestHandlerTest extends AbstractSolrTestCase {
@BeforeClass
public static void beforeClass() throws Exception {
System.setProperty("enable.update.log", "false"); // schema12 doesn't support _version_
initCore("solrconfig.xml", "schema12.xml");
}

View File

@ -31,6 +31,7 @@ public class TermVectorComponentDistributedTest extends BaseDistributedSearchTes
handle.put("maxScore", SKIPVAL);
handle.put("score", SKIPVAL);
handle.put("[docid]", SKIPVAL);
handle.put("_version_", SKIPVAL); // not a cloud test, but may use updateLog
// SOLR-3720: TODO: TVC doesn't "merge" df and idf .. should it?
handle.put("df", SKIPVAL);

View File

@ -32,6 +32,7 @@ public class TermsComponentTest extends SolrTestCaseJ4 {
@BeforeClass
public static void beforeTest() throws Exception {
System.setProperty("enable.update.log", "false"); // schema12 doesn't support _version_
initCore("solrconfig.xml","schema12.xml");
assertNull(h.validateUpdate(adoc("id", "0", "lowerfilt", "a", "standardfilt", "a", "foo_i","1")));

View File

@ -45,6 +45,7 @@ public class TestBinaryResponseWriter extends AbstractSolrTestCase {
@BeforeClass
public static void beforeClass() throws Exception {
System.setProperty("enable.update.log", "false"); // schema12 doesn't support _version_
initCore("solrconfig.xml", "schema12.xml");
}

View File

@ -32,6 +32,7 @@ import java.util.Arrays;
public class TestCSVResponseWriter extends SolrTestCaseJ4 {
@BeforeClass
public static void beforeClass() throws Exception {
System.setProperty("enable.update.log", "false"); // schema12 doesn't support _version_
initCore("solrconfig.xml","schema12.xml");
createIndex();
}

View File

@ -32,6 +32,7 @@ public class NotRequiredUniqueKeyTest extends SolrTestCaseJ4 {
@BeforeClass
public static void beforeTests() throws Exception {
System.setProperty("enable.update.log", "false"); // usecase doesn't work with updateLog
initCore("solrconfig.xml","schema-not-required-unique-key.xml");
}

View File

@ -40,6 +40,7 @@ public class PrimitiveFieldTypeTest extends SolrTestCaseJ4 {
public void setUp() throws Exception {
super.setUp();
// set some system properties for use by tests
System.setProperty("enable.update.log", "false"); // schema12 doesn't support _version_
System.setProperty("solr.test.sys.prop1", "propone");
System.setProperty("solr.test.sys.prop2", "proptwo");

View File

@ -47,6 +47,7 @@ public class ReturnFieldsTest extends SolrTestCaseJ4 {
@BeforeClass
public static void beforeClass() throws Exception {
System.setProperty("enable.update.log", "false"); // schema12 doesn't support _version_
initCore("solrconfig.xml", "schema12.xml");
String v = "how now brown cow";
assertU(adoc("id","1", "text",v, "text_np", v, "#foo_s", v));

View File

@ -41,6 +41,7 @@ public class TestExtendedDismaxParser extends SolrTestCaseJ4 {
@BeforeClass
public static void beforeClass() throws Exception {
System.setProperty("enable.update.log", "false"); // schema12 doesn't support _version_
initCore("solrconfig.xml", "schema12.xml");
index();
}

View File

@ -31,6 +31,7 @@ public class TestFiltering extends SolrTestCaseJ4 {
@BeforeClass
public static void beforeTests() throws Exception {
System.setProperty("enable.update.log", "false"); // schema12 doesn't support _version_
initCore("solrconfig.xml","schema12.xml");
}

View File

@ -49,6 +49,7 @@ public class TestPseudoReturnFields extends SolrTestCaseJ4 {
@BeforeClass
public static void beforeTests() throws Exception {
System.setProperty("enable.update.log", "false"); // schema12 doesn't support _version_
initCore("solrconfig.xml","schema12.xml");

View File

@ -25,6 +25,7 @@ import org.junit.Test;
public class TestSolrQueryParser extends SolrTestCaseJ4 {
@BeforeClass
public static void beforeClass() throws Exception {
System.setProperty("enable.update.log", "false"); // schema12 doesn't support _version_
initCore("solrconfig.xml", "schema12.xml");
createIndex();
}

View File

@ -30,6 +30,7 @@ import org.junit.Test;
public class DistanceFunctionTest extends SolrTestCaseJ4 {
@BeforeClass
public static void beforeClass() throws Exception {
System.setProperty("enable.update.log", "false"); // schema12 doesn't support _version_
initCore("solrconfig.xml", "schema12.xml");
}

View File

@ -35,6 +35,7 @@ public class DirectUpdateHandlerOptimizeTest extends AbstractSolrTestCase {
@BeforeClass
public static void beforeClass() throws Exception {
System.setProperty("enable.update.log", "false"); // schema12 doesn't support _version_
initCore("solrconfig.xml", "schema12.xml");
}

View File

@ -45,6 +45,7 @@ public class DirectUpdateHandlerTest extends SolrTestCaseJ4 {
public static void beforeClass() throws Exception {
savedFactory = System.getProperty("solr.DirectoryFactory");
System.setProperty("solr.directoryFactory", "org.apache.solr.core.MockFSDirectoryFactory");
System.setProperty("enable.update.log", "false"); // schema12 doesn't support _version_
initCore("solrconfig.xml", "schema12.xml");
}

View File

@ -45,6 +45,7 @@ public class SolrIndexSplitterTest extends SolrTestCaseJ4 {
@BeforeClass
public static void beforeClass() throws Exception {
System.setProperty("enable.update.log", "false"); // schema12 doesn't support _version_
initCore("solrconfig.xml", "schema12.xml");
}

View File

@ -24,6 +24,7 @@ public class TestAtomicUpdateErrorCases extends SolrTestCaseJ4 {
public void testUpdateNoTLog() throws Exception {
try {
System.setProperty("enable.update.log", "false");
initCore("solrconfig.xml","schema15.xml");
UpdateHandler uh = h.getCore().getUpdateHandler();
@ -56,6 +57,7 @@ public class TestAtomicUpdateErrorCases extends SolrTestCaseJ4 {
}
} finally {
System.clearProperty("enable.update.log");
deleteCore();
}
}

View File

@ -38,6 +38,7 @@ public class RegexBoostProcessorTest extends SolrTestCaseJ4 {
@BeforeClass
public static void setUpBeforeClass() throws Exception {
System.setProperty("enable.update.log", "false"); // schema12 doesn't support _version_
initCore("solrconfig.xml", "schema12.xml");
SolrCore core = h.getCore();
_parser = new SolrRequestParsers( null );

View File

@ -52,6 +52,7 @@ public class SignatureUpdateProcessorFactoryTest extends SolrTestCaseJ4 {
@BeforeClass
public static void beforeClass() throws Exception {
System.setProperty("enable.update.log", "false"); // schema12 doesn't support _version_
initCore("solrconfig.xml", "schema12.xml");
}

View File

@ -43,6 +43,7 @@ public class UniqFieldsUpdateProcessorFactoryTest extends SolrTestCaseJ4 {
@BeforeClass
public static void beforeClass() throws Exception {
System.setProperty("enable.update.log", "false"); // schema12 doesn't support _version_
initCore("solrconfig.xml", "schema12.xml");
}

View File

@ -86,6 +86,8 @@ public abstract class SolrTestCaseJ4 extends LuceneTestCase {
@SuppressWarnings("unused")
private static void beforeClass() {
System.setProperty("jetty.testMode", "true");
System.setProperty("enable.update.log", usually() ? "true" : "false");
System.setProperty("enable.update.log", "true"); // :nocommit:
System.setProperty("tests.shardhandler.randomSeed", Long.toString(random().nextLong()));
setupLogging();
startTrackingSearchers();
@ -104,6 +106,7 @@ public abstract class SolrTestCaseJ4 extends LuceneTestCase {
coreName = CoreContainer.DEFAULT_DEFAULT_CORE_NAME;
System.clearProperty("jetty.testMode");
System.clearProperty("tests.shardhandler.randomSeed");
System.clearProperty("enable.update.log");
}
private static boolean changedFactory = false;