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

This commit is contained in:
Chris Hostetter 2017-06-23 10:13:00 -07:00
parent b3c3f596d9
commit c20d3aff94
5 changed files with 3 additions and 54 deletions

View File

@ -60,8 +60,8 @@
<fieldType name="string" class="solr.StrField" multiValued="false" indexed="false" stored="false" docValues="false" /> <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="long" class="${solr.tests.LongFieldType}" 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="float" class="${solr.tests.FloatFieldType}" 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="int" class="${solr.tests.IntegerFieldType}" multiValued="false" indexed="false" stored="false" docValues="false"/>
</schema> </schema>

View File

@ -44,7 +44,6 @@ import org.apache.solr.common.cloud.ZkStateReader;
import org.apache.solr.common.params.ModifiableSolrParams; import org.apache.solr.common.params.ModifiableSolrParams;
import org.apache.solr.common.util.NamedList; import org.apache.solr.common.util.NamedList;
import org.apache.zookeeper.KeeperException; import org.apache.zookeeper.KeeperException;
import org.junit.After;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import org.slf4j.Logger; import org.slf4j.Logger;
@ -56,11 +55,6 @@ public class TestStressInPlaceUpdates extends AbstractFullDistribZkTestBase {
@BeforeClass @BeforeClass
public static void beforeSuperClass() throws Exception { 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"; schemaString = "schema-inplace-updates.xml";
configString = "solrconfig-tlog.xml"; configString = "solrconfig-tlog.xml";
@ -72,14 +66,6 @@ public class TestStressInPlaceUpdates extends AbstractFullDistribZkTestBase {
assertEquals(-1, h.getCore().getSolrConfig().getUpdateHandlerInfo().autoSoftCommmitMaxDocs); 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() { public TestStressInPlaceUpdates() {
super(); super();
sliceCount = 1; sliceCount = 1;

View File

@ -59,7 +59,6 @@ import org.apache.solr.update.processor.DistributedUpdateProcessor;
import org.apache.solr.util.DefaultSolrThreadFactory; import org.apache.solr.util.DefaultSolrThreadFactory;
import org.apache.solr.util.RefCounted; import org.apache.solr.util.RefCounted;
import org.apache.zookeeper.KeeperException; import org.apache.zookeeper.KeeperException;
import org.junit.After;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import org.slf4j.Logger; import org.slf4j.Logger;
@ -75,11 +74,6 @@ public class TestInPlaceUpdatesDistrib extends AbstractFullDistribZkTestBase {
@BeforeClass @BeforeClass
public static void beforeSuperClass() throws Exception { 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"; schemaString = "schema-inplace-updates.xml";
configString = "solrconfig-tlog.xml"; configString = "solrconfig-tlog.xml";
@ -111,14 +105,6 @@ public class TestInPlaceUpdatesDistrib extends AbstractFullDistribZkTestBase {
return onlyLeaderIndexes; 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 { public TestInPlaceUpdatesDistrib() throws Exception {
super(); super();
sliceCount = 1; sliceCount = 1;

View File

@ -51,7 +51,6 @@ import org.apache.solr.schema.SchemaField;
import org.apache.solr.search.SolrIndexSearcher; import org.apache.solr.search.SolrIndexSearcher;
import org.apache.solr.update.processor.AtomicUpdateDocumentMerger; import org.apache.solr.update.processor.AtomicUpdateDocumentMerger;
import org.apache.solr.util.RefCounted; import org.apache.solr.util.RefCounted;
import org.junit.After;
import org.junit.AfterClass; import org.junit.AfterClass;
import org.junit.Before; import org.junit.Before;
import org.junit.BeforeClass; import org.junit.BeforeClass;
@ -66,11 +65,6 @@ public class TestInPlaceUpdatesStandalone extends SolrTestCaseJ4 {
@BeforeClass @BeforeClass
public static void beforeClass() throws Exception { 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 // we need consistent segments that aren't re-ordered on merge because we're
// asserting inplace updates happen by checking the internal [docid] // asserting inplace updates happen by checking the internal [docid]
systemSetPropertySolrTestsMergePolicyFactory(NoMergePolicyFactory.class.getName()); systemSetPropertySolrTestsMergePolicyFactory(NoMergePolicyFactory.class.getName());
@ -121,14 +115,6 @@ public class TestInPlaceUpdatesStandalone extends SolrTestCaseJ4 {
client = null; 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 @Before
public void deleteAllAndCommit() throws Exception { public void deleteAllAndCommit() throws Exception {
clearIndex(); clearIndex();

View File

@ -43,11 +43,6 @@ public class UpdateLogTest extends SolrTestCaseJ4 {
@BeforeClass @BeforeClass
public static void beforeClass() throws Exception { 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"); initCore("solrconfig-tlog.xml", "schema-inplace-updates.xml");
try (SolrQueryRequest req = req()) { try (SolrQueryRequest req = req()) {
@ -60,10 +55,6 @@ public class UpdateLogTest extends SolrTestCaseJ4 {
@AfterClass @AfterClass
public static void 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; ulog = null;
} }