dsmiley commented on a change in pull request #1414: SOLR-14385 added shard 
name thru MDC and collection name to split histogram logs
URL: https://github.com/apache/lucene-solr/pull/1414#discussion_r405074700
 
 

 ##########
 File path: 
solr/core/src/test/org/apache/solr/handler/admin/SplitHandlerTest.java
 ##########
 @@ -22,24 +22,50 @@
 import java.util.List;
 import java.util.Random;
 
-import org.apache.solr.SolrTestCaseJ4;
+import org.apache.log4j.MDC;
+import org.apache.solr.client.solrj.impl.CloudSolrClient;
+import org.apache.solr.client.solrj.request.CollectionAdminRequest;
+import org.apache.solr.cloud.SolrCloudTestCase;
 import org.apache.solr.cloud.api.collections.SplitByPrefixTest;
 import org.apache.solr.cloud.api.collections.SplitByPrefixTest.Prefix;
+import org.apache.solr.common.cloud.ClusterState;
 import org.apache.solr.common.cloud.CompositeIdRouter;
+import org.apache.solr.common.cloud.DocCollection;
 import org.apache.solr.common.cloud.DocRouter;
 import org.apache.solr.request.SolrQueryRequest;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
+import static org.apache.solr.common.cloud.ZkStateReader.SHARD_ID_PROP;
+
 // test low level splitByPrefix range recommendations.
 // This is here to access package private methods.
 // See SplitByPrefixTest for cloud level tests of SPLITSHARD that use this by 
passing getRanges with the SPLIT command
-public class SplitHandlerTest extends SolrTestCaseJ4 {
-
+public class SplitHandlerTest extends SolrCloudTestCase {
+   
+  private static CloudSolrClient solrClient;
+  private static String systemCollNode;
+  private static String COLL_NAME = "collection1";
+  private static String SHARD_NAME = "shard1";
+  
   @BeforeClass
   public static void beforeTests() throws Exception {
     System.setProperty("managed.schema.mutable", "true");  // needed by 
cloud-managed config set
     initCore("solrconfig.xml","schema_latest.xml");
+    
+    configureCluster(2)
 
 Review comment:
   This seems wrong given this test calls initCore and thus isn't a SolrCloud 
test.  Maybe it needs to _become_ a SolrCloud test?  On the other hand, it's 
nice to keep a test lightweight; the only motivation here is for logging?  
Doesn't seem justified to me IMO.
   
   CC @yonik 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to