Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-10177: replace adhoc points randomization with new standard introduced by SOLR-10864

Chris Hostetterc20d3aff9474
diff --git a/solr/core/src/test-files/solr/collection1/conf/schema-inplace-updates.xml b/solr/core/src/test-files/solr/collection1/conf/schema-inplace-updates.xml
index 4ed48f6759a..1a4e1302aad 100644
--- a/solr/core/src/test-files/solr/collection1/conf/schema-inplace-updates.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/schema-inplace-updates.xml
@@ -60,8 +60,8 @@
<fieldType name="string" class="solr.StrField" multiValued="false" indexed="false" stored="false" docValues="false" />
- <fieldType name="long" class="solr.${solr.tests.longClassName}" multiValued="false" indexed="false" stored="false" docValues="false"/>
- <fieldType name="float" class="solr.${solr.tests.floatClassName}" multiValued="false" indexed="false" stored="false" docValues="false"/>
- <fieldType name="int" class="solr.${solr.tests.intClassName}" multiValued="false" indexed="false" stored="false" docValues="false"/>
+ <fieldType name="long" class="${solr.tests.LongFieldType}" multiValued="false" indexed="false" stored="false" docValues="false"/>
+ <fieldType name="float" class="${solr.tests.FloatFieldType}" multiValued="false" indexed="false" stored="false" docValues="false"/>
+ <fieldType name="int" class="${solr.tests.IntegerFieldType}" multiValued="false" indexed="false" stored="false" docValues="false"/>
</schema>
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestStressInPlaceUpdates.java b/solr/core/src/test/org/apache/solr/cloud/TestStressInPlaceUpdates.java
index 9f371d4d0a2..e1610954130 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestStressInPlaceUpdates.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestStressInPlaceUpdates.java
@@ -44,7 +44,6 @@ import org.apache.solr.common.cloud.ZkStateReader;
import org.apache.solr.common.params.ModifiableSolrParams;
import org.apache.solr.common.util.NamedList;
import org.apache.zookeeper.KeeperException;
-import org.junit.After;
import org.junit.BeforeClass;
import org.junit.Test;
import org.slf4j.Logger;
@@ -56,11 +55,6 @@ public class TestStressInPlaceUpdates extends AbstractFullDistribZkTestBase {
@BeforeClass
public static void beforeSuperClass() throws Exception {
- System.setProperty("solr.tests.intClassName", random().nextBoolean()? "TrieIntField": "IntPointField");
- System.setProperty("solr.tests.longClassName", random().nextBoolean()? "TrieLongField": "LongPointField");
- System.setProperty("solr.tests.floatClassName", random().nextBoolean()? "TrieFloatField": "FloatPointField");
- System.setProperty("solr.tests.doubleClassName", random().nextBoolean()? "TrieDoubleField": "DoublePointField");
-
schemaString = "schema-inplace-updates.xml";
configString = "solrconfig-tlog.xml";
@@ -72,14 +66,6 @@ public class TestStressInPlaceUpdates extends AbstractFullDistribZkTestBase {
assertEquals(-1, h.getCore().getSolrConfig().getUpdateHandlerInfo().autoSoftCommmitMaxDocs);
}
- @After
- public void after() {
- System.clearProperty("solr.tests.intClassName");
- System.clearProperty("solr.tests.longClassName");
- System.clearProperty("solr.tests.floatClassName");
- System.clearProperty("solr.tests.doubleClassName");
- }
-
public TestStressInPlaceUpdates() {
super();
sliceCount = 1;
diff --git a/solr/core/src/test/org/apache/solr/update/TestInPlaceUpdatesDistrib.java b/solr/core/src/test/org/apache/solr/update/TestInPlaceUpdatesDistrib.java
index 588ecce2ac3..9a24c2a5653 100644
--- a/solr/core/src/test/org/apache/solr/update/TestInPlaceUpdatesDistrib.java
+++ b/solr/core/src/test/org/apache/solr/update/TestInPlaceUpdatesDistrib.java
@@ -59,7 +59,6 @@ import org.apache.solr.update.processor.DistributedUpdateProcessor;
import org.apache.solr.util.DefaultSolrThreadFactory;
import org.apache.solr.util.RefCounted;
import org.apache.zookeeper.KeeperException;
-import org.junit.After;
import org.junit.BeforeClass;
import org.junit.Test;
import org.slf4j.Logger;
@@ -75,11 +74,6 @@ public class TestInPlaceUpdatesDistrib extends AbstractFullDistribZkTestBase {
@BeforeClass
public static void beforeSuperClass() throws Exception {
- System.setProperty("solr.tests.intClassName", random().nextBoolean()? "TrieIntField": "IntPointField");
- System.setProperty("solr.tests.longClassName", random().nextBoolean()? "TrieLongField": "LongPointField");
- System.setProperty("solr.tests.floatClassName", random().nextBoolean()? "TrieFloatField": "FloatPointField");
- System.setProperty("solr.tests.doubleClassName", random().nextBoolean()? "TrieDoubleField": "DoublePointField");
-
schemaString = "schema-inplace-updates.xml";
configString = "solrconfig-tlog.xml";
@@ -111,14 +105,6 @@ public class TestInPlaceUpdatesDistrib extends AbstractFullDistribZkTestBase {
return onlyLeaderIndexes;
}
- @After
- public void after() {
- System.clearProperty("solr.tests.intClassName");
- System.clearProperty("solr.tests.longClassName");
- System.clearProperty("solr.tests.floatClassName");
- System.clearProperty("solr.tests.doubleClassName");
- }
-
public TestInPlaceUpdatesDistrib() throws Exception {
super();
sliceCount = 1;
diff --git a/solr/core/src/test/org/apache/solr/update/TestInPlaceUpdatesStandalone.java b/solr/core/src/test/org/apache/solr/update/TestInPlaceUpdatesStandalone.java
index 88b1b6db3c0..b86af8fc01c 100644
--- a/solr/core/src/test/org/apache/solr/update/TestInPlaceUpdatesStandalone.java
+++ b/solr/core/src/test/org/apache/solr/update/TestInPlaceUpdatesStandalone.java
@@ -51,7 +51,6 @@ import org.apache.solr.schema.SchemaField;
import org.apache.solr.search.SolrIndexSearcher;
import org.apache.solr.update.processor.AtomicUpdateDocumentMerger;
import org.apache.solr.util.RefCounted;
-import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
@@ -66,11 +65,6 @@ public class TestInPlaceUpdatesStandalone extends SolrTestCaseJ4 {
@BeforeClass
public static void beforeClass() throws Exception {
- System.setProperty("solr.tests.intClassName", random().nextBoolean()? "TrieIntField": "IntPointField");
- System.setProperty("solr.tests.longClassName", random().nextBoolean()? "TrieLongField": "LongPointField");
- System.setProperty("solr.tests.floatClassName", random().nextBoolean()? "TrieFloatField": "FloatPointField");
- System.setProperty("solr.tests.doubleClassName", random().nextBoolean()? "TrieDoubleField": "DoublePointField");
-
// we need consistent segments that aren't re-ordered on merge because we're
// asserting inplace updates happen by checking the internal [docid]
systemSetPropertySolrTestsMergePolicyFactory(NoMergePolicyFactory.class.getName());
@@ -121,14 +115,6 @@ public class TestInPlaceUpdatesStandalone extends SolrTestCaseJ4 {
client = null;
}
- @After
- public void after() {
- System.clearProperty("solr.tests.intClassName");
- System.clearProperty("solr.tests.longClassName");
- System.clearProperty("solr.tests.floatClassName");
- System.clearProperty("solr.tests.doubleClassName");
- }
-
@Before
public void deleteAllAndCommit() throws Exception {
clearIndex();
diff --git a/solr/core/src/test/org/apache/solr/update/UpdateLogTest.java b/solr/core/src/test/org/apache/solr/update/UpdateLogTest.java
index 9e7d977a03d..d2a57507310 100644
--- a/solr/core/src/test/org/apache/solr/update/UpdateLogTest.java
+++ b/solr/core/src/test/org/apache/solr/update/UpdateLogTest.java
@@ -43,11 +43,6 @@ public class UpdateLogTest extends SolrTestCaseJ4 {
@BeforeClass
public static void beforeClass() throws Exception {
- System.setProperty("solr.tests.intClassName", random().nextBoolean()? "TrieIntField": "IntPointField");
- System.setProperty("solr.tests.longClassName", random().nextBoolean()? "TrieLongField": "LongPointField");
- System.setProperty("solr.tests.floatClassName", random().nextBoolean()? "TrieFloatField": "FloatPointField");
- System.setProperty("solr.tests.doubleClassName", random().nextBoolean()? "TrieDoubleField": "DoublePointField");
-
initCore("solrconfig-tlog.xml", "schema-inplace-updates.xml");
try (SolrQueryRequest req = req()) {
@@ -60,10 +55,6 @@ public class UpdateLogTest extends SolrTestCaseJ4 {
@AfterClass
public static void afterClass() {
- System.clearProperty("solr.tests.intClassName");
- System.clearProperty("solr.tests.longClassName");
- System.clearProperty("solr.tests.floatClassName");
- System.clearProperty("solr.tests.doubleClassName");
ulog = null;
}