You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2020/10/28 17:45:22 UTC

[lucene-solr] branch reference_impl_dev updated: @1054 Polish last commit 2.

This is an automated email from the ASF dual-hosted git repository.

markrmiller pushed a commit to branch reference_impl_dev
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/reference_impl_dev by this push:
     new 5d5255e  @1054 Polish last commit 2.
5d5255e is described below

commit 5d5255e7c45c4a18396686aa11f3e8a29f489187
Author: markrmiller <ma...@gmail.com>
AuthorDate: Wed Oct 28 12:13:53 2020 -0500

    @1054 Polish last commit 2.
---
 .../src/test/org/apache/solr/cloud/ShardRoutingTest.java    |  1 +
 .../test/org/apache/solr/cloud/SolrCloudBridgeTestCase.java | 13 +++++++++++++
 .../src/test/org/apache/solr/cloud/TestCloudPivotFacet.java |  3 +++
 .../solr/cloud/TestDynamicFieldNamesIndexCorrectly.java     | 10 +++++++++-
 .../handler/component/CustomHighlightComponentTest.java     |  2 +-
 5 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/solr/core/src/test/org/apache/solr/cloud/ShardRoutingTest.java b/solr/core/src/test/org/apache/solr/cloud/ShardRoutingTest.java
index ff7584e..2f5faf0 100644
--- a/solr/core/src/test/org/apache/solr/cloud/ShardRoutingTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/ShardRoutingTest.java
@@ -109,6 +109,7 @@ public class ShardRoutingTest extends SolrCloudBridgeTestCase {
   @Test
   public void doHashingTest() throws Exception {
     log.info("### STARTING doHashingTest");
+    cloudClient.getZkStateReader().forciblyRefreshAllClusterStateSlow();
     assertEquals(4, cloudClient.getZkStateReader().getClusterState().getCollection(DEFAULT_COLLECTION).getSlices().size());
     String shardKeys = ShardParams._ROUTE_;
     // for now,  we know how ranges will be distributed to shards.
diff --git a/solr/core/src/test/org/apache/solr/cloud/SolrCloudBridgeTestCase.java b/solr/core/src/test/org/apache/solr/cloud/SolrCloudBridgeTestCase.java
index 195afa5..843ef57 100644
--- a/solr/core/src/test/org/apache/solr/cloud/SolrCloudBridgeTestCase.java
+++ b/solr/core/src/test/org/apache/solr/cloud/SolrCloudBridgeTestCase.java
@@ -250,6 +250,19 @@ public abstract class SolrCloudBridgeTestCase extends SolrCloudTestCase {
       }
     }
     newClients.clear();
+    createCollection1 = true;
+    createControl = false;
+    solrconfigString = null;
+    schemaString = null;
+    numJettys = 3;
+    formatZk = true;
+
+    sliceCount = 2;
+
+    replicationFactor = 1;
+
+    enableProxy = false;
+
   }
   
   protected String getBaseUrl(HttpSolrClient client) {
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestCloudPivotFacet.java b/solr/core/src/test/org/apache/solr/cloud/TestCloudPivotFacet.java
index 9ec061a..8253c46 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestCloudPivotFacet.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestCloudPivotFacet.java
@@ -98,6 +98,9 @@ public class TestCloudPivotFacet extends SolrCloudBridgeTestCase {
     // we need DVs on point fields to compute stats & facets
     if (Boolean.getBoolean(SolrTestCaseJ4.NUMERIC_POINTS_SYSPROP)) System.setProperty(SolrTestCaseJ4.NUMERIC_DOCVALUES_SYSPROP,"true");
     useFieldRandomizedFactor = TestUtil.nextInt(random(), 2, 30);
+    solrconfigString = "solrconfig.xml";
+    schemaString = "schema.xml";
+    uploadSelectCollection1Config = true;
     log.info("init'ing useFieldRandomizedFactor = {}", useFieldRandomizedFactor);
   }
   
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestDynamicFieldNamesIndexCorrectly.java b/solr/core/src/test/org/apache/solr/cloud/TestDynamicFieldNamesIndexCorrectly.java
index 806cced..0be4bd9 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestDynamicFieldNamesIndexCorrectly.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestDynamicFieldNamesIndexCorrectly.java
@@ -53,9 +53,17 @@ public class TestDynamicFieldNamesIndexCorrectly extends SolrCloudBridgeTestCase
 
   private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
+  public TestDynamicFieldNamesIndexCorrectly () {
+    numJettys = 3;
+    createCollection1 = false;
+    solrconfigString = "solrconfig.xml";
+    schemaString = "schema.xml";
+    uploadSelectCollection1Config = true;
+  }
+
   @Test
   public void test() throws Exception {
-    numJettys = 3;
+
     createCollection(COLLECTION, 4,  1);
     final int numRuns = TEST_NIGHTLY ? 10 : 1;
     populateIndex(numRuns);
diff --git a/solr/core/src/test/org/apache/solr/handler/component/CustomHighlightComponentTest.java b/solr/core/src/test/org/apache/solr/handler/component/CustomHighlightComponentTest.java
index 34ab0e1..6ef13e3 100644
--- a/solr/core/src/test/org/apache/solr/handler/component/CustomHighlightComponentTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/component/CustomHighlightComponentTest.java
@@ -111,7 +111,7 @@ public class CustomHighlightComponentTest extends SolrCloudTestCase {
     // ... and shard/replica/node numbers
     final int numShards = 3;
     final int numReplicas = 2;
-    final int maxShardsPerNode = 2;
+    final int maxShardsPerNode = 100;
     final int nodeCount = (numShards*numReplicas + (maxShardsPerNode-1))/maxShardsPerNode;
 
     // create and configure cluster