Skip to content

Apache Lucene open-source search software

test cleanup -- remove the _version_ field from schema12.xml, and update the two tess that might care to use schema15.xml. Change is motivated by SOLR-3432 (we shouldn't be updating all 'old' configs when features are added, we need tests using older style configs to ensure we don't break stuff)

Chris M. Hostetterb61381fd330b
diff --git a/solr/core/src/test-files/solr/conf/schema12.xml b/solr/core/src/test-files/solr/conf/schema12.xml
index 89fbf309dfd..b6cc3c0e9bf 100755
--- a/solr/core/src/test-files/solr/conf/schema12.xml
+++ b/solr/core/src/test-files/solr/conf/schema12.xml
@@ -530,10 +530,13 @@
<field name="uniq3" type="string" indexed="true" stored="true"/>
<field name="nouniq" type="string" indexed="true" stored="true" multiValued="true"/>
- <!-- for versioning -->
- <field name="_version_" type="long" indexed="true" stored="true"/>
-
+ <!--
+ DO NOT INCLUDE _version_ in this schema file
+ We explicitly want tests using this file to *NOT* have this field
+ so we can verify that Solr behaves correctly w/o it in those sitautions
+ -->
+ <!-- <field name="_version_" type="long" indexed="true" stored="true"/> -->
<dynamicField name="*_coordinate" type="tdouble" indexed="true" stored="false"/>
diff --git a/solr/core/src/test/org/apache/solr/search/TestRealTimeGet.java b/solr/core/src/test/org/apache/solr/search/TestRealTimeGet.java
index a905b8e1fd1..0feb94a7ca9 100644
--- a/solr/core/src/test/org/apache/solr/search/TestRealTimeGet.java
+++ b/solr/core/src/test/org/apache/solr/search/TestRealTimeGet.java
@@ -55,7 +55,7 @@ public class TestRealTimeGet extends SolrTestCaseJ4 {
@BeforeClass
public static void beforeClass() throws Exception {
- initCore("solrconfig-tlog.xml","schema12.xml");
+ initCore("solrconfig-tlog.xml","schema15.xml");
}
@Test
diff --git a/solr/core/src/test/org/apache/solr/search/TestRecovery.java b/solr/core/src/test/org/apache/solr/search/TestRecovery.java
index 22e656c1349..4fd5e2621a5 100644
--- a/solr/core/src/test/org/apache/solr/search/TestRecovery.java
+++ b/solr/core/src/test/org/apache/solr/search/TestRecovery.java
@@ -52,7 +52,7 @@ public class TestRecovery extends SolrTestCaseJ4 {
public static void beforeClass() throws Exception {
savedFactory = System.getProperty("solr.DirectoryFactory");
System.setProperty("solr.directoryFactory", "org.apache.solr.core.MockFSDirectoryFactory");
- initCore("solrconfig-tlog.xml","schema12.xml");
+ initCore("solrconfig-tlog.xml","schema15.xml");
}
@AfterClass